feat(author): add author_link and fix highlight bug

This commit is contained in:
Dillon
2020-02-01 01:52:27 +08:00
parent 2a7611b5ae
commit 8aa4b6dce6
22 changed files with 136 additions and 110 deletions

View File

@@ -7,9 +7,9 @@
<h2 class="post-title animated pulse faster">
{{- $taxonomy := .Data.Singular -}}
{{- if eq $taxonomy "category" -}}
<i class="far fa-folder-open fa-fw"></i>{{ .Title }}
<i class="far fa-folder-open fa-fw"></i>&nbsp;{{ .Title }}
{{- else if eq $taxonomy "tag" -}}
<i class="fas fa-tag fa-fw"></i>{{ .Title }}
<i class="fas fa-tag fa-fw"></i>&nbsp;{{ .Title }}
{{- else -}}
{{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}}
{{- end -}}

View File

@@ -20,10 +20,12 @@
{{- $pages := .Pages -}}
{{- with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) -}}
<div class="card-item">
<div class="categories">
<a href="{{ .Permalink }}">
<h3><i class="far fa-folder fa-fw"></i>{{ $term | humanize}}</h3>
</a>
<div class="card-item-wrapper">
<h3 class="card-item-title">
<a href="{{ .Permalink }}">
<i class="far fa-folder fa-fw"></i>&nbsp;{{ $term | humanize}}
</a>
</h3>
{{- range first 5 $pages -}}
<article class="archive-item">
<a href="{{ .Permalink }}" class="archive-item-link">