Overhaul card template for small cards
No paragraphs. Keep it simple. Ref #110
This commit is contained in:
parent
a562086680
commit
8205777a9e
1 changed files with 5 additions and 27 deletions
|
@ -72,35 +72,13 @@
|
||||||
#}
|
#}
|
||||||
|
|
||||||
<a class="card card-initiative is-blue" href="{{ url }}">
|
<a class="card card-initiative is-blue" href="{{ url }}">
|
||||||
|
<div class="card-image" style="background-image:url({{ content.field_image }})"></div>
|
||||||
{% set has_title_paragraph = false %}
|
<div class="card-content">
|
||||||
{% if content.field_body_paragraph %}
|
<h3 class="title">{{ label }}</h3>
|
||||||
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
|
<div class="subtitle">
|
||||||
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
|
|
||||||
{% set has_title_paragraph = true %}
|
|
||||||
{{ paragraph }}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if not has_title_paragraph %}
|
|
||||||
<div class="media-left">
|
|
||||||
{{ content.field_image }}
|
|
||||||
{% if node.bundle == 'blog' and content.field_authors is not empty %}
|
|
||||||
<p class="byline is-mono">
|
|
||||||
By {{ content.field_authors }}<br />
|
|
||||||
On {{ date }}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="media-content content">
|
|
||||||
<h3 class="title is-5">{{ label }}</h3>
|
|
||||||
<div class="subtitle is-6">
|
|
||||||
{{ content.field_summary }}
|
{{ content.field_summary }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<!-- Unexpected extra content -->
|
<!-- Unexpected extra content -->
|
||||||
{{ content|without('field_body_paragraph', 'field_authors', 'field_image', 'field_summary', 'uid', 'created') }}
|
{{ content|without('field_image', 'field_summary', 'uid', 'created') }}
|
||||||
|
|
Loading…
Reference in a new issue