2021-05-11 10:01:24 +02:00
|
|
|
{{ define "main" }}
|
2021-05-25 00:07:23 +02:00
|
|
|
<div class="container">
|
|
|
|
<div class="columns mt-5 is-variable is-mobile is-8">
|
|
|
|
<!--
|
2021-05-24 23:53:06 +02:00
|
|
|
If the current page is a blog post and belongs to a case, we will add a side menu
|
2021-05-21 14:53:35 +02:00
|
|
|
with all other blog posts belonging to that case, emphasis to the current.
|
|
|
|
-->
|
2021-05-25 00:07:23 +02:00
|
|
|
{{ if (and .IsPage (eq .FirstSection.Section "posts"))}}
|
|
|
|
{{ with .CurrentSection }}
|
2021-05-25 00:36:57 +02:00
|
|
|
<aside class="menu column is-3 mt-2 is-align-self-flex-start">
|
2021-05-25 00:07:23 +02:00
|
|
|
<p class="menu-label">
|
|
|
|
Dans le dossier « <a href="{{ .Permalink }}">{{ .Params.Title }} »</a>...
|
|
|
|
</p>
|
|
|
|
<div class="menu-list">
|
|
|
|
{{ $posts := (where $.Site.RegularPages "CurrentSection.Params.Code" "==" $.CurrentSection.Params.Code )}}
|
|
|
|
{{ $postsSorted := (sort $posts "Date" )}}
|
|
|
|
{{ range $postsSorted }}
|
|
|
|
<a {{ if eq $.Title .Title }} class="is-active" {{ end }} href="{{ .Permalink }}">{{ .Title }}</a>
|
2021-05-21 23:50:10 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</aside>
|
2021-05-25 00:07:23 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
<section class="column is-7">
|
|
|
|
<div>
|
|
|
|
<article>
|
2021-05-25 01:11:29 +02:00
|
|
|
<div class="message is-info">
|
|
|
|
<div class="message-header">Sommaire</div>
|
|
|
|
<!-- Appreciate this horrible trick, even a 2000's HTML generator won't generate such horrible code -->
|
|
|
|
<div class="message-body pt-1">{{ .TableOfContents | replaceRE "<a" "<a style='text-decoration:none;'" | safeHTML }}</div>
|
|
|
|
</div>
|
2021-05-25 00:07:23 +02:00
|
|
|
{{ .Content }}
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
<aside class="container level my-5">
|
|
|
|
<div class="level-left">
|
|
|
|
{{ with .PrevInSection }}
|
|
|
|
<div class="level-item">
|
|
|
|
<a class="button is-info" href="{{ .Permalink }}">« {{ .Title }}</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="level-right">
|
|
|
|
{{ with .NextInSection }}
|
|
|
|
<div class="level-item">
|
|
|
|
<a class="button is-info" href="{{ .Permalink }}">{{ .Title }} »</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
</section>
|
|
|
|
</div>
|
2021-05-21 14:53:35 +02:00
|
|
|
</div>
|
2021-05-11 10:01:24 +02:00
|
|
|
{{ end }}
|