-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathparagraph--list-of-plans.html.twig
66 lines (54 loc) · 2.11 KB
/
paragraph--list-of-plans.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with
{
component_classes: [
'component--full-width',
'component--list-of-plans'
],
component_title: title,
component_description: description,
component_content_class: 'list-of-plans',
}
%}
{% block component_content %}
<div class="list-of-plans__count-container">
{{ '<span class="list-of-plans__count">@plan_count</span> plans now available for comments'|t({ '@plan_count': plan_count }, {'context': 'List of plans number of comments'}) }}
</div>
{% if plan_count == 0 %}
<p>{{ 'There are new plans coming up, so please check back later.'|t({}, {'context': 'List of plans no plans description'}) }}</p>
{% else %}
<div class="list-of-plans__list">
{% for plan in plans %}
<div class="list-of-plans__plan plan">
<h3 class="plan__title">
{% set link_attributes = {
'class': [
'plan__link',
],
} %}
{{ link(plan.title, plan.link, link_attributes) }}
</h3>
<div class="plan__published">
{{ 'Published:'|t({}, {'context': 'List of plans publish date'}) }}
{{ plan.pub_date }}
</div>
</div>
{% endfor %}
{% if plan_count > 8 %}
<div class="list-of-plans__pager">
<a href="#" class="hds-button hds-button--primary list-of-plans__pager-button" rel="next">
<span class="hds-button__label">{{ 'Show more plans'|t({}, {'context': 'List of plans show more button'}) }}</span>
</a>
</div>
{% endif %}
</div>
{% endif %}
<div class="list-of-plans__subscribe-link">
{% set link_title %}
{{ 'Subscribe to the plans\' RSS feed'|t({}, {'context': 'List of plans RSS link'}) }}
{% endset %}
{{ link(link_title, rss_feed_url) }}
</div>
{% endblock component_content %}
{% endembed %}
{% endblock paragraph %}