diff options
author | Mantas <11616378+mistermantas@users.noreply.github.com> | 2019-01-24 19:23:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 19:23:35 +0200 |
commit | 4a968698e45ece04b25f41783298b9b397a191a1 (patch) | |
tree | 57ae06a3d7344f234ba71a12b7962144b8eb5472 /layouts/_default/list.html | |
parent | 8a1aaf4737e90406119bdf5770937eea924729aa (diff) |
cState is now stable on v3.0 - 2019-01-24 (info: #41)
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r-- | layouts/_default/list.html | 88 |
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"> + ⭠ + {{ T "prev" }} + </a> + {{ else }} + <span class="faded"> + ⭠ + {{ T "prev" }} + </span> + {{ end }} + + + + {{ $paginator.PageNumber }} + / + {{ $paginator.TotalPages }} + + + + {{ if $paginator.HasNext }} + <a href="{{ $paginator.Next.URL }}#incidents"> + {{ T "next" }} + ⭢ + </a> + {{ else }} + <span class="faded"> + {{ T "next" }} + ⭢ + </span> + {{ end }} + </div> + {{ end }} + {{ end }} + <div class="padding"></div> + </div> + + {{ partial "js" . }} + {{ partial "footer" . }} + </body> +</html> |