Show lists with content

This commit is contained in:
2020-12-03 15:17:37 +01:00
parent dd4c43a9d4
commit f307dfe308
2 changed files with 68 additions and 29 deletions
+3 -1
View File
@@ -49,9 +49,11 @@ googleAnalytics = "UA-136337666-1"
# Metadata mostly used in document's head # Metadata mostly used in document's head
description = "Hey there, my name is Maik de Kruif, I create websites, bots and other kinds of software. At the moment, I'm still studying computer science at Avans University of Applied Sciences. I am also a big fan of open-source software, which is why you'll find many of my projects on Github. And last but not least, I love playing around with cyber-security related stuff." description = "Hey there, my name is Maik de Kruif, I create websites, bots and other kinds of software. At the moment, I'm still studying computer science at Avans University of Applied Sciences. I am also a big fan of open-source software, which is why you'll find many of my projects on Github. And last but not least, I love playing around with cyber-security related stuff."
keywords = "" keywords = "" # TODO: Add keywords!!!
images = [""] images = [""]
showReadingTimeInList = false
homeSubtitle = "Maik de Kruif (maik_dev)" homeSubtitle = "Maik de Kruif (maik_dev)"
# Prefix of link to the git commit detail page. GitInfo must be enabled. # Prefix of link to the git commit detail page. GitInfo must be enabled.
+63 -26
View File
@@ -1,35 +1,72 @@
{{ define "main" }} {{ define "main" }}
{{ $paginator := .Paginate .Data.Pages }} {{ $paginator := .Paginate .Data.Pages }}
<main class="posts"> <main class="posts">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ if .Content }} {{ if .Content }}
<div class="content">{{ .Content }}</div> <div class="content">{{ .Content }}</div>
{{ end }} {{ end }}
{{ range $paginator.Pages.GroupByDate "2006" }} <div class="posts-list">
<div class="posts-group"> {{ range .Pages }}
<div class="post-year">{{ .Key }}</div> <div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
{{ if .Date }}
<span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
</span>
<ul class="posts-list"> {{ end }}
{{ range .Pages }} {{ with .Params.Author }}<span class="post-author">{{ $.Site.Params.WrittenBy | default "Written by" }}
<li class="post-item"> {{ . }}</span>{{ end }}
<a href="{{.Permalink}}"> {{ if $.Site.Params.ShowReadingTimeInList }}
<span class="post-title">{{.Title}}</span> <span class="post-read-time">— {{ .ReadingTime }}
<span class="post-day"> {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
{{ if .Site.Params.dateformShort }} {{ end }}
{{ .Date.Format .Site.Params.dateformShort }}
{{ else }}
{{ .Date.Format "Jan 2"}}
{{ end }}
</span>
</a>
</li>
{{ end }}
</ul>
</div> </div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ if .Params.Cover }}
<figure class="post-cover">
{{ if .Params.UseRelativeCover }}
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}"
alt="{{ .Title | plainify | default " " }}" />
{{ else }}
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title | plainify | default " " }}" />
{{ end }}
{{ if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{ end }}
</figure>
{{ end }}
<div class="post-content">
{{ with .Description }}
{{ . | markdownify }}
{{ else }}
{{ if .Truncated }}
{{ .Summary | markdownify }}
{{ end }}
{{ end }}
</div>
{{ if not .Params.hideReadMore }}
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore | default "Read more" }}
→</a></div>
{{ end }}
</div>
{{ end }} {{ end }}
</div>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</main> </main>
{{ end }} {{ end }}