]> danix's work - danix.xyz-2.git/commitdiff
feat: create Link article type template with external button
authorDanilo M. <redacted>
Wed, 15 Apr 2026 13:50:42 +0000 (15:50 +0200)
committerDanilo M. <redacted>
Wed, 15 Apr 2026 13:50:42 +0000 (15:50 +0200)
themes/danix-xyz-hacker/layouts/partials/article-types/link.html [new file with mode: 0644]

diff --git a/themes/danix-xyz-hacker/layouts/partials/article-types/link.html b/themes/danix-xyz-hacker/layouts/partials/article-types/link.html
new file mode 100644 (file)
index 0000000..bbf7906
--- /dev/null
@@ -0,0 +1,17 @@
+<div class="mb-8 p-6 bg-surface/30 border border-accent/30 rounded-lg">
+  <a
+    href="{{ .Params.external_url }}"
+    target="_blank"
+    rel="noopener noreferrer"
+    class="inline-flex items-center gap-2 px-6 py-3 bg-accent text-white rounded font-semibold hover:opacity-90 transition-opacity"
+  >
+    {{ .Params.link_title | default (i18n "readMore") }}
+    <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
+    </svg>
+  </a>
+</div>
+
+<div class="prose prose-invert max-w-none mb-12">
+  {{ .Content }}
+</div>