]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/blog/post.html
blog: Drop unused base.html
[ipfire.org.git] / src / templates / blog / post.html
1 {% extends "../base.html" %}
2
3 {% block title %}{{ post.title }}{% end block %}
4
5 {% block meta %}
6 {% import ipfire.accounts as accounts %}
7
8 <!-- Facebook OpenGraph -->
9 <meta property="og:site_name" content="IPFire Blog" />
10 <meta property="og:title" content="{{ post.title }} - The IPFire Blog" />
11 <meta property="og:description" content="{{ post.excerpt }}" />
12 <meta property="og:url" content="{{ request.full_url() }}" />
13 <meta property="og:image" content="{{ static_url("img/ipfire-tux.png") }}" />
14
15 <meta property="og:type" content="article" />
16 {% if post.published_at %}
17 <meta property="og:article:published_time" content="{{ post.published_at.isoformat() }}" />
18 {% end %}
19 <meta property="og:article:modified_time" content="{{ post.updated_at.isoformat() }}" />
20 {% if isinstance(post.author, accounts.Account) %}
21 <meta property="og:article:author:first_name" content="{{ post.author.first_name }}" />
22 <meta property="og:article:author:last_name" content="{{ post.author.last_name }}" />
23 <meta property="og:article:author:username" content="{{ post.author.uid }}" />
24 {% end %}
25 {% for tag in post.tags %}
26 <meta property="og:article:tag" content="{{ tag }}" />
27 {% end %}
28
29 <!-- Twitter -->
30 <meta property="twitter:site" content="@ipfire" />
31 <meta property="twitter:card" content="summary_large_image" />
32 <meta property="twitter:title" content="{{ post.title }} - The IPFire Blog" />
33 <meta property="twitter:description" content="{{ post.excerpt }}" />
34 <meta property="twitter:image" content="{{ static_url("img/ipfire-tux.png") }}" />
35 {% end block %}
36
37 {% block container %}
38 {% import ipfire.accounts as accounts %}
39
40 <section class="hero has-background-primary-light">
41 <div class="hero-body">
42 <div class="container">
43 <nav class="breadcrumb is-medium" aria-label="breadcrumbs">
44 <ul>
45 <li>
46 <a href="/">Home</a>
47 </li>
48 <li>
49 <a href="/blog">Blog</a>
50 </li>
51 <li class="is-active">
52 <a href="#" aria-current="page">{{ post.title }}</a>
53 </li>
54 </ul>
55 </nav>
56
57 <h1 class="title is-1">{{ post.title }}</h1>
58 <h6 class="subtitle is-6">
59
60 {{ _("by") }}
61
62 {% if isinstance(post.author, accounts.Account) %}
63 <a href="/blog/authors/{{ post.author.uid }}">{{ post.author.name }}</a>,
64 {% else %}
65 <strong>{{ post.author }}</strong>,
66 {% end %}
67
68 {% if post.is_published() %}
69 {% if post.updated_at and post.updated_at > post.published_at %}
70 {{ locale.format_date(post.published_at, shorter=True, relative=False) }},
71 {{ _("Updated %s") % locale.format_date(post.updated_at, shorter=True) }}
72 {% else %}
73 {{ locale.format_date(post.published_at, shorter=True, relative=False) }}
74 {% end %}
75 {% elif post.published_at %}
76 <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span>
77 {% else %}
78 {{ _("Not published") }}
79 {% end %}
80 </h6>
81 </div>
82 </div>
83 </section>
84
85 <section class="section">
86 <div class="container">
87 <div class="columns">
88 <div class="column is-three-fifths">
89 <div class="buttons are-medium">
90 {% if "lightningwirelabs.com" in post.tags and post.link %}
91 <a class="button is-lwl is-fullwidth" href="{{ post.link }}">
92 <span class="icon-text">
93 <span class="icon">
94 <i class="fas fa-external-link-alt"></i>
95 </span>
96 <span>{{ _("Go to Lightning Wire Labs") }}</span>
97 </span>
98 </a>
99 {% end %}
100
101 {% if post.release or "donate" in post.tags %}
102 <a class="button is-primary is-fullwidth" href="/donate">
103 <span class="icon-text">
104 <span class="icon">
105 <i class="fas fa-heart"></i>
106 </span>
107 <span>{{ _("Donate") }}</span>
108 </span>
109 </a>
110 {% end %}
111
112 {% if post.release %}
113 <a class="button is-dark is-fullwidth" href="/downloads/{{ post.release.slug }}">
114 <span class="icon-text">
115 <span class="icon">
116 <i class="fas fa-download"></i>
117 </span>
118 <span>{{ _("Download %s") % post.release }}</span>
119 </span>
120 </a>
121 {% end %}
122 </div>
123
124 <div class="block">
125 <div class="content">
126 {% raw post.html %}
127 </div>
128 </div>
129 </div>
130 </div>
131 </div>
132 </section>
133 {% end block %}