From cb007fe8883651ae05fc9706f65721dec8447f25 Mon Sep 17 00:00:00 2001 From: Olivia206 Date: Thu, 13 Nov 2025 11:14:53 +0100 Subject: [PATCH 1/2] added 'icons' option to feature block template and style --- assets/sass/_theme/blocks/features.sass | 23 +++++++++++-------- .../partials/blocks/templates/features.html | 5 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/assets/sass/_theme/blocks/features.sass b/assets/sass/_theme/blocks/features.sass index 2470b9d0b..f7aa6af29 100644 --- a/assets/sass/_theme/blocks/features.sass +++ b/assets/sass/_theme/blocks/features.sass @@ -11,25 +11,28 @@ figure order: -1 margin-bottom: $spacing-3 - picture - img - margin: auto - picture:not(.is-png, .is-svg) - img - object-fit: cover - width: 100% - aspect-ratio: 16/9 + img + margin: auto figcaption @include meta margin-top: $spacing-2 text-align: right - picture.is-png + + &:where(:not(.media--icon)) + img + aspect-ratio: 16/9 + object-fit: cover + width: 100% + + &.media--icon padding-top: $spacing-3 img margin: initial max-width: $block-features-icon-max-width + @include media-breakpoint-down(desktop) margin-bottom: $spacing-2 + @include in-page-with-sidebar li flex-direction: row @@ -37,7 +40,7 @@ width: columns(2) flex-shrink: 0 margin-right: var(--grid-gutter) - picture.is-png + &.media--icon img margin: auto diff --git a/layouts/partials/blocks/templates/features.html b/layouts/partials/blocks/templates/features.html index e70d5bb43..393f539c0 100644 --- a/layouts/partials/blocks/templates/features.html +++ b/layouts/partials/blocks/templates/features.html @@ -2,7 +2,8 @@ {{- $block_class := partial "GetBlockClass" .block -}} {{- with .block.data -}} - {{- $features := .elements }} + {{ $features := .elements }} + {{ $options := .options }}
@@ -29,7 +30,7 @@
{{ end }} {{- if .image -}} -
+
{{- partial "commons/image.html" (dict "image" .image From babd47c7997ea28cf3358b5369e2691b997f2d4e Mon Sep 17 00:00:00 2001 From: Olivia206 Date: Thu, 20 Nov 2025 12:09:39 +0100 Subject: [PATCH 2/2] added media class --- layouts/partials/blocks/templates/features.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/blocks/templates/features.html b/layouts/partials/blocks/templates/features.html index 393f539c0..a8f7abcbc 100644 --- a/layouts/partials/blocks/templates/features.html +++ b/layouts/partials/blocks/templates/features.html @@ -30,7 +30,7 @@
{{ end }} {{- if .image -}} -
+
{{- partial "commons/image.html" (dict "image" .image