Files
2020-11-12 22:10:20 +01:00

35 lines
1.2 KiB
HTML

{{ define "main" }}
{{ partial "navigation-bar.html" ( dict "context" . "items" (slice "sports" ) )}}
<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>Hier gibt`s alles über "{{ .Title }}" Touren im Überblick!</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 }}