diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 00000000..7a2bbb9b --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,112 @@ +{{ partial "meta" . }} +{{ $title := .Title }} + + +
+
+ ← {{ T "goBack" }} {{ .Site.Title }} +
+
+ +

{{ $title }}

+ + {{ range .Site.Params.systems }} + {{ if eq .name $title }} + {{ with .description }} +

{{ . }}

+ {{ end }} + {{ end }} + {{ end }} + + + + {{ if not .Site.Params.disableComplexCalculations }} +

+ + {{ $resolved := first 5 (where .Pages "Params.resolved" "=" true) }} + + {{ if gt $resolved 0 }} + {{ $.Scratch.Set "counter" 0 }} + {{ range $resolved }} + + {{ $t := (time .Params.ResolvedWhen) }} + {{ $timeDiff := (sub $t.Unix .Date.Unix) }} + {{ $diffInMin := (div $timeDiff 60) }} + + {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") $diffInMin) }} + {{ end }} + + {{ end }} + +

+ {{ end }} + + + {{ len .Pages }} {{ T "entries" }}, {{ T "newestToOldest" }} + +
+
+
+ {{ $incidents := .Pages }} +
+ +
+ {{ if not $incidents }} +
+

{{ T "calmBeforeTheStorm" }}

+

{{ T "noIncidentsDesc" }}

+
+
+
+ {{ else }} + {{ $paginator := .Paginate $incidents .Site.Params.incidentPostsPerPage }} + {{ range $paginator.Pages }} + {{ .Render "small" }} + {{ end }} + + + {{ if gt $paginator.TotalPages 1 }} +
+ +
+ {{ if $paginator.HasPrev }} + + ⭠   + {{ T "prev" }} + + {{ else }} + + ⭠   + {{ T "prev" }} + + {{ end }} + + +     + {{ $paginator.PageNumber }} + / + {{ $paginator.TotalPages }} +     + + + {{ if $paginator.HasNext }} + + {{ T "next" }}   + ⭢ + + {{ else }} + + {{ T "next" }}   + ⭢ + + {{ end }} +
+ {{ end }} + {{ end }} +
+
+ + {{ partial "js" . }} + {{ partial "footer" . }} + +