]> danix's work - danix2-hugo-theme.git/commitdiff
feat: add quote shortcode template
authorDanilo M. <redacted>
Sun, 5 Apr 2026 07:27:39 +0000 (09:27 +0200)
committerDanilo M. <redacted>
Sun, 5 Apr 2026 07:27:39 +0000 (09:27 +0200)
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 <redacted>
layouts/shortcodes/quote.html [new file with mode: 0644]

diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html
new file mode 100644 (file)
index 0000000..05d0c94
--- /dev/null
@@ -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>