blog/themes/chosto/layouts/posts/single.html

49 lines
1.5 KiB
HTML
Raw Normal View History

2021-05-11 10:01:24 +02:00
{{ define "main" }}
2021-05-21 23:50:10 +02:00
<div class="columns mt-5 is-variable is-6">
2021-05-21 14:53:35 +02:00
<!--
If the current blog post belongs to a case, we will add a side menu
with all other blog posts belonging to that case, emphasis to the current.
-->
2021-05-22 00:16:10 +02:00
{{ with .CurrentSection }}
2021-05-21 23:50:10 +02:00
<aside class="menu box column is-3">
2021-05-21 14:53:35 +02:00
<p class="menu-label">
2021-05-22 00:16:10 +02:00
Dans le dossier « <a href="{{ .Permalink }}">{{ .Params.Title }} »</a>...
2021-05-21 14:53:35 +02:00
</p>
2021-05-21 23:50:10 +02:00
<div class="menu-list">
2021-05-21 14:53:35 +02:00
{{ $posts := (where $.Site.RegularPages "CurrentSection.Params.Code" "==" $.CurrentSection.Params.Code )}}
{{ $postsSorted := (sort $posts "Date" )}}
{{ range $postsSorted }}
2021-05-21 23:50:10 +02:00
<a {{ if eq $.Title .Title }} class="is-active" {{ end }} href="{{ .Permalink }}">{{ .Title }}</a>
2021-05-19 18:24:05 +02:00
{{ end }}
2021-05-21 23:50:10 +02:00
</div>
2021-05-21 14:53:35 +02:00
</aside>
{{ end }}
2021-05-21 23:50:10 +02:00
<section class="column is-7">
2021-05-11 10:01:24 +02:00
<div>
2021-05-21 23:50:10 +02:00
<article>
{{ .Content }}
</article>
2021-05-11 10:01:24 +02:00
</div>
2021-05-21 23:50:10 +02:00
<aside class="container level my-5">
<div class="level-left">
{{ with .PrevInSection }}
<div class="level-item">
<a class="button is-info" href="{{ .Permalink }}">&laquo;&laquo;&nbsp;{{ .Title }}</a>
</div>
{{ end }}
2021-05-21 14:53:35 +02:00
</div>
2021-05-21 23:50:10 +02:00
<div class="level-right">
{{ with .NextInSection }}
<div class="level-item">
<a class="button is-info" href="{{ .Permalink }}">{{ .Title }}&nbsp;&raquo;&raquo;</a>
</div>
{{ end }}
</div>
</aside>
</section>
<aside class="column is-3">
{{- partial "about.html" . -}}
2021-05-21 14:53:35 +02:00
</aside>
</div>
2021-05-11 10:01:24 +02:00
{{ end }}