diff --git a/assets/sass/_theme/sections/projects.sass b/assets/sass/_theme/sections/projects.sass index d587a40155029ed530c7c3aa37aa0b6588c75f71..7f2edc7f544ef36018216e371f439f590907cb97 100644 --- a/assets/sass/_theme/sections/projects.sass +++ b/assets/sass/_theme/sections/projects.sass @@ -1,21 +1,39 @@ .project @include article(auto) -.projects__section +.projects__section, +.projects_categories__term .projects @include grid(2, md) .projects__page - .document-content - min-height: 350px - // Add after element to avoid "min-height" to ignore the last block's margin-bottom - &::after - content: '' - display: block - height: 1px - &:not(.full-width) - .project-sidebar - @include sidebar + .hero + .content + align-items: stretch + .hero-text + display: flex + flex-direction: column + gap: $spacing-3 + @include media-breakpoint-up(sm) + .hero + .project-infos + width: columns(8) + @include media-breakpoint-up(md) + .hero + .project-infos + width: columns(6) + @include media-breakpoint-up(desktop) + .hero + .content + align-items: stretch + .hero-text + justify-content: space-between + gap: $spacing-5 + width: columns(6) + .project-infos + width: columns(4) + figure + width: columns(6) .project-infos - @include section__page-infos + @include section__page-infos \ No newline at end of file diff --git a/layouts/events/single.html b/layouts/events/single.html index f1c4debe5ba46368453b5b81f8d8c7e0c242af38..ce11f636202c46779b48340edc07546781baa3e5 100644 --- a/layouts/events/single.html +++ b/layouts/events/single.html @@ -4,8 +4,7 @@ <div class="document-content" itemscope itemtype="https://schema.org/Event"> <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> <meta itemprop="url" content="{{ .Permalink }}"> - {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} - {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} + {{ with .Params.summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} {{ partial "events/sidebar.html" . }} diff --git a/layouts/partials/header/hero.html b/layouts/partials/header/hero.html index 35b8a46b6c24476b65c71cbd2dc00f28a1609bf4..6502a11031969532c00893dc8e088afc69943aa2 100644 --- a/layouts/partials/header/hero.html +++ b/layouts/partials/header/hero.html @@ -43,6 +43,10 @@ <a href="{{ .target }}" class="btn">{{ .label }}</a> {{ end }} {{ end }} + + {{ if .hero_text_complement }} + {{ partial .hero_text_complement .context }} + {{ end }} </div> {{ if .image }} diff --git a/layouts/partials/projects/hero-single.html b/layouts/partials/projects/hero-single.html index 069f17d13c0fd389d0f436f49ae7dee670d62d2c..e8bfe9f6240f203385fe3b598991974813037fd0 100644 --- a/layouts/partials/projects/hero-single.html +++ b/layouts/partials/projects/hero-single.html @@ -4,5 +4,6 @@ "title" $title "image" .Params.image "sizes" site.Params.image_sizes.sections.projects.hero_single + "hero_text_complement" "projects/project-infos.html" "context" . ) -}} diff --git a/layouts/partials/projects/project.html b/layouts/partials/projects/project.html index 358db0108bdec2ec72b1837609091c574650247a..de3995903122380a53382f5520efade68934ce48 100644 --- a/layouts/partials/projects/project.html +++ b/layouts/partials/projects/project.html @@ -7,23 +7,21 @@ {{ with $project }} -<article class="project" itemscope itemtype="https://schema.org/Project"> +<article class="project" itemscope itemtype="https://schema.org/CreativeWork"> <div class="project-content"> {{- $title := partial "PrepareHTML" .Title -}} {{ $heading_tag.open }} - <a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a> + <a href="{{ .Permalink }}" itemprop="url" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a> {{ $heading_tag.close }} - {{ if site.Params.projects.index.show_description }} - {{- if partial "GetTextFromHTML" .Params.summary -}} - <p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict - "text" .Params.summary - "length" site.Params.projects.index.truncate_description - ) }}</p> - {{- end -}} - {{- end -}} + {{ if and site.Params.projects.index.show_description (partial "GetTextFromHTML" .Params.summary) }} + <p itemprop="abstract">{{ partial "GetTruncateContent" ( dict + "text" .Params.summary + "length" site.Params.projects.index.truncate_description + ) }}</p> + {{ end }} {{ if site.Params.projects.index.show_categories }} {{- partial "projects/categories" . -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 5523950f11e3c1ff4e8a53d5aa63400e7ccabc66..d37649dfa59ca5c2ea16fd6cdcda0d4f0eaa11a0 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -6,7 +6,6 @@ <meta itemprop="url" content="{{ .Permalink }}"> {{ with .Date }}<meta itemprop="datePublished" content="{{ .Format "2006-01-02T15:04" }}">{{ end }} {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} - {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} {{ partial "posts/sidebar.html" . }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html index bb9a7ed5fe773ad0da374a759700f4a77f50652a..05484c8bc2884bbf5837c6373ecf5da2df02eecf 100644 --- a/layouts/projects/single.html +++ b/layouts/projects/single.html @@ -1,13 +1,10 @@ {{ define "main" }} {{ partial "projects/hero-single.html" . }} - <div class="document-content" itemscope itemtype="https://schema.org/Event"> + <div class="document-content" itemscope itemtype="https://schema.org/CreativeWork"> <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> <meta itemprop="url" content="{{ .Permalink }}"> - {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} - {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} - - {{ partial "projects/sidebar.html" . }} + {{ with .Params.summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} {{ partial "projects/summary.html" (dict "context" .