]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/blog/modules/post.html
69f0a05edcd21cf1e7806af9d73aefe2ac321314
[ipfire.org.git] / src / templates / blog / modules / post.html
1 {% import ipfire.accounts as accounts %}
2
3 <div class="blog-post {% if "lightningwirelabs.com" in post.tags %}lightning-wire-labs{% end %}">
4 <div class="blog-header">
5 <h5 class="mb-0">
6 <a href="https://blog.ipfire.org/post/{{ post.slug }}">
7 {{ post.title }}
8 </a>
9 </h5>
10
11 <p class="small text-muted">
12 {{ _("by") }}
13
14 {% if isinstance(post.author, accounts.Account) %}
15 <a href="/authors/{{ post.author.uid }}">{{ post.author.name }}</a>
16 {% else %}
17 <strong>{{ post.author }}</strong>
18 {% end %},
19
20 {{ locale.format_date(post.published_at, shorter=True, relative=False) }}
21 </p>
22 </div>
23
24 <div class="blog-content">
25 {% raw post.html %}
26 </div>
27
28 <div class="btn-toolbar justify-content-center">
29 {% if "lightningwirelabs.com" in post.tags and post.link %}
30 <a class="btn btn-lwl" href="{{ post.link }}">
31 Go to Lightning Wire Labs <!-- XXX icon -->
32 </a>
33 {% end %}
34
35 {% if post.release %}
36 <a class="btn btn-primary" href="https://www.ipfire.org/download/{{ post.release.slug }}">
37 {{ _("Download %s now") % post.release }} <!-- XXX icon -->
38 </a>
39 {% end %}
40
41 {% if post.release or "donate" in post.tags %}
42 <a class="btn btn-outline-primary ml-2" href="https://www.ipfire.org/donate">
43 <svg class="icon i_heart"><use xlink:href="#heart"/></svg> {{ _("Donate") }}
44 </a>
45 {% end %}
46 </div>
47 </div>