Skip to content
Snippets Groups Projects
Commit cc340963 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5195: updating banners to work

parent 17b4f910
No related branches found
No related tags found
1 merge request!118Feature/istwcms 5195 ebremner node theming
{% embed '@layouts/carousel/carousel.twig' %}
{% block content %}
{% include '@components/card/card--banner/card--banner.twig' with {
banners: banners,
'banners': banners,
} %}
{% endblock %}
{% endembed %}
\ No newline at end of file
{% endembed %}
......@@ -49,9 +49,6 @@ $faculties: 'org-default', 'org-ahs', 'org-art', 'org-eng', 'org-env', 'org-mat'
position:relative;
}
.card__content{
display:none;
}
.card__header {
bottom: 0;
......
{% for image in banners.images %}
{% include '@components/card/card.twig' with {
sources: image.sources,
img_element: image.img_element,
alt: image.alt,
card_type: 'banner',
title: image.big_text,
sub_title: image.small_text,
url: image.link,
'banner': image,
'show_header': 'no',
'type': 'banner',
} %}
{% endfor %}
{% if image.big_text or image.small_text %}
<div class="card__header">
{% if image.big_text %}
<div class="card__title">
{{ image.big_text }}
</div>
{% endif %}
{% if image.small_text %}
<span class="sub-title">
{{ image.small_text }}
</span>
{% endif %}
</div>
{% endif %}
<div class="card__banner">
{% if image.url %}
<a href="{{ image.url }}">
{% endif %}
{% include "@components/responsive-image/responsive-image.twig" with {
sources: image.sources,
img_element: listing_image.img_element,
alt: listing_image.alt
}%}
{% if url %}
</a>
{% endif %}
</div>
......@@ -7,6 +7,10 @@
{% endif %}
{% endif %}
{% if show_header is null %}
{% set show_header = 'yes' %}
{% endif %}
<article class="card {{ modifier_classes }} {% if show_hover %} card--show-hover {% endif %} {{ type }}" >
{% if hero_image %}
......@@ -16,10 +20,13 @@
{% endif %}
<div class="card__body">
{% include '@components/card/card-elements/_header.twig' with {
'header': header,
'show_title': show_title
} %}
{% if show_header == 'yes' %}
{% include '@components/card/card-elements/_header.twig' with {
'header': header,
'show_title': show_title
} %}
{% endif %}
{% if listing_image %}
{% include '@components/card/card-elements/_listing-image.twig' with {
......@@ -27,10 +34,10 @@
} %}
{% endif %}
{% if image and not card_type == 'banner' %}
<div class="card__image">
<img src="{{ image }}" alt="{{ alt }}" />
</div>
{% if banner %}
{% include '@components/card/card-elements/_banner.twig' with {
'banner': banner
} %}
{% endif %}
{% if content %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment