Refactor site to new theme
Some checks failed
Build and Deploy Hugo / deploy (push) Failing after 20s
Some checks failed
Build and Deploy Hugo / deploy (push) Failing after 20s
This commit is contained in:
parent
1c5cdb3b97
commit
2519b96a86
16 changed files with 2590 additions and 83 deletions
19
layouts/index.html
Normal file
19
layouts/index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" }}
|
||||
<content>
|
||||
{{ .Content }}
|
||||
|
||||
<h2>My most recent posts</h2>
|
||||
<ul class="blog-posts">
|
||||
{{ $max := default 3 .Site.Params.postsToShowOnIndex }}
|
||||
{{ $posts := where .Site.RegularPages "Section" "posts" }}
|
||||
{{ range first $max $posts.ByDate.Reverse }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<p><a href="/posts/">All posts →</a></p>
|
||||
|
||||
</content>
|
||||
{{ end }}
|
||||
2
layouts/partials/custom_head.html
Normal file
2
layouts/partials/custom_head.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{{ $autoTheme := resources.Get "auto-theme.css" | minify }}
|
||||
<link href="{{ $autoTheme.RelPermalink }}" rel="stylesheet">
|
||||
4
layouts/partials/footer.html
Normal file
4
layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<div class="footer-copy">
|
||||
{{ .Site.Copyright }}
|
||||
{{ with .Site.Params.madeWith }} | {{ markdownify . }}{{ end }}
|
||||
</div>
|
||||
6
layouts/partials/header.html
Normal file
6
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<div class="mesh-wrap mesh-wrap-top" aria-hidden="true">
|
||||
<img src="/mesh.svg" alt="" class="mesh-image mesh-image-top">
|
||||
</div>
|
||||
|
||||
<a href="{{ relURL .Site.Home.RelPermalink }}" class="title"><h1>{{ .Site.Title }}</h1></a>
|
||||
<nav>{{- partial "nav.html" . -}}</nav>
|
||||
4
layouts/partials/nav.html
Normal file
4
layouts/partials/nav.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{{ range .Site.Menus.main.ByWeight }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
||||
6
layouts/shortcodes/code.html
Normal file
6
layouts/shortcodes/code.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{ .Page.Store.Set "hasCodeBlock" true }}
|
||||
{{ $lang := .Get "language" | default "" }}
|
||||
{{ with .Get "title" }}
|
||||
<p><strong>{{ . }}</strong></p>
|
||||
{{ end }}
|
||||
{{ highlight (trim .Inner "\r\n") $lang "" }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue