From df4d775cfca3e251c1bc086ec62e3f66991b302a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20V=C3=A4nttinen?= Date: Tue, 7 Jan 2025 14:03:38 +0200 Subject: [PATCH] Style fixes --- assets/styles/layouts/_hero.scss | 10 +++- assets/styles/layouts/_image-carousel.scss | 8 ++- assets/styles/ui-components/_forms.scss | 55 +++++-------------- assets/styles/ui-components/_share-links.scss | 10 ---- assets/styles/views/_page.scss | 6 -- .../styles/views/_single-dynamic-event.scss | 6 -- assets/styles/views/_single.scss | 5 ++ lib/ThemeCustomizationController.php | 4 ++ partials/blocks/block-key-figures.dust | 2 +- partials/page-event.dust | 8 +-- partials/single-dynamic-event-cpt.dust | 31 +++++------ partials/single-manual-event-cpt.dust | 2 +- .../single-dynamic-event-hero-meta.dust | 11 +--- .../single-dynamic-event-hero.dust | 35 ++++++------ 14 files changed, 76 insertions(+), 117 deletions(-) diff --git a/assets/styles/layouts/_hero.scss b/assets/styles/layouts/_hero.scss index 4c79538..01f23d9 100644 --- a/assets/styles/layouts/_hero.scss +++ b/assets/styles/layouts/_hero.scss @@ -5,7 +5,7 @@ &__image-container { position: relative; - padding: 0 2rem; + padding: 0 1rem; grid-row: 1 / -1; grid-column: 1; @@ -15,6 +15,11 @@ border-radius: 1rem; } + + @include from($tablet) { + padding: 0 2rem; + } + @include from($desktop) { grid-column: 2; @@ -44,11 +49,12 @@ display: grid; grid-template-columns: 100%; grid-template-rows: repeat(5, 1fr); - margin-bottom: 10rem; + margin-bottom: 2rem; @include from($desktop) { grid-template-columns: 30% 40% 30%; grid-template-rows: repeat(2, 1fr); + margin-bottom: 10rem; } .hero-column { diff --git a/assets/styles/layouts/_image-carousel.scss b/assets/styles/layouts/_image-carousel.scss index f7d7862..5905f31 100644 --- a/assets/styles/layouts/_image-carousel.scss +++ b/assets/styles/layouts/_image-carousel.scss @@ -7,6 +7,10 @@ } } + &__items { + margin: 0 2rem; + } + &__item { .has-shape-round { display: inline-block; @@ -26,12 +30,12 @@ } .slick-prev { - left: 0.5rem; + left: 2.5rem; padding: 0 !important; } .slick-next { - right: 0.5rem; + right: 2.5rem; padding: 0 !important; } diff --git a/assets/styles/ui-components/_forms.scss b/assets/styles/ui-components/_forms.scss index 8f0bcf8..cf90370 100644 --- a/assets/styles/ui-components/_forms.scss +++ b/assets/styles/ui-components/_forms.scss @@ -11,7 +11,6 @@ form { } select { - background-color: $primary-invert; color: $primary; @include until($desktop) { @@ -29,10 +28,12 @@ select { padding: 0.8rem !important; } - button[type="submit"], - .gform_button_select_files { + .button { display: inline-flex; justify-content: space-between; + background-color: $color-savel-button !important; + border-color: $color-savel-button !important; + color: $white !important; &:after { content: ""; @@ -40,36 +41,21 @@ select { height: 1rem; display: block; margin-left: 1rem; - background-color: white; + background-color: $white; } &:hover, - &:focus { - &:after { - background-color: black; - } - } - + &.is-hovered, + &:focus, + &.is-focused, &:active { - &:after { - background-color: white; - } - } - } - - button[type="submit"] { - - &:after { - mask: url('data:image/svg+xml;utf8,'); - mask-size: cover; - mask-repeat: no-repeat; - mask-position: center; + background-color: $color-savel-button-hover !important; + border-color: $color-savel-button-hover !important; + color: $white !important; } } - .gform_button_select_files { - &:after { width: 1rem; height: 1rem; @@ -83,10 +69,12 @@ select { } .gfield_checkbox { - label { &::before { - margin-top: 0.25rem; + // margin-top: 0.25rem; + // checked bg blue + // ^^ sama radioille ja myös pienemmäks valkonen keskipalkki? + // dropdown tekstin color väärä } } } @@ -105,19 +93,6 @@ select { border: 0.125rem dashed $black; } -.gform_button_select_files, -.gform_delete_file { - - &:hover, - &:focus { - border-color: $black !important; - background-color: $white !important; - color: $color-tekstin-vari !important; - outline: 0.125rem dotted $black !important; - outline-offset: 0.25rem !important; - } -} - .gform_delete_file { padding: 0.5rem; margin-right: 0.5rem; diff --git a/assets/styles/ui-components/_share-links.scss b/assets/styles/ui-components/_share-links.scss index 2f29bd2..8f6f4e0 100644 --- a/assets/styles/ui-components/_share-links.scss +++ b/assets/styles/ui-components/_share-links.scss @@ -29,13 +29,3 @@ fill: $link !important; } } - -.entry__share-links { - h2 { - text-align: right; - } - - .share-links { - justify-content: center; - } -} diff --git a/assets/styles/views/_page.scss b/assets/styles/views/_page.scss index b489338..1775da0 100644 --- a/assets/styles/views/_page.scss +++ b/assets/styles/views/_page.scss @@ -23,10 +23,4 @@ } } } - - .entry { - &__content { - // -- - } - } } diff --git a/assets/styles/views/_single-dynamic-event.scss b/assets/styles/views/_single-dynamic-event.scss index c8df828..46bfd29 100644 --- a/assets/styles/views/_single-dynamic-event.scss +++ b/assets/styles/views/_single-dynamic-event.scss @@ -1,12 +1,6 @@ .single-dynamic-event-cpt, .single-manual-event-cpt { .entry { - &__hero { - h1 { - color: $primary-invert !important; - } - } - &__hero-image { object-fit: cover; } diff --git a/assets/styles/views/_single.scss b/assets/styles/views/_single.scss index 43b1f41..8c4babc 100644 --- a/assets/styles/views/_single.scss +++ b/assets/styles/views/_single.scss @@ -1,4 +1,9 @@ .single-post { + + .main-content { + overflow-x: hidden; + } + .entry { &__share-links { h2 { diff --git a/lib/ThemeCustomizationController.php b/lib/ThemeCustomizationController.php index c884ed4..00de73d 100644 --- a/lib/ThemeCustomizationController.php +++ b/lib/ThemeCustomizationController.php @@ -54,6 +54,10 @@ public function hooks() : void { return $data; } ); + \add_filter( + 'tms/theme/event/hero_info_classes', + fn() => 'has-colors-primary' + ); } /** diff --git a/partials/blocks/block-key-figures.dust b/partials/blocks/block-key-figures.dust index 63c5a76..ab67de2 100644 --- a/partials/blocks/block-key-figures.dust +++ b/partials/blocks/block-key-figures.dust @@ -5,7 +5,7 @@
-
+
diff --git a/partials/page-event.dust b/partials/page-event.dust index 6b39632..4c75b99 100644 --- a/partials/page-event.dust +++ b/partials/page-event.dust @@ -44,14 +44,14 @@ {?event.normalized.short_description}

- {event.normalized.short_description|s} + {event.normalized.short_description|kses}

{/event.normalized.short_description}
- {event.normalized.description|s} + {event.normalized.description|kses}
@@ -60,11 +60,11 @@
{?share_links} -
+