This commit is contained in:
panr 2018-07-20 19:14:22 +02:00
commit 4e67004628
82 changed files with 7599 additions and 0 deletions

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
<head>
{{ block "title" . }}
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
{{ end }}
{{ partial "head.html" . }}
</head>
<body>
<div class="container">
{{ partial "header.html" . }}
<div class="content">
{{ block "main" . }}
{{ end }}
</div>
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</div>
</body>
</html>

View file

@ -0,0 +1,40 @@
{{ define "main" }}
<div class="posts">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
<div class="post on-list">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
<span class="post-date">
{{ .Date.Day }}/{{ sub .Date.Month 0 }}/{{ .Date.Year }}
</span>
<span class="post-author">Written by {{ .Params.Author }}</span>
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ with .Params.Cover }}
<img src="/img/{{ . }}" class="post-cover" />
{{ end }}
<div class="post-content">
{{ with .Description }}
{{ . | markdownify }}
{{ else }}
{{ if .Truncated }}
{{ .Summary | markdownify }}
{{ end }}
{{ end }}
</div>
<div><a class="read-more button" href="{{.RelPermalink}}">Read more →</a></div>
</div>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View file

@ -0,0 +1,43 @@
{{ define "main" }}
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<div class="post-meta">
<span class="post-date">
{{ .Date.Day }}/{{ sub .Date.Month 0 }}/{{ .Date.Year }}
</span>
<span class="post-author">Written by {{ .Params.Author }}</span>
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ with .Params.Cover }}
<img src="/img/{{ . }}" class="post-cover" />
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">Read other posts</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<a class="btn next" href="{{ .NextInSection.Permalink }}">← {{ .NextInSection.Title }}</a>
{{ end }}
{{ if .PrevInSection }}
<a class="btn previous" href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }} →</a>
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}