diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2021-04-12 11:19:57 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2021-04-12 11:19:57 +0700 |
commit | 981e41a9473654c4ee754f86a78d54c8c5cad9b2 (patch) | |
tree | 26fa9a31a9f11ec709615f1c96b0c26f2dc70538 /layouts | |
parent | d02a380caa30a804c927498e624927daa70b0b13 (diff) | |
download | blog-981e41a9473654c4ee754f86a78d54c8c5cad9b2.tar.gz |
Switch to Hugo, restructure the page
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 26 | ||||
-rw-r--r-- | layouts/partials/footer-extra.html | 12 | ||||
-rw-r--r-- | layouts/partials/head-extra.html | 5 | ||||
-rw-r--r-- | layouts/partials/languageSelect.html | 10 |
4 files changed, 53 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f74ec16 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,26 @@ +{{ define "main" }} +{{ if .Menus }} +<nav class="post-navigation"> + {{ range .Menus }} + <a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a> + {{ end }} +</nav> +{{ end }} + +<article class="post h-entry"> + <header class="post-header"> + <h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1> + </header> + <div class="content e-content"> + {{ .Content }} + </div> + {{ partial "postInfo.html" . }} +</article> + +{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} +{{ partial "paginationPost.html" . }} +{{ end }} + +{{ partial "custom-webring.html" }} + +{{ end }} diff --git a/layouts/partials/footer-extra.html b/layouts/partials/footer-extra.html new file mode 100644 index 0000000..bef79ed --- /dev/null +++ b/layouts/partials/footer-extra.html @@ -0,0 +1,12 @@ +<footer> + <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="Creative Commons License" style="border-width:0" + src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /> + </a> + <br> + The content for this site is + <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>. + <br> + The <a href="https://git.sr.ht/~sircmpwn/drewdevault.com">code for this site</a> + is <a href="https://opensource.org/licenses/MIT">MIT</a>. +</footer> diff --git a/layouts/partials/head-extra.html b/layouts/partials/head-extra.html new file mode 100644 index 0000000..d0d0022 --- /dev/null +++ b/layouts/partials/head-extra.html @@ -0,0 +1,5 @@ +<link rel="stylesheet" href="/css/custom.css"> +<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png"> +<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png"> +<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png"> +<link rel="manifest" href="/images/site.webmanifest"> diff --git a/layouts/partials/languageSelect.html b/layouts/partials/languageSelect.html new file mode 100644 index 0000000..029a34d --- /dev/null +++ b/layouts/partials/languageSelect.html @@ -0,0 +1,10 @@ +{{ if .IsTranslated }} +<h4>{{ i18n "translations" }}</h4> +<ul> + {{ range .Translations }} + <li> + <a href="{{ .Permalink }}">{{ .Language.LanguageName }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a> + </li> + {{ end }} +</ul> +{{ end }} |