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

ISTWCMS-5195: cleaning up node stuff to use new footer array

parent 439b5053
No related branches found
No related tags found
1 merge request!118Feature/istwcms 5195 ebremner node theming
......@@ -6,17 +6,13 @@
<div class="uw-node__{{ node_image_class }}">
{% include '@components/card/card.twig' with {
'url': node.url,
'type': type,
'show_hover': '',
'header': node.header,
'hero_image': node.hero_image,
'listing_image': node.listing_image,
'header': node.header,
'tags': node.tags,
'content': node.content,
'sources': node.image.sources,
'show_hover': '',
'url': node.url,
'additional_info': node.additional_info,
'location_info': node.location_info,
'tags': node.tags,
'footer': node.footer,
} %}
</div>
......@@ -27,6 +27,15 @@
{{ additional_info.cost }}
{% endif %}
{% if additional_info.tags %}
{% for key,tag in additional_info.tags %}
<span class="uw-label">{{ key }}:</span>
{% include "@components/tag-list/tag-list.twig" with {
items: tag
} %}
{% endfor %}
{% endif %}
{% endblock %}
{% endembed %}
</div>
{% set address = location_info.address %}
{% set map = location_info.map %}
{% set map_link = location_info.map_link %}
<div class="card__location">
{% embed '@components/details/details.twig' with {
is_open: TRUE,
......
......@@ -40,128 +40,105 @@
</div>
<div class="card__footer">
{{ footer }}
{% if footer %}
<div class="card__footer">
{% if additional_info %}
{% include '@components/card/card-elements/_additional-info.twig' with {
'additional_info': additional_info
} %}
{% endif %}
{% if contact_info %}
some include
{% endif %}
{% if link_profile or personal_webpage %}
<div class="card__contact-links">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Links
{% endblock %}
{% block details_content %}
{% if link_profile %}
<div class="card__link-profile">
<span class="uw-label">Link to Profile:</span>
<a href="{{ link_profile.uri }}">{{ link_profile.title }}</a>
{% if footer.additional_info %}
{% include '@components/card/card-elements/_additional-info.twig' with {
'additional_info': footer.additional_info
} %}
{% endif %}
{% if contact_info %}
some include
{% endif %}
{% if link_profile or personal_webpage %}
<div class="card__contact-links">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Links
{% endblock %}
{% block details_content %}
{% if link_profile %}
<div class="card__link-profile">
<span class="uw-label">Link to Profile:</span>
<a href="{{ link_profile.uri }}">{{ link_profile.title }}</a>
</div>
{% endif %}
{% if personal_webpage %}
<div class="card__personal-webpage">
<span class="uw-label">Link to personal webpage:</span>
<a href="{{ personal_webpage.uri }}">{{ personal_webpage.title }}</a>
</div>
{% endif %}
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if footer.location_info %}
{% include '@components/card/card-elements/_location-info.twig' with {
'location_info': footer.location_info
}%}
{% endif %}
{% if contact_for %}
<div class="card__contact-for">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Contact for
{% endblock %}
{% block details_content %}
<div class="card__contact-for-content">
{{ contact_for }}
</div>
{% endif %}
{% if personal_webpage %}
<div class="card__personal-webpage">
<span class="uw-label">Link to personal webpage:</span>
<a href="{{ personal_webpage.uri }}">{{ personal_webpage.title }}</a>
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if groups %}
<div class="card__groups">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Groups
{% endblock %}
{% block details_content %}
<div class="card__groups-list">
{% for group in groups %}
{% if loop.index0 > 0 %}
, {{ group.title }}
{% else %}
{{ group.title }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if location_info %}
{% include '@components/card/card-elements/_location-info.twig' with {
'address': location_info.address,
'map': location_info.map,
'map_link': location_info.map_link,
}%}
{% endif %}
{% if contact_for %}
<div class="card__contact-for">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Contact for
{% endblock %}
{% block details_content %}
<div class="card__contact-for-content">
{{ contact_for }}
</div>
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if groups %}
<div class="card__groups">
{% embed '@components/details/details.twig' %}
{% block details_summary %}
Groups
{% endblock %}
{% block details_content %}
<div class="card__groups-list">
{% for group in groups %}
{% if loop.index0 > 0 %}
, {{ group.title }}
{% else %}
{{ group.title }}
{% endif %}
{% endfor %}
</div>
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if catalog_tags %}
<div class="card__catalog-tags">
{% embed '@components/details/details.twig' with {
'is_open': TRUE,
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if footer.tags %}
{% include '@components/card/card-elements/_tags.twig' with {
'tags': footer.tags,
} %}
{% block details_summary %}
Additional Information
{% endblock %}
{% block details_content %}
{% for key, tag in catalog_tags %}
<div class="card__catalog-tags card__tags-{{ key }}">
<span class="uw-label">{{ key }}:</span>
{% include "@components/tag-list/tag-list.twig" with {
items: tag
} %}
</div>
{% endfor %}
{% endblock %}
{% endembed %}
{% endif %}
{% if tags %}
{% include '@components/card/card-elements/_tags.twig' with {
'tags': tags,
} %}
{% endif %}
{% if read_more and url %}
<div class="card__readmore">
{{ macros.readmore(url, title) }}
</div>
{% endif %}
{% if social_media %}
<div class="card__social {{ social_media_placement }}">
{% include "@components/menu/menu--social/menu--social.twig" %}
</div>
{% endif %}
</div>
{% endif %}
{% if read_more and url %}
<div class="card__readmore">
{{ macros.readmore(url, title) }}
</div>
{% endif %}
{% if social_media %}
<div class="card__social {{ social_media_placement }}">
{% include "@components/menu/menu--social/menu--social.twig" %}
</div>
{% endif %}
</div>
{% endif %}
</article>
{% import '@base/macros/uw.macro.twig' as macros %}
<ul class="tag-list {{ modifier_classes }}">
{% for item in items %}
<li class="tag-list__item {% if item.faculty %}{{ item.faculty }}{% endif %}">
......
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