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 }}
|
||||
Reference in New Issue
Block a user