Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-02-21 07:49:55 +0300
committerDillon <dillonzq@outlook.com>2020-02-21 07:49:55 +0300
commita0f31c35febbcb7a0501fc657e84d1e86121d24e (patch)
tree6946e6e79a1c007c67820ba45ce5ddf2b207ae0e /layouts
parenta4116f14a76b9f01dacbde6abdf2d0dab719e577 (diff)
fix(link): fix tags/categories link bug
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/summary.html35
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/post/footer.html8
-rw-r--r--layouts/posts/single.html29
4 files changed, 44 insertions, 30 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 4db4a21..852756b 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -13,25 +13,30 @@
</h1>
{{- /* Meta */ -}}
- <div class="meta">
+ <div class="post-meta">
{{- $author := .Params.author | default .Site.Author.name -}}
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
- <a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
- <i class="fas fa-user-circle fa-fw"></i>{{ $author }}
- </a>
+ <span class="post-author">
+ <a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
+ <i class="fas fa-user-circle fa-fw"></i>{{ $author }}
+ </a>
+ </span>
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
- {{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
+ &nbsp;<span class="post-publish">
+ {{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>
+ </span>
{{- with .Params.categories -}}
- <span class="post-category">
- {{- T "included" -}}&nbsp;
+ &nbsp;<span class="post-category">
+ {{- T "included" -}}
{{- range . -}}
- {{- $name := . -}}
- {{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
- <i class="far fa-folder fa-fw"></i>
- <a href="{{ .Permalink }}">{{ $name | humanize }}</a>
- {{- end -}}
+ &nbsp;
+ <span>
+ <a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
+ <i class="far fa-folder fa-fw"></i>{{ . | humanize }}
+ </a>
+ </span>
{{- end -}}
</span>
{{- end -}}
@@ -48,8 +53,10 @@
{{- with .Params.tags -}}
<div class="post-tags">
{{- range . -}}
- <span class="tag">
- &nbsp;<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>&nbsp;{{ . }}</a>
+ &nbsp;<span>
+ <a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
+ <i class="fas fa-tag fa-fw"></i>{{ . }}
+ </a>
</span>
{{- end -}}
</div>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 3c51a44..bbaf2ee 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -35,7 +35,7 @@
<div class="menu" id="menu-mobile">
{{- $currentPage := . -}}
{{- 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 -}}
</a>
{{- end -}}
diff --git a/layouts/partials/post/footer.html b/layouts/partials/post/footer.html
index f927e1b..8bce99b 100644
--- a/layouts/partials/post/footer.html
+++ b/layouts/partials/post/footer.html
@@ -41,9 +41,11 @@
<section>
{{- with .Params.tags -}}
{{- range . -}}
- <span class="tag">
- <a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>&nbsp;{{ . }}</a>&nbsp;
- </span>
+ <span>
+ <a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
+ <i class="fas fa-tag fa-fw"></i>{{ . }}
+ </a>
+ </span>&nbsp;
{{- end -}}
{{- end -}}
</section>
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index d5f5c33..ddec275 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -6,26 +6,31 @@
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
{{- /* Meta */ -}}
- <div class="meta">
- <div class="meta-line">
+ <div class="post-meta">
+ <div class="post-meta-line">
{{- $author := .Params.author | default .Site.Author.name -}}
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
- <a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
- <i class="fas fa-user-circle fa-fw"></i>{{ $author }}
- </a>&nbsp;
+ <span class="post-author">
+ <a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
+ <i class="fas fa-user-circle fa-fw"></i>{{ $author }}
+ </a>
+ </span>
+
{{- with .Params.categories -}}
- <span class="post-category">
- {{- T "included" -}}&nbsp;
+ &nbsp;<span class="post-category">
+ {{- T "included" -}}
{{- range . -}}
- {{- $name := . -}}
- {{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
- <i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name | humanize }}</a>&nbsp;
- {{- end -}}
+ &nbsp;
+ <span>
+ <a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
+ <i class="far fa-folder fa-fw"></i>{{ . | humanize }}
+ </a>
+ </span>
{{- end -}}
</span>
{{- end -}}
</div>
- <div class="meta-line">
+ <div class="post-meta-line">
{{- $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>&nbsp;
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}&nbsp;