diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-05 09:27:39 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-05 09:27:39 +0200 |
| commit | c76fa272cdde2f986cddd39b8bfe937aab497af4 (patch) | |
| tree | 911767394dc3bc26f579a7c4ab60227563087128 /layouts | |
| parent | 627b110437ccd089bc3d9a5160ec41569f114e82 (diff) | |
| download | danixxyz-theme-c76fa272cdde2f986cddd39b8bfe937aab497af4.tar.gz danixxyz-theme-c76fa272cdde2f986cddd39b8bfe937aab497af4.zip | |
feat: add quote shortcode template
Ported quote shortcode from previous theme. Allows embedding styled blockquotes with optional source attribution and links.
Usage: {{< quote source="Author Name" src="https://example.com" >}}Quote text{{< /quote >}}
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/shortcodes/quote.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html new file mode 100644 index 0000000..05d0c94 --- /dev/null +++ b/layouts/shortcodes/quote.html @@ -0,0 +1,19 @@ +<blockquote class="blockquote"> + <p> + {{.Inner}} + </p> + {{ if .Get "source" }} + <footer class="blockquote-footer"> + <cite title="by: {{ with .Get "source"}}{{.}}{{ end }}"> + {{ with .Get "src"}} + by + <a href="{{.}}" target="_blank" rel="noopener noreferrer"> + {{ end }} + {{ with .Get "source" }}{{.}}{{ end }} + {{ with .Get "src"}} + </a> + {{ end }} + </cite> + </footer> + {{ end }} +</blockquote> |
