aboutsummaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/date.html3
-rw-r--r--layouts/_partials/head.html6
-rw-r--r--layouts/_partials/header.html2
-rw-r--r--layouts/_partials/nav.html14
4 files changed, 25 insertions, 0 deletions
diff --git a/layouts/_partials/date.html b/layouts/_partials/date.html
new file mode 100644
index 0000000..39e108c
--- /dev/null
+++ b/layouts/_partials/date.html
@@ -0,0 +1,3 @@
+{{- $machine := . | time.Format "2006-01-02T15:04:05-07:00" -}}
+{{- $human := . | time.Format "2006-01-02" -}}
+<time datetime="{{ $machine }}">{{ $human }}</time>
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html
new file mode 100644
index 0000000..2720637
--- /dev/null
+++ b/layouts/_partials/head.html
@@ -0,0 +1,6 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width">
+<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
+{{- with resources.Get "aoidh.css" | minify }}
+ <link rel="stylesheet" href="{{ .RelPermalink }}">
+{{- end }}
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html
new file mode 100644
index 0000000..8264d4d
--- /dev/null
+++ b/layouts/_partials/header.html
@@ -0,0 +1,2 @@
+{{ partial "nav.html" . }}
+<hr>
diff --git a/layouts/_partials/nav.html b/layouts/_partials/nav.html
new file mode 100644
index 0000000..81751ef
--- /dev/null
+++ b/layouts/_partials/nav.html
@@ -0,0 +1,14 @@
+<nav>
+ <ul>
+ {{- $currentPage := . }}
+ {{- range site.Menus.main }}
+ {{- if $currentPage.IsMenuCurrent .Menu . }}
+ <li class="nav-active"><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{- else if $currentPage.HasMenuCurrent .Menu . }}
+ <li class="nav-ancestor"><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{- else }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{- end }}
+ {{- end }}
+ </ul>
+</nav>