From d090e1bb94ce3f000a52fc2d1a10e281e1f8ec13 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 8 Jun 2022 15:56:13 +0000 Subject: [PATCH] Format code and move quote.scss to article.scss This style is only used on the article page, so it makes more sense to have it there. --- assets/scss/partials/layout/article.scss | 10 ++++++++++ assets/scss/partials/quote.scss | 9 --------- assets/scss/style.scss | 1 - layouts/shortcodes/quote.html | 24 ++++++++++++------------ 4 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 assets/scss/partials/quote.scss diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index eb58e77..d181df4 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -231,6 +231,16 @@ border-inline-start: var(--blockquote-border-size) solid var(--card-separator-color); padding: 15px calc(var(--card-padding) - var(--blockquote-border-size)); background-color: var(--blockquote-background-color); + + .cite { + display: block; + text-align: right; + font-size: 0.75em; + + a { + text-decoration: underline; + } + } } hr { diff --git a/assets/scss/partials/quote.scss b/assets/scss/partials/quote.scss deleted file mode 100644 index fb9deb9..0000000 --- a/assets/scss/partials/quote.scss +++ /dev/null @@ -1,9 +0,0 @@ -blockquote .cite { - display: block; - text-align: right; - font-size: 0.75em; - - a { - text-decoration: underline; - } -} diff --git a/assets/scss/style.scss b/assets/scss/style.scss index d317c21..43e95a5 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -18,7 +18,6 @@ @import "partials/footer.scss"; @import "partials/pagination.scss"; @import "partials/sidebar.scss"; -@import "partials/quote.scss"; @import "partials/base.scss"; @import "partials/layout/article.scss"; @import "partials/layout/list.scss"; diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html index 80b5fbd..09bb07c 100644 --- a/layouts/shortcodes/quote.html +++ b/layouts/shortcodes/quote.html @@ -1,15 +1,15 @@
-

{{ .Inner | markdownify }}

- {{- if or (.Get "author") (.Get "source") -}} - - {{- if .Get "author" -}} - - {{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}} +

{{ .Inner | markdownify }}

+ {{- if or (.Get "author") (.Get "source") -}} + + {{- if .Get "author" -}} + + {{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}} + + {{- end -}} + {{- with .Get "url" -}}{{- end -}} + {{ .Get "source" }} + {{- if .Get "url" -}}{{- end -}} {{- end -}} - {{- with .Get "url" -}}{{- end -}} - {{ .Get "source" }} - {{- if .Get "url" -}}{{- end -}} -
- {{- end -}} -
+ \ No newline at end of file