Files
epsf-miniwebsite/layouts/_default/single.html
Stéphane BONIFFACY 1f4eef5fa1 - add page "internal regulations"
- change training pages display
- add footer link and social networks
2025-02-03 18:14:42 +01:00

54 lines
2.2 KiB
HTML

{{ define "main" }}
<main class="content page-template page-{{ .Slug }}">
<header id="site-page-head" >
{{ $translations := .Page.AllTranslations }}
<div id="top-banner" class="inner">
{{ $num_lang := len $translations }}
{{ if and (gt $num_lang 1) $.Site.Params.language_menu }}
<div id="site-languages" class="inner">
{{ range $translations }}
{{ $lang_title := .Lang | strings.ToUpper }}
{{ if eq .Lang $.Lang }}
{{ if $.Site.Params.show_current_lang }}
<span class='btn-lang active'>
{{ $img_lang_temp := (printf "images/lang-%s-100.png" .Lang) }}
{{ with resources.Get $img_lang_temp }}
<img id="flag-logo" alt="" src="{{ .RelPermalink }}" />{{ end }}
{{ $lang_title }}</span>
{{ end }}
{{ else }}
<a class='btn-lang' href='{{ .RelPermalink }}'>{{ $img_lang_temp := (printf "images/lang-%s-100.png" .Lang) }}
{{ with resources.Get $img_lang_temp }}
<img id="flag-logo" alt="" src="{{ .RelPermalink }}" />{{ end }}&nbsp;{{ $lang_title }}</a>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ $back_to_home := .Site.Params.back_to_home }}
{{ $back_link := "/" | relLangURL}}
{{ $use_history := false }}
{{ with .Parent }}
{{ $back_link = .RelPermalink | relLangURL }}
{{ end }}
<div id="site-menu" class="inner">
{{ with .Param "back_link" }}
{{ $use_history = hasPrefix . "history(-1)" }}
{{ $back_link = . | relLangURL }}
{{ end }}
{{ if $use_history }}
<a class='btn site-menu' href='javascript:window.history.back()'><i class="fa fa-angle-left"></i>&nbsp;{{ $back_to_home }}</a>
{{ else }}
<a class='btn site-menu' href='{{ $back_link }}'><i class="fa fa-angle-left"></i>&nbsp;{{ $back_to_home }}</a>
{{ end }}
</div>
</div>
</div>
</header>
<article class="post page">
<h1 class="post-title">{{ .Title }}</h1>
<section class="post-content">
{{ .Content }}
</section>
</article>
</main>
{{ end }}