From 6914a11fe9245e6509d763cce586aa9ea30a2c79 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Fri, 5 Apr 2024 11:22:34 +0200
Subject: [PATCH] harden item title style

---
 assets/sass/_theme/sections/posts.sass       | 6 ++++++
 assets/sass/_theme/sections/programs.sass    | 6 ++++++
 assets/sass/_theme/sections/projects.sass    | 6 ++++++
 assets/sass/_theme/sections/volumes.sass     | 6 ++++++
 assets/sass/_theme/utils/shame.sass          | 6 ------
 layouts/partials/blocks/templates/pages.html | 2 +-
 layouts/partials/posts/post.html             | 2 +-
 layouts/partials/projects/project.html       | 2 +-
 layouts/partials/volumes/volume.html         | 2 +-
 9 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass
index 5c319a79..2f16991f 100644
--- a/assets/sass/_theme/sections/posts.sass
+++ b/assets/sass/_theme/sections/posts.sass
@@ -1,5 +1,11 @@
 .post
     @include article
+    .post-title
+        @include h3
+        a
+            @include stretched-link
+            display: block
+            text-decoration: none
     time
         color: $post-time-color
         display: inline-block
diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass
index d2895899..112981bd 100644
--- a/assets/sass/_theme/sections/programs.sass
+++ b/assets/sass/_theme/sections/programs.sass
@@ -1,5 +1,11 @@
 .program
     @include article
+    h2, h3, .program-title
+        @include h3
+        a
+            @include stretched-link
+            display: block
+            text-decoration: none
 
 div.programs,
 section.programs
diff --git a/assets/sass/_theme/sections/projects.sass b/assets/sass/_theme/sections/projects.sass
index fe4c6561..19b41f64 100644
--- a/assets/sass/_theme/sections/projects.sass
+++ b/assets/sass/_theme/sections/projects.sass
@@ -1,5 +1,11 @@
 .project
     @include article(auto)
+    .project-title
+        @include h3
+        a
+            @include stretched-link
+            display: block
+            text-decoration: none
 
 .projects__section,
 .projects_categories__term
diff --git a/assets/sass/_theme/sections/volumes.sass b/assets/sass/_theme/sections/volumes.sass
index 2b3d83aa..b9f768e9 100644
--- a/assets/sass/_theme/sections/volumes.sass
+++ b/assets/sass/_theme/sections/volumes.sass
@@ -1,5 +1,11 @@
 .volume
     @include article
+    .volume-title
+        @include h3
+        a
+            @include stretched-link
+            display: block
+            text-decoration: none
     .suptitle
         @include meta
 
diff --git a/assets/sass/_theme/utils/shame.sass b/assets/sass/_theme/utils/shame.sass
index 1be170d2..d966d30f 100644
--- a/assets/sass/_theme/utils/shame.sass
+++ b/assets/sass/_theme/utils/shame.sass
@@ -32,12 +32,6 @@
             object-fit: cover
             @if $aspect-ratio
                 aspect-ratio: $aspect-ratio
-    h2, h3, [itemprop=headline],  [itemprop=name]
-        @include h3
-        a
-            @include stretched-link
-            display: block
-            text-decoration: none
     p + time
             margin-top: $spacing-2
     .post-categories, .project-categories
diff --git a/layouts/partials/blocks/templates/pages.html b/layouts/partials/blocks/templates/pages.html
index 64394a08..ee6e9a41 100644
--- a/layouts/partials/blocks/templates/pages.html
+++ b/layouts/partials/blocks/templates/pages.html
@@ -22,7 +22,7 @@
       {{ $title = .Title }}
     {{ end }}
     {{ if .Params.bodyclass }}
-      {{- $page_class = printf "block-page-%s" .Params.bodyclass }}
+      {{- $page_class = printf "block-%s" .Params.bodyclass }}
     {{ end }}
     {{ if $show_main_description }}
       {{- $main_description = partial "GetTruncateContent" ( dict 
diff --git a/layouts/partials/posts/post.html b/layouts/partials/posts/post.html
index 0137312c..eb9f6614 100644
--- a/layouts/partials/posts/post.html
+++ b/layouts/partials/posts/post.html
@@ -2,7 +2,7 @@
 {{- $direction := "" -}}
 {{ $heading := .heading | default "h2" }}
 {{ $heading_tag := (dict 
-    "open" ((printf "<%s itemprop='headline'>" $heading) | safeHTML)
+    "open" ((printf "<%s class='post-title' itemprop='headline'>" $heading) | safeHTML)
     "close" ((printf "</%s>" $heading) | safeHTML)
     ) }}
 {{ $index := .index}}
diff --git a/layouts/partials/projects/project.html b/layouts/partials/projects/project.html
index c7ec5b28..c6f825ad 100644
--- a/layouts/partials/projects/project.html
+++ b/layouts/partials/projects/project.html
@@ -1,7 +1,7 @@
 {{ $project := .project }}
 {{ $heading := .heading | default "h2" }}
 {{ $heading_tag := (dict 
-    "open" ((printf "<%s itemprop='name'>" $heading) | safeHTML)
+    "open" ((printf "<%s class='project-title' itemprop='name'>" $heading) | safeHTML)
     "close" ((printf "</%s>" $heading) | safeHTML)
     ) }}
 
diff --git a/layouts/partials/volumes/volume.html b/layouts/partials/volumes/volume.html
index 2ff52181..d5ca03d1 100644
--- a/layouts/partials/volumes/volume.html
+++ b/layouts/partials/volumes/volume.html
@@ -1,7 +1,7 @@
 <article class="volume" itemscope itemtype="https://schema.org/Book https://schema.org/PublicationVolume">
   <hgroup>
     <p class="suptitle" itemprop="volumeNumber">{{ i18n "volumes.volume_number" (dict "Number" .Params.Number) }}</p>
-    <h2><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}" itemprop="name">{{ partial "PrepareHTML" .Title }}</a></h2>
+    <h2 class="volume-title"><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}" itemprop="name">{{ partial "PrepareHTML" .Title }}</a></h2>
   </hgroup>
   <div class="media">
     {{- if .Params.image -}}
-- 
GitLab