diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index a7d7fc1cc0c697e07ef5ce47916aee6307cc75bc..b90f5be75ec412b9b5da5aee77b711e8265954af 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -215,6 +215,9 @@ $program-share-font-size: $h5-size !default $program-share-font-size-md: $h5-size-md !default $program-zindex-toc: $zindex-toc !default +// Layout posts list +$posts-list-horizontal: false !default + // MISC // Animations diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index 41f38254b47b2618bedc1b1f2d70e1d95662f353..e095fb63c07dcd62787f4461151055dab6d5827e 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -199,3 +199,26 @@ @include icon($icon, after) font-size: px2rem(20) margin-left: px2rem(10) + + +@mixin layout-posts + @if $posts-list-horizontal + .posts + @include grid(1) + grid-gap: 0 + > div + border-bottom: 1px solid $main-border-color + margin-bottom: $spacing3 + padding-bottom: $spacing3 + .post + @include grid(4, md) + flex-direction: row + div:first-child + width: col(24) + time + font-size: $h5-size + position: absolute + right: 0 + top: 0 + .media + margin: 0 \ No newline at end of file diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index 565480f01a977c74187cdfa341e7f0bb7b25c267..63ab64dbe73ac77086a896923988cf2fd1ec66bd 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -15,9 +15,14 @@ font-size: px2rem(14) .posts - @include grid(1) - @include grid(2, md) - @include grid(3, xl) + @include grid(1) + @include grid(2, md) + @include grid(3, xl) + +.posts__section + @include layout-posts + .hero + margin-bottom: $spacing4 .post-categories @include list-reset