- fix single page header (style and back link)
- fix some markdown content and add parameter link if needed
This commit is contained in:
48
layouts/_default/single.html
Normal file
48
layouts/_default/single.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{ 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 }} {{ $lang_title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ $back_to_home := .Site.Params.back_to_home }}
|
||||
{{ $back_link := "/" | relLangURL}}
|
||||
{{ with .Parent }}
|
||||
{{ $back_link = .RelPermalink | relLangURL }}
|
||||
{{ end }}
|
||||
{{ with .Param "back_link" }}
|
||||
{{ $back_link = . | relLangURL }}
|
||||
{{ end }}
|
||||
<div id="site-menu" class="inner">
|
||||
<a class='btn site-menu' href='{{ $back_link }}'><i class="fa fa-angle-left"></i> {{ $back_to_home }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<article class="post page">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<section class="post-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user