fix(association): sections menu
This commit is contained in:
parent
110539843c
commit
dc82b8b4c0
11 changed files with 141 additions and 38 deletions
50
layouts/association/single.html
Normal file
50
layouts/association/single.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<article class="article">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<nav class="sticky-nav">
|
||||
<ul>
|
||||
{{ range .CurrentSection.Pages }}
|
||||
<li>
|
||||
{{ $title := .Title }}
|
||||
{{ with .Params.short_title }}
|
||||
{{ $title = . }}
|
||||
{{ end }}
|
||||
<a href="{{ .RelPermalink }}">{{ $title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{ if .Date }}
|
||||
<div class="article__date">
|
||||
Publié le
|
||||
{{ $date := .Date.Format "2006-01-02" }}
|
||||
<time date="{{ $date }}">{{ time.Format "2 January 2006" $date }}</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ if $featuredImage }}
|
||||
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
||||
<figure>
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue