diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-22 12:42:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-22 12:42:56 +0200 |
| commit | 631547a75142326a7c71bdf123e1475217a5ad73 (patch) | |
| tree | f3cfef6b3c5b42bf626fc823ddcf63b8dcf4cdbb /layouts/partials/article-types | |
| parent | 77ccbe72fad5a4870185fff374f75471c16a9043 (diff) | |
| download | danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.tar.gz danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.zip | |
chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme)
Diffstat (limited to 'layouts/partials/article-types')
| -rw-r--r-- | layouts/partials/article-types/life.html | 3 | ||||
| -rw-r--r-- | layouts/partials/article-types/link.html | 17 | ||||
| -rw-r--r-- | layouts/partials/article-types/photo.html | 19 | ||||
| -rw-r--r-- | layouts/partials/article-types/quote.html | 15 | ||||
| -rw-r--r-- | layouts/partials/article-types/tech.html | 3 |
5 files changed, 57 insertions, 0 deletions
diff --git a/layouts/partials/article-types/life.html b/layouts/partials/article-types/life.html new file mode 100644 index 0000000..01cd8b8 --- /dev/null +++ b/layouts/partials/article-types/life.html @@ -0,0 +1,3 @@ +<div class="prose prose-invert max-w-none mb-12"> + {{ .Content }} +</div> diff --git a/layouts/partials/article-types/link.html b/layouts/partials/article-types/link.html new file mode 100644 index 0000000..bbf7906 --- /dev/null +++ b/layouts/partials/article-types/link.html @@ -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> diff --git a/layouts/partials/article-types/photo.html b/layouts/partials/article-types/photo.html new file mode 100644 index 0000000..743e02a --- /dev/null +++ b/layouts/partials/article-types/photo.html @@ -0,0 +1,19 @@ +{{ if .Params.featured_image }} +<figure class="mb-8"> + <img + src="{{ .Params.featured_image }}" + alt="{{ .Title }}" + loading="lazy" + class="w-full h-auto rounded-lg border border-border/30" + /> + {{ if .Params.featured_image_caption }} + <figcaption class="bg-surface/30 p-4 text-sm text-text-dim rounded-b-lg"> + {{ .Params.featured_image_caption }} + </figcaption> + {{ end }} +</figure> +{{ end }} + +<div class="prose prose-invert max-w-none mb-12"> + {{ .Content }} +</div> diff --git a/layouts/partials/article-types/quote.html b/layouts/partials/article-types/quote.html new file mode 100644 index 0000000..f27d189 --- /dev/null +++ b/layouts/partials/article-types/quote.html @@ -0,0 +1,15 @@ +<blockquote class="mb-8 pl-6 border-l-4 border-[--type-quote] italic text-2xl text-text"> + "{{ .Params.quote_text }}" +</blockquote> + +{{ if .Params.quote_author }} +<div class="text-right text-text-dim mb-12"> + — {{ .Params.quote_author }} +</div> +{{ end }} + +{{ if .Content }} +<div class="prose prose-invert max-w-none"> + {{ .Content }} +</div> +{{ end }} diff --git a/layouts/partials/article-types/tech.html b/layouts/partials/article-types/tech.html new file mode 100644 index 0000000..01cd8b8 --- /dev/null +++ b/layouts/partials/article-types/tech.html @@ -0,0 +1,3 @@ +<div class="prose prose-invert max-w-none mb-12"> + {{ .Content }} +</div> |
