From 20b0397da1fa9ce5292e569fc6be9e2b49a84a74 Mon Sep 17 00:00:00 2001 From: jmiras Date: Fri, 6 Sep 2024 15:52:00 +0800 Subject: [PATCH] refactor scss boldHeadline --- assets/theme/styles/blocks/advanced-text.scss | 8 ++++++-- assets/theme/styles/blocks/form.scss | 1 - assets/theme/styles/blocks/hero.scss | 7 ++----- assets/theme/styles/blocks/nag-screen.scss | 4 ++-- assets/theme/styles/core/mixins.scss | 2 +- assets/theme/styles/theme/theme.scss | 2 -- templates/theme/block/advanced-text.html.twig | 2 +- templates/theme/block/form.html.twig | 2 +- templates/theme/block/hero.html.twig | 2 +- templates/theme/block/nag-screen.html.twig | 2 +- 10 files changed, 15 insertions(+), 17 deletions(-) diff --git a/assets/theme/styles/blocks/advanced-text.scss b/assets/theme/styles/blocks/advanced-text.scss index 494c26a..6b91970 100644 --- a/assets/theme/styles/blocks/advanced-text.scss +++ b/assets/theme/styles/blocks/advanced-text.scss @@ -6,8 +6,8 @@ .copy{font-weight: 700;font-size: 2.4rem;line-height: 1.33em} } .headline-breaker{grid-column: 2 / span 4; - .headline{@include boldHeadline;text-transform: uppercase} - } + .boldHeadline{@include typoHeadline;} + } .one-column {grid-column: 1 /span 3; } .one-column-wide {display: flex;flex-direction: column; @@ -19,4 +19,8 @@ .two-column-btn {margin-left: auto} } } + .theme-headline{ + font-size: 2.4rem; + line-height: 1.33em; + } } diff --git a/assets/theme/styles/blocks/form.scss b/assets/theme/styles/blocks/form.scss index 386f579..a1c5a97 100644 --- a/assets/theme/styles/blocks/form.scss +++ b/assets/theme/styles/blocks/form.scss @@ -1,7 +1,6 @@ .block-form { .form-grid {display: grid;grid-template-columns: repeat(6, 1fr);grid-gap: 51px; .text-container {grid-column: 2 / span 4; - .headline {color: $textColor3;@include boldHeadline()} .text {margin-top: 30px;text-transform: capitalize;font-size: 1.6rem;line-height: 1.25em} } .form {grid-column: 2 / span 4; diff --git a/assets/theme/styles/blocks/hero.scss b/assets/theme/styles/blocks/hero.scss index bfac98c..eafc8bc 100644 --- a/assets/theme/styles/blocks/hero.scss +++ b/assets/theme/styles/blocks/hero.scss @@ -23,7 +23,7 @@ .hero-black-text-container { display: flex;flex-direction: column;align-items: center; padding: 49px 0 0; - .headline {color: $textColor1;} + .theme-headline {color: $textColor1;} .overline {color: $textColor1;} .copy { width: 45%; @@ -41,8 +41,5 @@ width: 50%; } } - .headline { - padding: 10px 0 15px 0; - @include boldHeadline(); - } + .padding {padding: 10px 0 15px 0;} } \ No newline at end of file diff --git a/assets/theme/styles/blocks/nag-screen.scss b/assets/theme/styles/blocks/nag-screen.scss index 374d861..9d69a89 100644 --- a/assets/theme/styles/blocks/nag-screen.scss +++ b/assets/theme/styles/blocks/nag-screen.scss @@ -29,8 +29,8 @@ .headline { width: 30%; margin-top: 10px; - text-align: center;text-transform: uppercase; - @include boldHeadline();} + text-align: center; + } .copy {margin-top: 25px;text-align: center;width: 62%;} } } \ No newline at end of file diff --git a/assets/theme/styles/core/mixins.scss b/assets/theme/styles/core/mixins.scss index f83d496..cdba8dc 100644 --- a/assets/theme/styles/core/mixins.scss +++ b/assets/theme/styles/core/mixins.scss @@ -1,5 +1,5 @@ -@mixin boldHeadline{font-size: 5rem;line-height: 1.28em;font-weight: $fontWeight;} @mixin typoHeadline{font-size:$fontSizeHeadline1;color: $textColor3;font-family: $fontFamily1; line-height: $lineHeightHeadline1;font-weight: $fontWeight; letter-spacing: 0.45px; text-transform: uppercase; + &.boldHeadline{font-size: 5rem;line-height: 1.28em;font-weight: $fontWeight;text-transform: uppercase;} &.padding{padding: 5px 0 15px;} } @mixin typoOverline{font-size:$fontSizeOverline;color: $textColor3;font-family: $fontFamily1; line-height: $lineHeightOverline;font-weight: $fontWeight; letter-spacing: 0.375px; text-transform: uppercase;} diff --git a/assets/theme/styles/theme/theme.scss b/assets/theme/styles/theme/theme.scss index 4f3fa46..617de1d 100644 --- a/assets/theme/styles/theme/theme.scss +++ b/assets/theme/styles/theme/theme.scss @@ -26,8 +26,6 @@ body{padding-top: 123px;background: white;margin: 0;color: #000;font-family: "Op } } .sub-menu { - //background: black; - //position: absolute; display: none; top: calc(100% + 0.25rem); left: 0; diff --git a/templates/theme/block/advanced-text.html.twig b/templates/theme/block/advanced-text.html.twig index 003f49d..8063d63 100644 --- a/templates/theme/block/advanced-text.html.twig +++ b/templates/theme/block/advanced-text.html.twig @@ -3,7 +3,7 @@
{{ block.overline|html_sanitize }}
-
{{ block.headline|html_sanitize }}
+
{{ block.headline|html_sanitize }}
{% if block.copy is iterable %} {% for text in block.copy %} diff --git a/templates/theme/block/form.html.twig b/templates/theme/block/form.html.twig index 02da918..058dede 100644 --- a/templates/theme/block/form.html.twig +++ b/templates/theme/block/form.html.twig @@ -2,7 +2,7 @@
-
{{ block.headline|html_sanitize }}
+
{{ block.headline|html_sanitize }}
{{ block.overline|html_sanitize }}
{{ block.text|html_sanitize }}
diff --git a/templates/theme/block/hero.html.twig b/templates/theme/block/hero.html.twig index 2a71bb4..69dc136 100644 --- a/templates/theme/block/hero.html.twig +++ b/templates/theme/block/hero.html.twig @@ -6,7 +6,7 @@
{{ block.overline|html_sanitize }}
-
{{ block.headline|html_sanitize }}
+
{{ block.headline|html_sanitize }}
{{ block.copy|html_sanitize }}
{% if block.ctaTitle and block.ctaLink is not null %}
diff --git a/templates/theme/block/nag-screen.html.twig b/templates/theme/block/nag-screen.html.twig index 74edf16..cc57f83 100644 --- a/templates/theme/block/nag-screen.html.twig +++ b/templates/theme/block/nag-screen.html.twig @@ -7,7 +7,7 @@
{{ block.overline|html_sanitize }}
-
{{ block.headline|html_sanitize }}
+
{{ block.headline|html_sanitize }}
{{ block.copy|html_sanitize }}