diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 57a9d2aea52d2f4a9a400ed94147b0727eacc97f..b0abc58c1a568c5e10a90261b31909fc3be10276 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -336,8 +336,6 @@ $article-media-aspect-ratio: 2 !default $post-media-background: $article-media-background !default $post-categories-color: color-contrast($color-text, 20%) !default $post-time-color: $color-text-alt !default -// Layout posts list (ne concerne pas les blocks posts) -$posts-layout-list: true !default // Si layout posts grid (ne concerne pas les blocks posts) $posts-grid-columns: $block-posts-grid-columns !default diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index 48a556b9ba4a3130037e71b98b4a9fa67c5530eb..2e8688af9278fa2ff4b7fe12f32ab6e4d65b9aee 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -20,54 +20,52 @@ .authors__term, .categories__term, .persons__page - @if $posts-layout-list - .posts - article - border-bottom: 1px solid $color-border - display: flex - margin-bottom: $spacing1 - padding-bottom: $spacing1 - flex-direction: row - h1 + p - margin-top: $spacing0 - @include media-breakpoint-up(desktop) - @include grid - margin-bottom: $spacing3 - padding-bottom: $spacing3 - div:not(.media) - grid-column: 4/13 - @include media-breakpoint-down(desktop) - flex: 1 - margin-left: $spacing0 - p:not(.title) - @include media-breakpoint-down(desktop) - display: none - .media - background: none - margin: 0 + + .posts--list + article + border-bottom: 1px solid $color-border + display: flex + margin-bottom: $spacing1 + padding-bottom: $spacing1 + flex-direction: row + h1 + p + margin-top: $spacing0 + @include media-breakpoint-up(desktop) + @include grid + margin-bottom: $spacing3 + padding-bottom: $spacing3 + div:not(.media) + grid-column: 4/13 + @include media-breakpoint-down(desktop) + flex: 1 + margin-left: $spacing0 + p:not(.title) @include media-breakpoint-down(desktop) - width: 33.33333% - @include media-breakpoint-up(desktop) - grid-column: 1/4 - &, img - aspect-ratio: auto + display: none + .media + background: none + margin: 0 + @include media-breakpoint-down(desktop) + width: 33.33333% @include media-breakpoint-up(desktop) - time - font-size: $h5-size - position: absolute - right: 0 - top: 0 - div:not(.media) - h1, - p, - a - max-width: col(6, 9) - - @else - .posts - @include grid(1) - @include grid(2, desktop) - @include grid($posts-grid-columns, xxl) + grid-column: 1/4 + &, img + aspect-ratio: auto + @include media-breakpoint-up(desktop) + time + font-size: $h5-size + position: absolute + right: 0 + top: 0 + div:not(.media) + h1, + p, + a + max-width: col(6, 9) + .posts--grid + @include grid(1) + @include grid(2, desktop) + @include grid($posts-grid-columns, xxl) .posts__page @include media-breakpoint-down(desktop) diff --git a/layouts/partials/posts/posts.html b/layouts/partials/posts/posts.html index 7a0a4cfda055f218e77bd5b1d144bebcca1550a8..0dd9340c6dde4de13fcac1b4beda6444411d764f 100644 --- a/layouts/partials/posts/posts.html +++ b/layouts/partials/posts/posts.html @@ -1,4 +1,4 @@ -<div class="posts"> +<div class="posts posts--{{- site.Params.posts.index.layout -}}"> {{ if not .Pages }} <p>{{ i18n "categories.no_post" }}</p> {{ end }}