git ssb

0+

Grey the earthling / gkn.me.uk



Tree: 7222b6b0d7d5b4564ab2f0d1b28ed8a1a81afda6

Files: 7222b6b0d7d5b4564ab2f0d1b28ed8a1a81afda6 / themes / ran / templates / article.html

4892 bytesRaw
1{%- extends "base.html" -%}
2{%- block title -%}{{- article.title | trim -}}{%- endblock -%}
3{%- block head -%}
4 {{- super() -}}
5 {%- for tag in article.tags -%}
6 {%- for anytag, articles in tags if
7 anytag == tag and
8 articles | list | length > 1 -%}
9 <link href="/entries/{{- tag.slug -}}/feed"
10 rel="alternate"
11 type="application/atom+xml"
12 title="{{ SITENAME }} - {{ tag }}">
13 {%- endfor -%}
14 {%- endfor -%}
15{% endblock %}
16{%- block pagedetails -%}
17 {%- for author in article.authors -%}
18 <address>
19 <span>by </span>
20 <a href="/{{- article.author.url -}}" rel="author">
21 {{- article.author | trim -}}
22 </a>
23 </address>
24 {%- endfor -%}
25 <p>
26 <time datetime="{{- article.date | strftime('%Y-%m-%d %H:%M') -}}">
27 {{- article.date | strftime(DATE_FORMAT_MINUTE) -}}
28 </time>
29 {%- if article.modified and
30 article.date | strftime(DATE_FORMAT_DAY) !=
31 article.modified | strftime(DATE_FORMAT_DAY) -%}
32 <span> / </span>
33 <time datetime="{{- article.modified |
34 strftime('%Y-%m-%d %H:%M') -}}">
35 {{- article.modified | strftime(DATE_FORMAT_MINUTE) -}}
36 </time>
37 {%- endif -%}
38 </p>
39 {%- if article.description -%}
40 <p>
41 <i>{{- article.description | trim -}}</i>
42 </p>
43 {%- endif -%}
44 {%- if article.small -%}
45 <p>
46 <small>{{- article.small | trim -}}</small>
47 </p>
48 {%- endif -%}
49 {# <!--XXX skip links --> #}
50{%- endblock -%}
51{%- block maincontentintro -%}
52 {%- if article.image -%}
53 <div class="image" style="
54 background-image: url('{{- article.image.filename -}}');
55 {%- if article.image.position -%}
56 background-position: {{
57 article.image.position
58 }};
59 {%- endif -%}
60 {%- if article.image.height -%}
61 height: {{
62 article.image.height
63 }};
64 {%- else -%}
65 height: 4rem;
66 {%- endif -%}
67 ">
68 </div>
69 {%- endif -%}
70{%- endblock -%}
71{%- block maincontent -%}
72 {{- article.content | trim -}}
73{%- endblock -%}
74{%- block main -%}
75 <article>
76 {{- super() -}}
77 {%- if article.links or article.related_posts -%}
78 {#- <!-- article.related_posts implies that
79 at least 1 tag also appears in another article. --> -#}
80 <footer>
81 {%- if article.links -%}
82 <ul class="biglinks">
83 {%- for link in article.links -%}
84 <li>
85 <a href="{{- link.url -}}">
86 <strong>{{- link.title | trim -}}</strong>
87 {%- if link.description -%}
88 <i>{{- link.description | trim -}}</i>
89 {%- endif -%}
90 </a>
91 </li>
92 {%- endfor -%}
93 </ul>
94 {%- endif -%}
95 {%- if article.related_posts -%}
96 {#- <!-- This implies that
97 at least 1 of this article's tags
98 also appears in another article.
99 --> -#}
100 <section class="smalllinks">
101 <h2>Labels:</h2>
102 <ul>
103 {%- for tag in article.tags -%}
104 {#- <!-- Loop through this article's tags, in order.
105 --> -#}
106 {%- for anytag, articles in tags if
107 anytag == tag and
108 articles | list | length > 1 -%}
109 {#- <!-- Loop through *all* tags;
110 find the tag we're considering.
111 Only display it if
112 it's applied to more than 1 article.
113 --> -#}
114 <li>
115 <a href="/entries/{{- tag.slug -}}">
116 {{- tag -}}
117 </a>
118 </li>
119 {%- endfor -%}
120 {%- endfor -%}
121 </ul>
122 <hr class="visuallyhidden">
123 </section>
124 {%- endif -%}
125 </footer>
126 {%- endif -%}
127 </article>
128{%- endblock -%}
129{%- block bottomnav -%}
130 {%- if article.related_posts -%}
131 <ul class="biglinks">
132 {%- for article in article.related_posts -%}
133 <li>
134 <a href="/{{- article.url -}}">
135 <strong>{{- article.title | trim -}}</strong>
136 {#- #} {# -#}
137 <time datetime="{{- article.date |
138 strftime('%Y-%m-%d %H:%M') -}}">
139 {{- article.date | strftime(DATE_FORMAT_DAY) -}}
140 </time>
141 {%- if article.description -%}
142 {#- #} {# -#}
143 <i>
144 {{- article.description | striptags -}}
145 </i>
146 {%- endif -%}
147 </a>
148 </li>
149 {%- endfor -%}
150 </ul>
151 {%- endif -%}
152 <nav class="nearby">
153 <ul>
154 {%- if article.prev_article -%}
155 <li>
156 <a href="/{{- article.prev_article.url -}}" rel="prev">
157 <span></span>
158 {{- article.prev_article.title | trim -}}
159 </a>
160 </li>
161 {%- endif -%}
162 <li>
163 <a href="/{{- article.date | strftime('%Y/%m/%d') -}}" rel="up">
164 <span></span>
165 {{- article.date | strftime(DATE_FORMAT_DAY) -}}
166 </a>
167 </li>
168 {%- if article.next_article -%}
169 <li>
170 <a href="/{{- article.next_article.url -}}" rel="next">
171 <span></span>
172 {{- article.next_article.title | trim -}}
173 </a>
174 </li>
175 {%- endif -%}
176 </ul>
177 </nav>
178 {{- super() -}}
179{%- endblock -%}
180
181

Built with git-ssb-web