More readable titles in blog posts

master
Quentin Duchemin 2023-08-10 14:40:43 +02:00
parent 3480fcdb9d
commit e80cac8c43
Signed by: Chosto
GPG Key ID: 96AB8AE7DFEA3D74
2 changed files with 13 additions and 5 deletions

View File

@ -5,7 +5,8 @@
{{ $page := eq "page" .Kind }} {{ $page := eq "page" .Kind }}
{{ $home := eq "home" .Kind }} {{ $home := eq "home" .Kind }}
<header> <header>
<section class='hero has-text-centered {{ if $background }}is-info has-bg-img {{ if $page }}is-large{{ else if $home }}is-medium{{ end }}{{ 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">
@ -29,10 +30,12 @@
</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 {{ if $page }}is-uppercase{{ end }}">{{ .Title }}</p> <div {{ if $page }}class="box"{{ end }}>
{{ with .Params.subtitle }} <p class="title is-size-1-desktop is-size-3-mobile {{ if $page }}is-uppercase{{ end }}">{{ .Title }}</p>
<p class="mt-5 subtitle is-size-2-desktop is-size-5-mobile">{{ . }}</p> {{ with .Params.subtitle }}
{{ end }} <p class="mt-5 subtitle is-size-2-desktop is-size-5-mobile">{{ . }}</p>
{{ end }}
</div>
</div> </div>
<!-- Words and date stuff makes sens only for blog posts, not other pages --> <!-- Words and date stuff makes sens only for blog posts, not other pages -->
{{ if (and .IsPage (eq .FirstSection.Section "posts"))}} {{ if (and .IsPage (eq .FirstSection.Section "posts"))}}

View File

@ -36,6 +36,11 @@ p:not(.title, .subtitle, figcaption p) {
text-align: justify; text-align: justify;
} }
/* Used only in page header, add transparency */
.box {
background: rgba(0, 0, 0, 0.3);
}
/* New font is "smaller" in feeling */ /* New font is "smaller" in feeling */
.navbar-dropdown { .navbar-dropdown {
font-size: 1rem; font-size: 1rem;