fix relative urls and make partials for article info
This commit is contained in:
parent
cc3c20d597
commit
9f0279bfe1
8 changed files with 38 additions and 81 deletions
5
layouts/partials/articleInfoDate.html
Normal file
5
layouts/partials/articleInfoDate.html
Normal 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>
|
21
layouts/partials/articleInfoFull.html
Normal file
21
layouts/partials/articleInfoFull.html
Normal 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>
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue