aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/announcements.html15
-rw-r--r--layouts/partials/primary-nav.html1
2 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/announcements.html b/layouts/partials/announcements.html
new file mode 100644
index 0000000..f7461f8
--- /dev/null
+++ b/layouts/partials/announcements.html
@@ -0,0 +1,15 @@
+{{- $pages := where site.RegularPages "Section" "announcements" -}}
+{{- with $pages.ByDate.Reverse }}
+<section class="announcements" aria-labelledby="announcements-title">
+ <h2 id="announcements-title">ANNOUNCEMENTS</h2>
+ <ol class="document-list announcement-list">
+ {{- range first site.Params.announcementLimit . }}
+ <li>
+ <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
+ <a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a>
+ </li>
+ {{- end }}
+ </ol>
+ <p><a href="{{ "announcements/" | relURL }}">All announcements →</a></p>
+</section>
+{{- end }}
diff --git a/layouts/partials/primary-nav.html b/layouts/partials/primary-nav.html
index 05c535b..4a94d92 100644
--- a/layouts/partials/primary-nav.html
+++ b/layouts/partials/primary-nav.html
@@ -1,4 +1,5 @@
<nav class="site-nav" aria-label="Primary">
+ <a href="{{ "/announcements/" | relURL }}"{{ if eq .Section "announcements" }} aria-current="page"{{ end }}>announcements/</a>
<a href="{{ "/journal/" | relURL }}"{{ if eq .Section "journal" }} aria-current="page"{{ end }}>journal/</a>
<a href="{{ "/notes/" | relURL }}"{{ if eq .Section "notes" }} aria-current="page"{{ end }}>notes/</a>
<a href="{{ "/projects/" | relURL }}"{{ if eq .Section "projects" }} aria-current="page"{{ end }}>projects/</a>