Skip to content

Commit

Permalink
Merge pull request #1109 from City-of-Helsinki/UHF-10771
Browse files Browse the repository at this point in the history
UHF-10771
  • Loading branch information
jeremysteerio authored Nov 28, 2024
2 parents d4e413a + 460947b commit eb3b0e2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/css/styles.min.css

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions src/scss/06_components/paragraphs/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ $koro-height: 50px;
.hero .hds-button {
@include hds-button-colors-on-dark-bg;
}

.hero .hds-text-input__label {
color: $color-white;
}
}

/**
Expand Down Expand Up @@ -395,3 +399,29 @@ $koro-height: 50px;
.hero--with-search .helfi-search__form .hds-text-input__label {
color: inherit;
}

.hero--with-helsinki-near-you {
.hero__container {
@include breakpoint($breakpoint-l) {
padding-top: $spacing-triple;
}
}

.hero__text-content {
max-width: $content-width-max;
}

.helfi-helsinki-near-you__form {
margin-top: $spacing-double;

.form-item {
margin-bottom: 0;
}
}

.helfi-search__submit-button {
margin-top: $spacing-and-half;
max-width: 280px;
width: 100%;
}
}
8 changes: 7 additions & 1 deletion templates/component/hero.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
{% set design_class = "hero--without-image-left" %}
{% elseif design == "with-search" %}
{% set design_class = "hero--with-search" %}
{% elseif design == "with-helsinki-near-you" %}
{% set design_class = "hero--with-helsinki-near-you" %}
{% endif %}


Expand All @@ -49,7 +51,7 @@
<h1 class="hero__title hyphenate" aria-labelledby="page_title">{{ title }}</h1>
<span class="is-hidden" id="page_title">{{ title }}</span>

{% if design == "with-search"%}
{% if design == "with-search" %}
{% include "@hdbt/component/helfi-search-form.twig" with {
label: 'What are you looking for?'|t({}, {'context': 'Header and hero search label'}),
search_id: 'hero',
Expand All @@ -71,6 +73,10 @@
{% endif %}
{% endif %}

{% if form %}
{{ form }}
{% endif %}

{% if published_time|render|striptags|trim is not empty and html_published_time|render|striptags|trim is not empty %}
<div class="hero__publish-information">
<span class="visually-hidden">{{ 'Published'|t({}, {'context': 'The helper text before the news article published timestamp'}) }}</span>
Expand Down

0 comments on commit eb3b0e2

Please sign in to comment.