Use narrower container for lists

master
Quentin Duchemin 2021-05-25 00:07:23 +02:00
parent 734cbbd181
commit aca1d1d256
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
3 changed files with 58 additions and 56 deletions

View File

@ -5,9 +5,7 @@
<div class="content"> <div class="content">
{{- partial "navbar.html" . -}} {{- partial "navbar.html" . -}}
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<div class="container">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</div> </div>
</body> </body>

View File

@ -1,19 +1,21 @@
{{ define "main" }} {{ define "main" }}
<main> <div class="container is-max-widescreen">
{{ with .Content }} <main>
<article class="message mt-5 mb-2 is-medium"> {{ with .Content }}
<div class="message-body"> <article class="message mt-5 mb-2 is-medium">
{{ . }} <div class="message-body">
</div> {{ . }}
</article> </div>
{{ end }} </article>
<div class="columns is-multiline is-mobile">
{{ range .Paginator.Pages }}
<div class="column is-one-third">
{{ .Render "summary" }}
</div>
{{ end }} {{ end }}
</div> <div class="columns is-multiline is-mobile">
{{- partial "pagination.html" . -}} {{ range .Paginator.Pages }}
</main> <div class="column is-one-third">
{{ .Render "summary" }}
</div>
{{ end }}
</div>
{{- partial "pagination.html" . -}}
</main>
</div>
{{ end }} {{ end }}

View File

@ -1,47 +1,49 @@
{{ define "main" }} {{ define "main" }}
<div class="columns mt-5 is-variable is-mobile is-8"> <div class="container">
<!-- <div class="columns mt-5 is-variable is-mobile is-8">
<!--
If the current page is a blog post and belongs to a case, we will add a side menu If the current page is a blog post and belongs to a case, we will add a side menu
with all other blog posts belonging to that case, emphasis to the current. with all other blog posts belonging to that case, emphasis to the current.
--> -->
{{ if (and .IsPage (eq .FirstSection.Section "posts"))}} {{ if (and .IsPage (eq .FirstSection.Section "posts"))}}
{{ with .CurrentSection }} {{ with .CurrentSection }}
<aside class="menu box column is-3 is-align-self-flex-start is-fixed-top" style="position: sticky; top: 7%;"> <aside class="menu box column is-3 is-align-self-flex-start is-fixed-top" style="position: sticky; top: 7%;">
<p class="menu-label"> <p class="menu-label">
Dans le dossier « <a href="{{ .Permalink }}">{{ .Params.Title }} »</a>... Dans le dossier « <a href="{{ .Permalink }}">{{ .Params.Title }} »</a>...
</p> </p>
<div class="menu-list"> <div class="menu-list">
{{ $posts := (where $.Site.RegularPages "CurrentSection.Params.Code" "==" $.CurrentSection.Params.Code )}} {{ $posts := (where $.Site.RegularPages "CurrentSection.Params.Code" "==" $.CurrentSection.Params.Code )}}
{{ $postsSorted := (sort $posts "Date" )}} {{ $postsSorted := (sort $posts "Date" )}}
{{ range $postsSorted }} {{ range $postsSorted }}
<a {{ if eq $.Title .Title }} class="is-active" {{ end }} href="{{ .Permalink }}">{{ .Title }}</a> <a {{ if eq $.Title .Title }} class="is-active" {{ end }} href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
</div>
</aside>
{{ end }}
{{ end }}
<section class="column is-7">
<div>
<article>
{{ .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 }}">&laquo;&nbsp;{{ .Title }}</a>
</div>
{{ end }}
</div>
<div class="level-right">
{{ with .NextInSection }}
<div class="level-item">
<a class="button is-info" href="{{ .Permalink }}">{{ .Title }}&nbsp;&raquo;</a>
</div>
{{ end }} {{ end }}
</div> </div>
</aside> </aside>
</section> {{ end }}
{{ end }}
<section class="column is-7">
<div>
<article>
{{ .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 }}">&laquo;&nbsp;{{ .Title }}</a>
</div>
{{ end }}
</div>
<div class="level-right">
{{ with .NextInSection }}
<div class="level-item">
<a class="button is-info" href="{{ .Permalink }}">{{ .Title }}&nbsp;&raquo;</a>
</div>
{{ end }}
</div>
</aside>
</section>
</div>
</div> </div>
{{ end }} {{ end }}