aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/announcements.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/announcements.html')
-rw-r--r--layouts/partials/announcements.html15
1 files changed, 15 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 }}