added years
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ $nextYear := (int .Title) }}
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" (slice "posts") }}
|
||||
{{ $pages = sort $pages "Date" }}
|
||||
|
||||
{{ $pages = first 1 $pages }}
|
||||
|
||||
{{ $next := printf "%s/%s" "years" .Title }}
|
||||
|
||||
{{ partial "navigation-bar.html" ( dict "context" . "items" (slice "years" ) )}}
|
||||
|
||||
<article class="cf pa3 pa4-m pa4-l">
|
||||
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray">
|
||||
{{ $total_distance := 0 }}
|
||||
{{ $total_ascent := 0 }}
|
||||
{{ $total_nr_of_tours := 0 }}
|
||||
|
||||
{{ range .Pages }}
|
||||
{{ $act_ascent:= int .Params.ascent_m }}
|
||||
{{ $total_ascent = add $act_ascent $total_ascent }}
|
||||
|
||||
{{ $act_distance:= int .Params.distance_km }}
|
||||
{{ $total_distance = add $act_distance $total_distance }}
|
||||
|
||||
{{ $total_nr_of_tours = add 1 $total_nr_of_tours }}
|
||||
{{ end }}
|
||||
|
||||
<p>Touren des Jahres {{ .Title }}!</p>
|
||||
{{ partial "statistic-summary.html" ( dict "total_nr" $total_nr_of_tours "distance" $total_distance "ascent" $total_ascent ) }}
|
||||
</div>
|
||||
</article>
|
||||
<div class="mw8 center">
|
||||
<section class="flex-ns flex-wrap justify-around mt5">
|
||||
{{ range .Pages }}
|
||||
<div class="relative w-100 mb4 bg-white">
|
||||
{{ partial "summary-with-thumbnail.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,48 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ partial "navigation-bar.html" ( dict "context" . "items" (slice "/" ) )}}
|
||||
|
||||
<article class="measure-wide center pa3 pa4-ns nested-copy-line-height nested-img">
|
||||
<section class="cf pv3 pv4-l f4 tc-l measure-wide lh-copy mid-gray">
|
||||
<div class="cf pv3 pv4-l f4 tc-l measure-wide lh-copy mid-gray">
|
||||
<p>Events nach Jahren. Die Pulsbar zeigt die relative Anzahl pro Monat. Navigiere weiter in die Posts eines Jahres.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="w-100">
|
||||
{{ range .Data.Terms.Alphabetical.Reverse }}
|
||||
<section class="mt1">
|
||||
<div class="flex flex-column bg-white ba b--white bw2 ">
|
||||
|
||||
<div class="flex bg-white">
|
||||
|
||||
<div class="flex">
|
||||
<div class="f1 w4 tr pr4 pt1 bg-blue white">
|
||||
{{ len .Pages }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-column pl2">
|
||||
<div class=" pl2 ">
|
||||
{{ humanize .Page.Section }}
|
||||
</div>
|
||||
|
||||
<a href="{{ .Page.Permalink }}" class="f3 b near-black link black dim pr4 pt2 pb2">
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex pt1">
|
||||
{{ partial "years-summary.html" (dict "page" .Page "param_title" .Page.Title "pages" .Pages) }}
|
||||
</div>
|
||||
<div id="{{ .Page.Title }}" class="flex justify-center pt1">
|
||||
<div style="color:transparent">:</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user