-
Notifications
You must be signed in to change notification settings - Fork 22
/
card.twig
88 lines (75 loc) · 1.92 KB
/
card.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{#
/**
* @file
* Bootstrap v4 Card.
*
* @see http://v4-alpha.getbootstrap.com/components/card/
*/
#}
<{{ element ?: "div" }}{{ attributes.addClass(classes) }}>
{% if card_header %}
{% block card_header %}
<div class="card-header">
{{ card_header }}
</div>
{% endblock %}
{% endif %}
{% if card_image_top %}
{% block card_image_top %}
<img class="card-img-top" src="{{ image_medium }}" />
{% endblock %}
{% endif %}
<div class="card-block">
{% block card_title %}
<h4 class="card-title">
<a href="{{ url }}" rel="bookmark">{{ title }}</a>
</h4>
{% endblock %}
{% if card_text %}
{% block card_text %}
<p class="card-text">{{ snippet }}</p>
{% endblock %}
{% endif %}
{% if card_links %}
{% block card_links %}
<p class="card-text">
<a href="{{ url }}" class="card-link">{{ read_more }}</a>
</p>
{% endblock %}
{% endif %}
{% if card_buttons %}
{% block card_buttons %}
<p class="card-text">
<a href="{{ url }}" class="btn btn-primary">{{ read_more }}</a>
</p>
{% endblock %}
{% endif %}
</div>
{% if card_list %}
{% block card_list %}
<ul class="list-group list-group-flush">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
{% endblock %}
{% endif %}
{% if card_image_bottom %}
{% block card_image_bottom %}
<img class="card-img-bottom" src="{{ image_medium }}" />
{% endblock %}
{% endif %}
{% if card_footer %}
{% block card_footer %}
<div class="card-footer text-muted">
{{ card_footer }}
</div>
{% endblock %}
{% endif %}
</{{ element ?: "div" }}>
{# @todo remove this #}
<style>
.card {
max-width: 568px;
}
</style>