]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/blog/modules/post.html
blog: Allow to edit and create new posts
[ipfire.org.git] / src / templates / blog / modules / post.html
CommitLineData
cdf85ee7
MT
1{% import ipfire.accounts as accounts %}
2
92fe6b3f 3<div class="blog-post {% if "lightningwirelabs.com" in post.tags %}lightning-wire-labs{% end %}">
4b2975d2
MT
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>
f91dfcc7 10
4b2975d2 11 <p class="small text-muted">
cdf85ee7
MT
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
4b2975d2 20 {{ locale.format_date(post.published_at, shorter=True, relative=False) }}
541c952b
MT
21
22 {% if current_user and current_user == post.author %}
23 <a href="/post/{{ post.slug }}/edit">{{ _("Edit") }}</a>
24 {% end %}
4b2975d2
MT
25 </p>
26 </div>
f91dfcc7 27
4b2975d2
MT
28 <div class="blog-content">
29 {% raw post.html %}
30 </div>
1e76fec4 31
0e7c23da
MT
32 <div class="btn-toolbar justify-content-center">
33 {% if "lightningwirelabs.com" in post.tags and post.link %}
34 <a class="btn btn-lwl" href="{{ post.link }}">
35 Go to Lightning Wire Labs <!-- XXX icon -->
36 </a>
37 {% end %}
38
39 {% if post.release %}
984e4e7b
MT
40 <a class="btn btn-primary" href="https://www.ipfire.org/download/{{ post.release.slug }}">
41 {{ _("Download %s now") % post.release }} <!-- XXX icon -->
42 </a>
ab4c98cf 43 {% end %}
984e4e7b 44
ab4c98cf 45 {% if post.release or "donate" in post.tags %}
984e4e7b
MT
46 <a class="btn btn-outline-primary ml-2" href="https://www.ipfire.org/donate">
47 <svg class="icon i_heart"><use xlink:href="#heart"/></svg> {{ _("Donate") }}
48 </a>
0e7c23da
MT
49 {% end %}
50 </div>
f91dfcc7 51</div>