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

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmazingRise <8315221+AmazingRise@users.noreply.github.com>2022-04-14 17:11:16 +0300
committerAmazingRise <8315221+AmazingRise@users.noreply.github.com>2022-04-14 17:11:16 +0300
commit60c7d92f2591a8ccbbcc7a830c3251044892cefb (patch)
tree46c9b5cf6a634dd7aa33c1a6762cf717c7ea3009
parentbf8f0030991b107a3efcb51090108741ed9a6aff (diff)
Fixed #39
-rw-r--r--assets/scss/journal.scss11
-rw-r--r--layouts/_default/terms.html48
-rw-r--r--layouts/partials/extrabar.html2
-rw-r--r--layouts/partials/mobile-paginator.html2
4 files changed, 35 insertions, 28 deletions
diff --git a/assets/scss/journal.scss b/assets/scss/journal.scss
index 7f8db12..63c329e 100644
--- a/assets/scss/journal.scss
+++ b/assets/scss/journal.scss
@@ -1089,3 +1089,14 @@ mjx-container {
.vcontent p {
color: black !important;
}
+
+.tags {
+ display: flex;
+ align-items: center;
+ flex-direction: row;
+ padding-left: 10px;
+ flex-wrap: wrap;
+ .tag {
+ margin: 10px;
+ }
+} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index f31029f..c977206 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,32 +1,28 @@
{{ define "main" }}
- <div class="post-list-container post-list-container-shadow">
- <a class="a-block">
- <div class="post-item-wrapper post-item-wrapper-no-hover">
- <div class="post-item post-item-no-gaps">
- <div class="post-item-info-wrapper">
- <div class="post-item-title post-item-title-small">
- {{.Title}}
- </div>
- </div>
- </div>
- </div>
- </a>
-
- {{ range .Paginator.Pages }}
- <a href="{{.Permalink}}" class="a-block">
- <div class="post-item-wrapper">
- <div class="post-item post-item-no-gaps">
- <div class="post-item-info-wrapper">
- <div class="post-item-title">
- {{.Title}}
- </div>
- </div>
- </div>
- </div>
- </a>
- {{ end }}
+<div class="post-list-container post-list-container-shadow">
+ <a class="a-block">
+ <div class="post-item-wrapper post-item-wrapper-no-hover">
+ <div class="post-item post-item-no-gaps">
+ <div class="post-item-info-wrapper">
+ <div class="post-item-title post-item-title-small">
+ {{.Title}}
+ </div>
+ </div>
+ </div>
</div>
+ </a>
+ <div class="tags">
+ {{ range .Data.Terms }}
+ <div class="tag">
+ <a href="{{.Page.Permalink}}" class="btn btn-outline-secondary position-relative rounded-pill">
+ {{.Page.Title}}
+ <span class="badge">({{.Count}})</span>
+ </a>
+ </div>
+ {{ end }}
+ </div>
+</div>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/extrabar.html b/layouts/partials/extrabar.html
index 85b4b1e..6df9155 100644
--- a/layouts/partials/extrabar.html
+++ b/layouts/partials/extrabar.html
@@ -21,7 +21,7 @@
</span>
</a>
{{ end }}
- {{ if .Paginator }}
+ {{ if and (.Paginator) (not (.Data.Terms)) }}
{{ if gt .Paginator.TotalPages 1 }}
<div class="pagination-indicator">
<span style="text-align: center">
diff --git a/layouts/partials/mobile-paginator.html b/layouts/partials/mobile-paginator.html
index d1a1bb3..103f81b 100644
--- a/layouts/partials/mobile-paginator.html
+++ b/layouts/partials/mobile-paginator.html
@@ -1,4 +1,4 @@
-{{ if .Paginator }}
+{{ if and (.Paginator) (not (.Data.Terms)) }}
{{ if gt .Paginator.TotalPages 1 }}
<div class="pagination">
{{ if .Paginator.HasPrev }}