Added authors, as an exercise for other taxonomies.

This commit is contained in:
Greenscreener 2019-07-13 21:12:40 +02:00
parent 62b578c49c
commit 19051bc505
11 changed files with 87 additions and 2 deletions

View File

@ -1,5 +1,5 @@
---
title: ""
title: "Homepage"
date: 2019-07-12T14:54:15+02:00
draft: false
authors: [ "Greenscreener" ]

View File

@ -0,0 +1,7 @@
---
title: "Greenscreener"
avatar: "https://greenscreener.tk/images/GSLOGO.svg"
fullname: "Jan Černohorský"
---
# Blehgh
Lorem ipsum dolor sit amet.

View File

@ -0,0 +1,7 @@
---
title: "Greenscreener"
avatar: "https://greenscreener.tk/images/GSLOGO.svg"
fullname: "Jan Černohorský"
---
# Blehgh
Lorem ipsum dolor sit amet.

View File

@ -0,0 +1,4 @@
---
title: "Autoři"
type: "_default"
---

View File

@ -57,4 +57,7 @@ $primary: #0b2a37;
font-family: 'Fira Code';
font-size: smaller;
}
.author-media {
margin-bottom: 15px;
}
// /Custom styles

View File

@ -0,0 +1,2 @@
[readmore]
other = "Číst dále"

View File

@ -0,0 +1,2 @@
[readmore]
other = "Read more"

View File

@ -1,3 +1,4 @@
{{ define "main" }}
<h2 class="title">{{ .Title }}</h2>
{{ partial "list.html" .}}
{{ end }}

View File

@ -0,0 +1,17 @@
{{ define "main" }}
<div class="media author-media">
<div class="media-left">
<figure class="image is-96x96">
<img src="{{ .Params.avatar }}" alt="User avatar">
</figure>
</div>
<div class="media-content is-vertical-center">
<h4 class="title is-4">{{ .Title }}</h4>
<h6 class="title is-6">{{ .Params.fullname }}</h6>
</div>
</div>
<div class="content">
{{ .Content }}
</div>
{{ partial "list.html" . }}
{{ end }}

View File

@ -0,0 +1,14 @@
{{ $baseUrl := .Site.BaseURL }}
{{ $paginator := .Paginate (.Pages.ByPublishDate.Reverse) }}
{{ partial "paginator-buttons.html" $paginator }}
{{ range $paginator.Pages }}
<div class="box">
<div class="pageHeaderContainer">
<div class="pageHeader">
<h3 class="title pageTitle"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
</div>
</div>
<div class="content"><p> {{ replaceRE "invisible\\(\\);(?:.|\n)*invisibleEnd\\(\\);" "" .Summary }} <a href="{{ .Permalink }}">{{ T "readmore" }}</a> </p></div>
</div>
{{ end }}
{{ partial "paginator-buttons.html" $paginator }}

View File

@ -0,0 +1,28 @@
{{ $paginator := . }}
{{ if gt $paginator.TotalPages 1 }}
<div class="has-margin-bottom-1em">
<nav class="pagination" role="navigation" aria-label="pagination">
<ul class="pagination-list">
<li>
<a class="pagination-link" href="{{ $paginator.First.URL }}">«</a>
</li>
{{ if $paginator.HasPrev }}
<li>
<a class="pagination-link" href="{{ $paginator.Prev.URL }}">{{ $paginator.Prev.PageNumber }}</a>
</li>
{{ end }}
<li>
<a class="pagination-link is-current">{{ $paginator.PageNumber }}</a>
</li>
{{ if $paginator.HasNext }}
<li>
<a class="pagination-link" href="{{ $paginator.Next.URL}}">{{ $paginator.Next.PageNumber }}</a>
</li>
{{ end }}
<li>
<a class="pagination-link" href="{{ $paginator.Last.URL }}">»</a>
</li>
</ul>
</nav>
</div>
{{ end }}