fix relative urls and make partials for article info

This commit is contained in:
Dmitry Kolosov 2020-02-18 20:52:31 +03:00
parent cc3c20d597
commit 9f0279bfe1
8 changed files with 38 additions and 81 deletions

View file

@ -0,0 +1,5 @@
<div class="article-info">
{{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
{{ end }}
</div>

View file

@ -0,0 +1,21 @@
<div class="article-info">
{{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
{{ end }}
<div class="article-taxonomies">
{{ if .Params.categories }}
<ul class="article-categories">
{{ range .Params.categories }}
<li><a href="{{ "categories/" | absURL }}{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ if .Params.tags }}
<ul class="article-tags">
{{ range .Params.tags }}
<li><a href="{{ "tags/" | absURL }}{{ . }}">#{{ . }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
</div>

View file

@ -7,13 +7,13 @@
{{ if eq .Paginator.PageNumber 2 }}
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}">{{ $toNewPostsMessage }}</a>
{{ else }}
<a href="{{ .Paginator.Prev.URL }}">{{ $toNewPostsMessage }}</a>
<a href="{{ .Paginator.Prev.URL | absURL }}">{{ $toNewPostsMessage }}</a>
{{ end }}
{{ end }}
</div>
<div class="right pagination-item {{ if not .Paginator.HasNext }}disabled{{ end }}">
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}">{{ $toOldPostsMessage }}</a>
<a href="{{ .Paginator.Next.URL | absURL }}">{{ $toOldPostsMessage }}</a>
{{ end }}
</div>
</div>