Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update _hero.scss #513

Merged
merged 2 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/scss/components/hero/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $_su-hero-height: (
background: $su-color-black;
height: 100%;
width: 100%;
overflow: hidden;

@include grid-media('md') {
min-height: map-get($_su-hero-height, 'md');
Expand Down
11 changes: 9 additions & 2 deletions core/src/templates/components/hero/hero.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
{{ hero_image}}
{% endif %}
</div>

{# Only include the card template if there is content to render. #}
{%- if
hero_super_headline is not empty or
hero_headline is not empty or
hero_body is not empty or
hero_cta_label is not empty or
hero_button_label is not empty
-%}
{# We reuse the card component here. #}
{% include template_path_card with
{
Expand All @@ -59,5 +66,5 @@
}
only
%}

{%- endif -%}
</div>