-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtitle-section.html.twig
More file actions
53 lines (51 loc) · 2.95 KB
/
Copy pathtitle-section.html.twig
File metadata and controls
53 lines (51 loc) · 2.95 KB
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
{% set page_title = article.title|default(title|default('')) %}
{% set author_github = article.author.github|default(author_github|default(false)) %}
<div class="wrap">
<div class="post-hero-v2">
{% if back_href is defined %}
<div class="hero-top-row">
<a href="{{ back_href }}" class="breadcrumb-back">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
{{ back_label }}
</a>
<div class="hero-badge">
<span>{{ badge }}</span>
</div>
</div>
{% else %}
<div class="hero-badge">
<span>{{ badge }}</span>
</div>
{% endif %}
<h1>{{ page_title }}</h1>
{% if article.author is defined and article.author %}
<div class="post-meta-v2 mt-3">
<span class="meta-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
</span>
{% if article.postDate is defined %}
<span class="meta-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
{{ article.postDate|date('M d, Y') }}
</span>
{% endif %}
</div>
{% endif %}
{% if also_on is defined %}
<div class="post-meta-v2 mt-3">
<span class="meta-item">
Also on
</span>
{% if author_github %}
<span class="meta-item">
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true">
<path d="M12 .5C5.73.5.5 5.73.5 12c0 5.09 3.29 9.4 7.86 10.93.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.52-1.34-1.28-1.7-1.28-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.24 2.76.12 3.05.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.42.36.78 1.07.78 2.16 0 1.56-.01 2.82-.01 3.2 0 .31.21.66.8.55A11.5 11.5 0 0 0 23.5 12c0-6.27-5.23-11.5-11.5-11.5z"/>
</svg>
<a href="https://github.com/{{ author_github }}" target="_blank" rel="noopener noreferrer">{{ author_github }}</a>
</span>
{% endif %}
</div>
{% endif %}
</div>
</div>