mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
feat: add poem shortcode
This commit is contained in:
parent
067cc8786b
commit
fb655f9c04
@ -227,7 +227,7 @@
|
||||
font-family: "EB Garamond", "Noto Serif SC";
|
||||
margin-inline-start: calc((var(--card-padding)) * -1);
|
||||
padding-inline-start: calc(var(--card-padding) - var(--heading-border-size));
|
||||
border-inline-start: var(--heading-border-size) solid var(--accent-color);
|
||||
border-inline-start: var(--heading-border-size) solid var(--accent-color-darker);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
@ -105,10 +105,10 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
* Article content style
|
||||
*/
|
||||
:root {
|
||||
--blockquote-border-size: 4px;
|
||||
--blockquote-background-color: rgb(248 248 248);
|
||||
--blockquote-border-size: 3px;
|
||||
--blockquote-background-color: #f2f2f2;
|
||||
|
||||
--heading-border-size: 4px;
|
||||
--heading-border-size: 3px;
|
||||
|
||||
--link-background-color: 189, 195, 199;
|
||||
--link-background-opacity: 0.5;
|
||||
@ -132,7 +132,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
--table-border-color: #717171;
|
||||
--tr-even-background-color: #545454;
|
||||
|
||||
--blockquote-background-color: rgb(75 75 75);
|
||||
--blockquote-background-color: rgb(65, 65, 65);
|
||||
}
|
||||
}
|
||||
|
||||
|
19
layouts/shortcodes/poem.html
Normal file
19
layouts/shortcodes/poem.html
Normal file
@ -0,0 +1,19 @@
|
||||
<blockquote>
|
||||
<p style="text-align:center">{{ .Inner }}</p>
|
||||
{{- if or (.Get "author") (.Get "source") -}}
|
||||
<footer style="text-align:right">
|
||||
——
|
||||
{{- if .Get "author" -}}
|
||||
<span>
|
||||
<strong>
|
||||
{{- .Get "author" -}}
|
||||
</strong>
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- with .Get "url" -}}<a href="{{ . }}">{{- end -}}
|
||||
<cite>{{ .Get "source" }}</cite>
|
||||
{{- if .Get "url" -}}</a>{{- end -}}
|
||||
</span>
|
||||
</footer>
|
||||
{{- end -}}
|
||||
</blockquote>
|
Loading…
Reference in New Issue
Block a user