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:
authorasti <rahul@webyfy.com>2020-03-22 22:02:48 +0300
committerasti <rahul@webyfy.com>2020-03-22 22:02:48 +0300
commitdff238ec01b233b44d2618178f2b272ee0c67167 (patch)
treece9498266f7f25e090866d4d279355154f138afe
parent3f4ee025012785f484a9eee1d0b4ebd43846e749 (diff)
Add description as post subtitle to page
-rw-r--r--assets/scss/journal.scss9
-rw-r--r--layouts/_default/single.html5
2 files changed, 14 insertions, 0 deletions
diff --git a/assets/scss/journal.scss b/assets/scss/journal.scss
index 76f0fb6..3a34245 100644
--- a/assets/scss/journal.scss
+++ b/assets/scss/journal.scss
@@ -18,6 +18,7 @@ $nav-subtitle-size: 18px;
$nav-link-size: 20px;
$nav-footer-size: 12px;
$post-title-size: 30px;
+$post-subtitle-size: 16px;
$post-summary-size: 16px;
$post-body-size: 16px;
$post-meta-size: 16px;
@@ -788,6 +789,14 @@ a {
font-size: $single-column-post-title-size;
padding: 80px 20px 30px 20px;
}
+
+ .post-subtitle {
+ font-size: $post-subtitle-size;
+ width: 80%;
+ opacity: 0.6;
+ padding: 0px 0 8px 0;
+ }
+
.post-meta {
margin: 0;
&,
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 2f78e62..14f7cd1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -12,6 +12,11 @@
style="background-image: url('{{ $featured_image | relLangURL}}')">
<div class="post-title">
{{ .Title }}
+ {{ if .Params.description }}
+ <div class="post-subtitle">
+ {{ .Params.description }}
+ </div>
+ {{ end }}
<div class="post-meta">
{{ if .Params.date}}
<time itemprop="datePublished">