aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html88
1 files changed, 88 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..b8c14c6
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,88 @@
+{{ partial "meta" . }}
+{{ $title := .Title }}
+
+ <body class="default list">
+ <header>
+ <div class="contain">
+ <a href="{{ .Site.BaseURL }}">← {{ T "goBack" }} <em>{{ .Site.Title }}</em></a>
+ <div class="padding"></div>
+ <div class="padding"></div>
+
+ <h1 class="clean">{{ $title }}</h1>
+
+ {{ range .Site.Params.systems }}
+ {{ if eq .name $title }}
+ {{ with .description }}
+ <p class="bold">{{ . }}</p>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+
+ <small class="faded">{{ len .Pages }} {{ T "entries" }}, {{ T "newestToOldest" }}</small>
+
+ <div class="padding"></div>
+ <hr class="clean">
+ </div>
+ {{ $incidents := .Pages }}
+ </header>
+
+ <div class="contain contain--more" id="incidents">
+ {{ if not $incidents }}
+ <div class="padding"></div>
+ <h3>{{ T "calmBeforeTheStorm" }}</h3>
+ <p>{{ T "noIncidentsDesc" }}</p>
+ <div class="padding"></div>
+ <div class="padding"></div>
+ <div class="padding"></div>
+ {{ else }}
+ {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }}
+ {{ range $paginator.Pages }}
+ {{ .Render "small" }}
+ {{ end }}
+
+ <!-- If there are more than 2 pages, show pagination -->
+ {{ if gt $paginator.TotalPages 1 }}
+ <hr>
+
+ <div class="center">
+ {{ if $paginator.HasPrev }}
+ <a href="{{ $paginator.Prev.URL }}#incidents">
+ ⭠ &nbsp;
+ {{ T "prev" }}
+ </a>
+ {{ else }}
+ <span class="faded">
+ ⭠ &nbsp;
+ {{ T "prev" }}
+ </span>
+ {{ end }}
+
+
+ &nbsp; &nbsp;
+ {{ $paginator.PageNumber }}
+ /
+ {{ $paginator.TotalPages }}
+ &nbsp; &nbsp;
+
+
+ {{ if $paginator.HasNext }}
+ <a href="{{ $paginator.Next.URL }}#incidents">
+ {{ T "next" }} &nbsp;
+ ⭢
+ </a>
+ {{ else }}
+ <span class="faded">
+ {{ T "next" }} &nbsp;
+ ⭢
+ </span>
+ {{ end }}
+ </div>
+ {{ end }}
+ {{ end }}
+ <div class="padding"></div>
+ </div>
+
+ {{ partial "js" . }}
+ {{ partial "footer" . }}
+ </body>
+</html>