From 4a968698e45ece04b25f41783298b9b397a191a1 Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Thu, 24 Jan 2019 19:23:35 +0200 Subject: cState is now stable on v3.0 - 2019-01-24 (info: #41) --- layouts/_default/list.html | 88 ++++++++++++++++++++++++++++++++++++++++++++ layouts/_default/list.xml | 30 +++++++++++++++ layouts/_default/single.html | 8 ++-- 3 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/list.xml (limited to 'layouts/_default') 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 }} + + +
+
+ ← {{ T "goBack" }} {{ .Site.Title }} +
+
+ +

{{ $title }}

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

{{ . }}

+ {{ 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" . }} + + diff --git a/layouts/_default/list.xml b/layouts/_default/list.xml new file mode 100644 index 0000000..219354b --- /dev/null +++ b/layouts/_default/list.xml @@ -0,0 +1,30 @@ + + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + {{ T "incidentHistory" }} + github.com/cstate + {{ with .Site.LanguageCode }}{{.}}{{end}} + {{ if not .Date.IsZero }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ end }} + {{ with .Site.Copyright }} + {{.}}{{end}} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }} + + {{ if .Params.resolved }}[{{ T "resolved" }}] {{ end }}{{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ .Permalink }} + {{ .Params.resolvedWhen }} + {{ .Summary | html }} + {{ .Content | html }} + + {{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8463204..c1292b2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,13 +1,11 @@ {{ partial "meta" . }} - - +
- ← Go back + ← {{ T "goBack" }} {{ .Site.Title }}
- {{ .Render "post" }} + {{ .Content }}
- {{ partial "js" . }} {{ partial "footer" . }} -- cgit v1.2.3-70-g09d2