summary refs log tree commit diff stats
path: root/src/themes/serene/templates/macros/collection.html
blob: 796eae104f5e836e13a57cd8960a25cfbbd7aa22 (plain) (blame)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{% macro card(item) %}
<blockquote class="collection card{% if item.featured %} featured{% endif %}">
  <div class="meta">
    {% if item.icon %}
    <div class="icon-wrapper">
      <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16">
    </div>
    {% endif %}
    {% if item.link %}
    <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener">{{ item.title }}</a>
    {% else %}
    <div class="title">{{ item.title }}</div>
    {% endif %}
    {% if item.date %}
    <div class="date">{{ item.date }}</div>
    {% endif %}
  </div>
  {% if item.subtitle %}
    <div class="subtitle">{{ item.subtitle }}</div>
  {% endif %}
  <div class="content">{{ item.content | trim | markdown | safe }}</div>
  {% if item.tags %}
  <div class="tags">
    {% for tag in item.tags %}
    <div><span>#</span>{{ tag }}</div>
    {% endfor %}
  </div>
  {% endif %}
</blockquote>
{% endmacro %}


{% macro card_simple(item) %}
<blockquote class="collection card-simple{% if item.featured %} featured{% endif %}">
  <div class="meta">
    {% if item.icon %}
    <div class="icon-wrapper">
      <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16">
    </div>
    {% endif %}
    {% if item.link %}
    <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener">{{ item.title }}</a>
    {% else %}
    <div class="title">{{ item.title }}</div>
    {% endif %}
    <div class="content">{{ item.content | trim | markdown | safe }}</div>
    {% if item.date %}
    <div class="date">{{ item.date }}</div>
    {% endif %}
  </div>
  <div class="content-narrow">{{ item.content | trim | markdown | safe }}</div>
</blockquote>
{% endmacro %}


{% macro entry(item) %}
{% if item.link %}
<a href="{{ item.link }}" target="_blank" rel="noreferrer noopener" class="collection entry">
{% else %}
<blockquote class="collection entry">
{% endif %}
  {% if item.icon %}
  <div class="icon-wrapper">
    <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16" />
  </div>
  {% endif %}
  {% if item.title or item.subtitle %}
  <div class="text">
    {% if item.title %}
    <div class="title">{{ item.title }}</div>
    {% endif %}
    {% if item.subtitle %}
    <div class="subtitle">{{ item.subtitle }}</div>
    {% endif %}
  </div>
  {% endif %}
{% if item.link %}
</a>
{% else %}
</blockquote>
{% endif %}
{% endmacro %}


{% macro box(item) %}
<div class="collection-box-wrapper">
{% if item.link %}
<a href="{{ item.link }}" target="_blank" rel="noreferrer noopener" class="collection box">
{% else %}
<blockquote class="collection box">
{% endif %}
  <div class="text">
    <div class="title">{{ item.title }}</div>
    {% if item.subtitle %}
    <div class="subtitle">{{ item.subtitle }}</div>
    {% endif %}
  </div>
  {% if item.img %}
    <img class="no-lightense{% if item.rotate %} rotate{% endif %}" src="{{ item.img }}" alt="{{ item.title }}" width="48" height="48" />
    {% else %}
    <div class="placehold"></div>
    {% endif %}
{% if item.link %}
</a>
{% else %}
</blockquote>
{% endif %}
</div>
{% endmacro %}


{% macro art(item) %}
<blockquote class="collection art">
  <div class="img-wrapper">
    <img src="{{ item.img }}" alt="{{ item.title }}" height="175">
  </div>
  <div class="text">
    {% if item.link %}
    <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener" >{{ item.title }}</a>
    {% else %}
    <div class="title">{{ item.title }}</div>
    {% endif %}
    {% if item.subtitle %}
    <div class="subtitle">{{ item.subtitle }}</div>
    {% endif %}
    {% if item.content %}
    <div class="content">{{ item.content }}</div>
    {% endif %}
    {% if item.footer %}
    <div class="footer">{{ item.footer }}</div>
    {% endif %}
  </div>
</blockquote>
{% endmacro %}


{% macro art_simple(item) %}
<blockquote class="collection art-simple">
  <div class="img-wrapper">
    <img src="{{ item.img }}" alt="{{ item.title }}" height="175">
  </div>
  <div class="text">
    {% if item.link %}
    <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener" >{{ item.title }}</a>
    {% else %}
    <div class="title">{{ item.title }}</div>
    {% endif %}
    {% if item.subtitle %}
      <div class="subtitle">{{ item.subtitle }}</div>
    {% endif %}
  </div>
</blockquote>
{% endmacro %}