mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
955bb8dd7f
* Add quote shortcode, and example * Use trim to improve whitespace * Allow for quote with neither author nor source * 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. Co-authored-by: Jimmy Cai <github@jimmycai.com>
15 lines
No EOL
488 B
HTML
15 lines
No EOL
488 B
HTML
<blockquote>
|
|
<p>{{ .Inner | markdownify }}</p>
|
|
{{- if or (.Get "author") (.Get "source") -}}
|
|
<span class="cite"><span>― </span>
|
|
{{- if .Get "author" -}}
|
|
<span>
|
|
{{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}}
|
|
</span>
|
|
{{- end -}}
|
|
{{- with .Get "url" -}}<a href="{{ . }}">{{- end -}}
|
|
<cite>{{ .Get "source" }}</cite>
|
|
{{- if .Get "url" -}}</a>{{- end -}}
|
|
</span>
|
|
{{- end -}}
|
|
</blockquote> |