Markdown in figcaptions, tweaking home and posts header

master
Quentin Duchemin 2023-08-09 23:09:34 +02:00
parent e90bcbeb65
commit fa28d5eb68
Signed by: Chosto
GPG Key ID: 96AB8AE7DFEA3D74
6 changed files with 11 additions and 9 deletions

View File

@ -8,7 +8,7 @@ languageCode: fr-fr
languageName: Français languageName: Français
watch: true watch: true
paginate: 9 paginate: 9
title: Le blog de Quentin (Chosto) title: Le blog de Quentin
permalinks: permalinks:
# All pages under posts section will have this link structure # All pages under posts section will have this link structure

View File

@ -1,4 +1,4 @@
--- ---
title: Mon carnet web title: Mon carnet web
subtitle: Quelques pensées à la mer cherchant chemin subtitle: Pensées à la mer cherchant chemin
--- ---

View File

@ -1,3 +1,2 @@
<!-- Overwrite default title rendering to add anchor -->
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}"></a></h{{ .Level }}> <h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}"></a></h{{ .Level }}>

View File

@ -48,7 +48,7 @@
{{ with .Params.imgExplanation }} {{ with .Params.imgExplanation }}
<div class="message"> <div class="message">
<div class="message-body content is-italic"> <div class="message-body content is-italic">
{{ . }} {{ . | markdownify }}
</div> </div>
</div> </div>
{{ end }} {{ end }}

View File

@ -2,8 +2,10 @@
{{ if not .Params.noheader }} {{ if not .Params.noheader }}
<!-- Display background only for regular pages, or home --> <!-- Display background only for regular pages, or home -->
{{ $background := in "page home" .Kind }} {{ $background := in "page home" .Kind }}
{{ $page := eq "page" .Kind }}
{{ $home := eq "home" .Kind }}
<header> <header>
<section class='hero has-text-centered {{ if $background }}is-medium is-info has-bg-img{{ end }}'> <section class='hero has-text-centered {{ if $background }}is-info has-bg-img {{ if $page }}is-large{{ else if $home }}is-medium{{ end }}{{ end }}'>
<div class="hero-head mx-5"> <div class="hero-head mx-5">
<div class="level mt-4"> <div class="level mt-4">
<div class="level-left"> <div class="level-left">
@ -27,7 +29,7 @@
</div> </div>
</div> </div>
<div class="hero-body {{ if not $background }}pb-0{{ end }} container has-text-centered"> <div class="hero-body {{ if not $background }}pb-0{{ end }} container has-text-centered">
<p class="title is-size-1-desktop is-size-3-mobile">{{ .Title }}</p> <p class="title is-size-1-desktop is-size-3-mobile {{ if $page }}is-uppercase{{ end }}">{{ .Title }}</p>
{{ with .Params.subtitle }} {{ with .Params.subtitle }}
<p class="mt-5 subtitle is-size-2-desktop is-size-5-mobile">{{ . }}</p> <p class="mt-5 subtitle is-size-2-desktop is-size-5-mobile">{{ . }}</p>
{{ end }} {{ end }}

View File

@ -31,8 +31,8 @@ li[id*=fn] {
flex-direction: column; flex-direction: column;
} }
/* Justify all content but not titles */ /* Justify all content but not titles nor figure captions */
p:not(.title, .subtitle) { p:not(.title, .subtitle, figcaption p) {
text-align: justify; text-align: justify;
} }
@ -47,6 +47,7 @@ figcaption h4, figcaption p {
font-weight: 400 !important; font-weight: 400 !important;
font-style: normal; font-style: normal;
line-height: 1.5 !important; line-height: 1.5 !important;
color: dimgray;
} }
figure img { figure img {