summaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/article-header.html9
1 files changed, 5 insertions, 4 deletions
diff --git a/themes/danix-xyz-hacker/layouts/partials/article-header.html b/themes/danix-xyz-hacker/layouts/partials/article-header.html
index 16ebb8c..63b2a97 100644
--- a/themes/danix-xyz-hacker/layouts/partials/article-header.html
+++ b/themes/danix-xyz-hacker/layouts/partials/article-header.html
@@ -1,12 +1,13 @@
{{ $articleType := .Params.type | default "life" }}
{{ $typeConfig := .Site.Params.articleTypes }}
{{ $typeData := index $typeConfig $articleType }}
+{{ $hasType := .Params.type }}
<div class="mb-8 pb-8 border-b border-border">
<!-- Title with accent corner -->
<div class="relative mb-6">
<!-- Vertical accent line (left side) -->
- {{ if $typeData }}
+ {{ if and $typeData $hasType }}
<div
class="absolute left-0 top-0 bottom-0 w-1 rounded-full"
style="background-color: var(--type-{{ $articleType }});"
@@ -14,7 +15,7 @@
{{ end }}
<!-- Horizontal accent line (bottom, 50% width with fade) -->
- {{ if $typeData }}
+ {{ if and $typeData $hasType }}
<div
class="absolute left-0 bottom-0 h-1 rounded-full"
style="width: 50%; background: linear-gradient(to right, var(--type-{{ $articleType }}), var(--type-{{ $articleType }}) 0%, transparent 100%);"
@@ -61,8 +62,8 @@
{{ end }}
<!-- Type badge -->
- {{ if $typeData }}
- <span class="badge badge-{{ $articleType }}">
+ {{ if and $typeData $hasType }}
+ <span class="inline-flex items-center px-2.5 py-1 rounded text-sm font-mono font-semibold whitespace-nowrap transition-all duration-200 text-white" style="background-color: var(--type-{{ $articleType }}); border: 1px solid var(--type-{{ $articleType }});">
{{ i18n $articleType }}
</span>
{{ end }}