From c0ca9ad98030a89c41ffe2ebaa3cf2b0fa59f355 Mon Sep 17 00:00:00 2001 From: sebousan <sebousan@gmail.com> Date: Thu, 28 Jul 2022 11:48:01 +0200 Subject: [PATCH] widget --- assets/sass/_theme/_configuration.sass | 5 +++- assets/sass/_theme/_utils.sass | 35 ++++++++++++++------------ assets/sass/_theme/sections/pages.sass | 26 +++++++++---------- assets/sass/_theme/sections/posts.sass | 6 ----- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index cb59a4aa..6d12f934 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -153,7 +153,10 @@ $block-testimonials-pagination-progress-background: $main-color !default $block-key_figures-number-font-size: px2rem(60) // Sections -$post-media-background: darken($main-background-color, 2) !default +$widget-media-background: darken($main-background-color, 2) !default +$widget-title-size: $h4-size !default + +$post-media-background: $widget-media-background !default $post-media-aspect-ratio: 50% !default $post-categories-color: lighten($main-color, 2) !default $post-time-color: lighten($main-color, 2) !default diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index 08b5b9b6..2ae7a649 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -120,6 +120,25 @@ right: 0 top: 0 +@mixin widget($background: null) + position: relative + display: flex + flex-direction: column + .media + @include aspect-ratio(2, 1, 'img', $background) + margin-bottom: $spacing1 + order: -1 + overflow: hidden + .title + font-size: $widget-title-size + margin-bottom: px2rem(5) + a + @include stretched-link + p + margin-bottom: 0 + margin-top: 0 + + @mixin visually-hidden clip: rect(0,0,0,0) !important border: 0 !important @@ -156,19 +175,3 @@ left: $left right: $right top: $top - - -@mixin widget($background: null) - position: relative - display: flex - flex-direction: column - .media - @include aspect-ratio(2, 1, 'img', $background) - margin-bottom: $spacing1 - order: -1 - overflow: hidden - a - @include stretched-link - p - margin-bottom: 0 - margin-top: 0 diff --git a/assets/sass/_theme/sections/pages.sass b/assets/sass/_theme/sections/pages.sass index f6693f53..15b99204 100644 --- a/assets/sass/_theme/sections/pages.sass +++ b/assets/sass/_theme/sections/pages.sass @@ -2,23 +2,23 @@ @include widget .title - @extend .h4 - margin-bottom: 0 + // @extend .h4 + // margin-bottom: 0 a @extend .link-more - font-size: px2rem(22) - line-height: px2rem(30) + // font-size: px2rem(22) + // line-height: px2rem(30) - & + p - margin-top: .5rem + // & + p + // margin-top: .5rem - & ~ .more - margin-top: auto - .more - @extend .small - text-decoration-line: underline - text-decoration-thickness: 1px - text-underline-offset: 3px + // & ~ .more + // margin-top: auto + // .more + // @extend .small + // text-decoration-line: underline + // text-decoration-thickness: 1px + // text-underline-offset: 3px .pages @include grid(2, md) diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index fc98bb33..3d024bc1 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -1,11 +1,5 @@ .post @include widget($post-media-background) - .media - // background: $post-media-background - // &::before - // content: "" - // display: block - // padding-top: $post-media-aspect-ratio .author, .post-categories -- GitLab