spearhead-statuskit/site/layouts/index.html

32 lines
841 B
HTML
Raw Permalink Normal View History

{{ partial "header" . }}
{{ $incidents := where .Site.RegularPages.ByDate.Reverse "Section" "incidents" }}
{{ $active := where $incidents "Params.resolved" "!=" true }}
{{ partial "systems" (dict "content" . "incidents" $active) }}
{{ with $active }}
2017-08-31 03:59:32 +03:00
<div class="section-title mute">Active Incidents</div>
{{ range $active }}
{{ partial "incident" . }}
{{ end }}
{{ else }}
{{ $latest := index $incidents 0 }}
{{ partial "all-clear" $latest }}
{{ end }}
{{ $recents := first 3 (where $incidents "Params.resolved" "==" true) }}
{{ with $recents }}
<div class="history">
<div class="section-title">Past Incidents</div>
{{ range $recents }}
{{ partial "incident" . }}
{{ end }}
<a href="/incidents" class="see-more">See all incidents</a>
</div>
{{ end }}
{{ partial "footer" . }}
<script src="/app.js"></script>