blob: 60bc2300fc6295c56d41a93bc343675657e30122 (
plain)
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
54
55
56
57
58
|
{{ define "main" }}
<div id="reading-progress-bar" role="presentation" class="fixed z-10 top-0 left-0 h-1 bg-gray-700"></div>
<article class="article">
<h1 class="artitle__title"><a href="{{.Permalink}}">{{ .Title }}</a></h1>
{{if not .Params.hideMetadata }}
<header class="article__header">
{{ $readTime := cond (gt .ReadingTime 1) "minutes" "minute" }}
<span class="">
Read in {{ .ReadingTime }} {{ $readTime }} ·
<time datetime="{{ dateFormat "2006-01-02T15:04:05-07:00" (default .Date (.PublishDate)) }}">
{{ dateFormat "2 Jan, 2006" (default .Date (.PublishDate)) }}
</time>
</span>
</header>
{{ end }}
<div class="py-5">
{{ .Content }}
</div>
{{if not .Params.hideAuthorBio }}
<section class="author">
{{if or (eq (substr .Site.Params.avatar 0 7) "http://") (eq (substr .Site.Params.avatar 0 8) "https://")}}
<img alt="Avatar photo" class="author__avatar" src="{{.Site.Params.avatar}}">
{{ else }}
<img alt="Avatar photo" class="author__avatar" src="{{.Site.Params.avatar | relURL}}">
{{ end }}
<span class="author__bio">{{ .Site.Params.authorBio | safeHTML }}</span>
{{ $title := .Title }}
{{ $url := printf "%s" .URL | absLangURL }}
{{ $body := print $title ", by " .Site.Title "\n" .Params.description "\n\n" $url "\n" }}
<a href="http://twitter.com/share?url={{ $url }}&text={{ $title }}&via={{with .Site.Params.twitter }}{{ . }}{{ end }}" class="author__share bg-twitter hover:color-white hover:opacity-75">
<svg class="fill-current w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>Twitter</title>
<path d="M6.29 18.25c7.55 0 11.67-6.25 11.67-11.67v-.53c.8-.59 1.49-1.3 2.04-2.13-.75.33-1.54.55-2.36.65a4.12 4.12 0 0 0 1.8-2.27c-.8.48-1.68.81-2.6 1a4.1 4.1 0 0 0-7 3.74 11.65 11.65 0 0 1-8.45-4.3 4.1 4.1 0 0 0 1.27 5.49C2.01 8.2 1.37 8.03.8 7.7v.05a4.1 4.1 0 0 0 3.3 4.03 4.1 4.1 0 0 1-1.86.07 4.1 4.1 0 0 0 3.83 2.85A8.23 8.23 0 0 1 0 16.4a11.62 11.62 0 0 0 6.29 1.84"></path>
</svg>
Tweet
</a>
</section>
{{ end }}
{{if not .Params.hideComments }}
<section class="comments ">
<h2>Comments</h2>
{{ template "_internal/disqus.html" . }}
</section>
{{ end }}
</article>
{{if not .Params.hideSuggestions }}
{{ partial "suggestions.html" . }}
{{ end }}
{{ end }}
|