fix(link): fix tags/categories link bug
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.post-meta {
|
||||||
font-size: .88rem;
|
font-size: .875rem;
|
||||||
color: $global-font-secondary-color;
|
color: $global-font-secondary-color;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|||||||
@@ -30,8 +30,7 @@
|
|||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.post-meta {
|
||||||
font-size: .875rem !important;
|
|
||||||
a {
|
a {
|
||||||
color: $global-font-secondary-color !important;
|
color: $global-font-secondary-color !important;
|
||||||
|
|
||||||
|
|||||||
@@ -13,25 +13,30 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{{- /* Meta */ -}}
|
{{- /* Meta */ -}}
|
||||||
<div class="meta">
|
<div class="post-meta">
|
||||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
<span class="post-author">
|
||||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||||
</a>
|
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||||
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
<span class="post-publish">
|
||||||
|
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||||
|
</span>
|
||||||
|
|
||||||
{{- with .Params.categories -}}
|
{{- with .Params.categories -}}
|
||||||
<span class="post-category">
|
<span class="post-category">
|
||||||
{{- T "included" -}}
|
{{- T "included" -}}
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
{{- $name := . -}}
|
|
||||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
<span>
|
||||||
<i class="far fa-folder fa-fw"></i>
|
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||||
<a href="{{ .Permalink }}">{{ $name | humanize }}</a>
|
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||||
{{- end -}}
|
</a>
|
||||||
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</span>
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -48,8 +53,10 @@
|
|||||||
{{- with .Params.tags -}}
|
{{- with .Params.tags -}}
|
||||||
<div class="post-tags">
|
<div class="post-tags">
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
<span class="tag">
|
<span>
|
||||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i> {{ . }}</a>
|
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||||
|
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<div class="menu" id="menu-mobile">
|
<div class="menu" id="menu-mobile">
|
||||||
{{- $currentPage := . -}}
|
{{- $currentPage := . -}}
|
||||||
{{- range .Site.Menus.main -}}
|
{{- range .Site.Menus.main -}}
|
||||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
|
||||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||||
</a>
|
</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -41,9 +41,11 @@
|
|||||||
<section>
|
<section>
|
||||||
{{- with .Params.tags -}}
|
{{- with .Params.tags -}}
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
<span class="tag">
|
<span>
|
||||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i> {{ . }}</a>
|
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||||
</span>
|
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -6,26 +6,31 @@
|
|||||||
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
|
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
|
||||||
|
|
||||||
{{- /* Meta */ -}}
|
{{- /* Meta */ -}}
|
||||||
<div class="meta">
|
<div class="post-meta">
|
||||||
<div class="meta-line">
|
<div class="post-meta-line">
|
||||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
<span class="post-author">
|
||||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||||
</a>
|
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
{{- with .Params.categories -}}
|
{{- with .Params.categories -}}
|
||||||
<span class="post-category">
|
<span class="post-category">
|
||||||
{{- T "included" -}}
|
{{- T "included" -}}
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
{{- $name := . -}}
|
|
||||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
<span>
|
||||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name | humanize }}</a>
|
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||||
{{- end -}}
|
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</span>
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
<div class="meta-line">
|
<div class="post-meta-line">
|
||||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||||
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||||
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}
|
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user