aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/list.html88
-rw-r--r--layouts/_default/list.xml30
-rw-r--r--layouts/_default/single.html8
3 files changed, 121 insertions, 5 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>
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 @@
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <link rel="alternate" type="text/html" href="{{ .Site.BaseURL }}"/>
+ <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
+ <link>{{ .Permalink }}</link>
+ <description>{{ T "incidentHistory" }}</description>
+ <generator>github.com/cstate</generator>
+ {{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
+ {{ if not .Date.IsZero }}
+ <lastBuildDate>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastBuildDate>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
+ {{ end }}
+ {{ with .Site.Copyright }}
+ <copyright>{{.}}</copyright>{{end}}
+ {{ with .OutputFormats.Get "RSS" }}
+ {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+ {{ end }}
+ {{ range .Pages }}
+ <item>
+ <title>{{ if .Params.resolved }}[{{ T "resolved" }}] {{ end }}{{ .Title }}</title>
+ <link>{{ .Permalink }}</link>
+ <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+ <guid>{{ .Permalink }}</guid>
+ <category>{{ .Params.resolvedWhen }}</category>
+ <description>{{ .Summary | html }}</description>
+ <content type="html">{{ .Content | html }}</content>
+ </item>
+ {{ end }}
+ </channel>
+</rss>
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" . }}
-
- <body>
+ <body class="default single">
<div class="contain">
- <a href="{{ .Site.BaseURL }}">← Go back</a>
+ <a href="{{ .Site.BaseURL }}">← {{ T "goBack" }} <em>{{ .Site.Title }}<em></a>
<hr>
- {{ .Render "post" }}
+ {{ .Content }}
</div>
-
{{ partial "js" . }}
{{ partial "footer" . }}
</body>