about summary refs log tree commit diff
path: root/layouts/partials
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2023-07-27 14:04:30 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2023-07-27 14:04:30 +0700
commitfa98ab0589d4be1ca89a0538f6826b0037ff9821 (patch)
tree7c019babc4d02a3b7bc8dfb2fb6550fdc58345c7 /layouts/partials
parent890252ec5e659b439165e0d18ca991ef1bfad9ee (diff)
downloadvictor-fa98ab0589d4be1ca89a0538f6826b0037ff9821.tar.gz
Set up layout and navigation
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/footer.html8
-rw-r--r--layouts/partials/head.html10
-rw-r--r--layouts/partials/header.html3
-rw-r--r--layouts/partials/post-info.html0
-rw-r--r--layouts/partials/post-language-switcher.html16
-rw-r--r--layouts/partials/post-navigation.html9
-rw-r--r--layouts/partials/single-extra.html0
7 files changed, 41 insertions, 5 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 8707172..619beab 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -6,19 +6,17 @@ SPDX-License-Identifier: MIT
 
 <footer class="common-footer" id="footer">
   {{ $languagesCount := $.Site.Home.AllTranslations }}
-  {{ if gt $languagesCount 1 }}
+  {{/* if gt $languagesCount 1 }}
     {{ partial "language-switcher.html" . }}
-  {{ end }}
+  {{ end */}}
 
   <div class="common-footer-bottom">
     <div class="copyright">
-      <p>© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }}</p>
+      {{ if isset .Site.Params "author"}}<p>© {{ .Site.Params.author }}, {{ now.Year }}</p>{{end}}
       <p>{{ partial "copyright.html" . }}</p>
     </div> 
     <div>
       {{ partial "footer-extra.html" . }}
     </div>
   </div>
-
-  {{ partial "h-card.html" . }}
 </footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e69de29..86c4a33 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -0,0 +1,10 @@
+{{ $style := resources.Get "css/readable.css" }}
+
+<meta charset="utf-8">
+<meta name="HandheldFriendly" content="True">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="referrer" content="no-referrer-when-downgrade">
+
+<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
+<meta name="description" content="{{ .Site.Params.Description }}">
+<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}">
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index e69de29..d015389 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -0,0 +1,3 @@
+<nav>
+	<a href="/" >{{ .Site.Title }}</a>
+</nav>
diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/post-info.html
diff --git a/layouts/partials/post-language-switcher.html b/layouts/partials/post-language-switcher.html
new file mode 100644
index 0000000..162cdf3
--- /dev/null
+++ b/layouts/partials/post-language-switcher.html
@@ -0,0 +1,16 @@
+{{ if .IsTranslated }}
+    {{ $pageLang := .Page.Lang}}
+    <ul class="post-translations">
+        {{ range .AllTranslations }}
+            {{ if eq .Lang $pageLang }}
+                <li>
+                    {{ upper .Lang }}
+                </li>
+            {{ else }}
+                <li>
+                    <a href="{{ .Permalink }}">{{ upper .Lang }}</a>
+                </li>
+            {{ end }}
+        {{ end }}
+    </ul>
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/post-navigation.html b/layouts/partials/post-navigation.html
new file mode 100644
index 0000000..b88d91f
--- /dev/null
+++ b/layouts/partials/post-navigation.html
@@ -0,0 +1,9 @@
+<nav>
+	{{ if .NextInSection }}
+	<a class="nav-next" href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title }}</a>
+	{{ end }}
+	<a class="nav-up" href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a>
+	{{ if .PrevInSection }}
+	<a  class="nav-prev"href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title }}</a>
+	{{ end }}
+</nav>
diff --git a/layouts/partials/single-extra.html b/layouts/partials/single-extra.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/single-extra.html