From e75111904bbabe4d2b1eb0d4a2c657eed61c5ff6 Mon Sep 17 00:00:00 2001
From: alexanderdavide <alexeble1998@gmail.com>
Date: Fri, 11 Feb 2022 21:26:42 +0000
Subject: [PATCH] refactor: post-footer
---
layouts/_default/single.html | 14 +++----
layouts/partials/taxonomy/template.html | 2
assets/scss/partials/components/_post.scss | 63 +++----------------------------
layouts/index.html | 32 +++++++---------
4 files changed, 27 insertions(+), 84 deletions(-)
diff --git a/assets/scss/partials/components/_post.scss b/assets/scss/partials/components/_post.scss
index d1205e4..aa79bca 100644
--- a/assets/scss/partials/components/_post.scss
+++ b/assets/scss/partials/components/_post.scss
@@ -96,65 +96,14 @@
}
}
- .post-footer {
- padding: 0 0 10px 0;
+ &-footer {
border-bottom: $border;
- .meta {
- max-width: 100%;
- display: flex;
- color: #bbbbbb;
- .info {
- float: left;
- font-size: 1.2rem;
- margin-bottom: 1em;
- color: $primary;
- .date {
- margin-right: 10px;
- margin-left: 5px;
- }
- }
- a {
- text-decoration: none;
- color: $primary;
- &:hover {
- color: #2660ab;
- }
- }
- i {
- margin-right: 6px;
- }
- }
- .info {
- .separator a {
- margin-right: 0.2em;
- }
- }
- .tags {
- padding-bottom: 15px;
- font-size: 1.3rem;
+ font-size: 1.2rem;
+ padding: 12px 0;
- ul {
- list-style-type: none;
- display: inline;
- margin: 0;
- padding: 0;
- }
-
- ul li {
- list-style-type: none;
- margin: 0;
- padding-right: 5px;
- display: inline;
- }
-
- a {
- text-decoration: none;
- color: $primary;
- font-weight: 400;
- &:hover {
- text-decoration: none;
- }
- }
+ &__date {
+ margin-right: 10px;
+ margin-left: 5px;
}
}
}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index ad32624..186651d 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -61,19 +61,17 @@
{{- end -}}
</div>
<div class="post-footer">
- <div class="info">
- {{ with .Page.Params.Categories }}
- {{ partial "taxonomy/categories.html" . }}
+ {{ with .Page.Params.Categories }}
+ {{ partial "taxonomy/categories.html" . }}
- {{ end }}
+ {{ end }}
- {{ with .Page.Params.Tags }}
- {{ partial "taxonomy/tags.html" . }}
+ {{ with .Page.Params.Tags }}
+ {{ partial "taxonomy/tags.html" . }}
- {{ end }}
- </div>
+ {{ end }}
</div>
{{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }}
diff --git a/layouts/index.html b/layouts/index.html
index b4f0684..7c26c83 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -85,33 +85,29 @@
<!-- -->
<div class="post-footer">
- <div class="meta">
- <div class="info">
- <em class="fas fa-calendar-day"></em>
- <span class="date"
- >{{ if isset .Site.Params "indexdateformat" }}
- {{ .Date.Format .Site.Params.indexDateFormat }}
+ <em class="fas fa-calendar-day"></em>
+ <span class="post-footer__date"
+ >{{ if isset .Site.Params "indexdateformat" }}
+ {{ .Date.Format .Site.Params.indexDateFormat }}
- {{ else }}
- {{ .Date.Format "Mon, Jan 2, 2006" }}
+ {{ else }}
+ {{ .Date.Format "Mon, Jan 2, 2006" }}
- {{ end }}</span
- >
- {{ with .Page.Params.Categories }}
- {{ partial "taxonomy/categories.html" . }}
+ {{ end }}</span
+ >
+ {{ with .Page.Params.Categories }}
+ {{ partial "taxonomy/categories.html" . }}
- {{ end }}
+ {{ end }}
- {{ with .Page.Params.Tags }}
- {{ partial "taxonomy/tags.html" . }}
+ {{ with .Page.Params.Tags }}
+ {{ partial "taxonomy/tags.html" . }}
- {{ end }}
- </div>
- </div>
+ {{ end }}
</div>
</div>
diff --git a/layouts/partials/taxonomy/template.html b/layouts/partials/taxonomy/template.html
index 407910e..6be7b11 100644
--- a/layouts/partials/taxonomy/template.html
+++ b/layouts/partials/taxonomy/template.html
@@ -2,7 +2,7 @@
{{- $linkBase := .linkBase -}}
-<span class="separator">
+<span>
{{- range $index, $el := .items -}}
<!-- Replace certain special characters with their URL encoded counterparts -->
{{- $item := replace . "#" "%23" -}}
--
Gitblit v1.10.0