feat: add poem shortcode

This commit is contained in:
aka 2023-12-31 02:17:44 +08:00
parent 067cc8786b
commit fb655f9c04
3 changed files with 25 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);
}
}

View 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>