summaryrefslogtreecommitdiffstats
path: root/layouts/partials/article-header.html
blob: abc7689e2ba8147b6b71271f83651b865d2b356b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{{ $articleType := .Params.type | default "life" }}
{{ $typeConfig := .Site.Params.articleTypes }}
{{ $typeData := index $typeConfig $articleType }}
{{ $hasType := .Params.type }}

<div class="mb-8">
  <!-- Title with accent corner -->
  <div class="relative mb-6">
    <!-- Vertical accent line (left side) -->
    {{ if and $typeData $hasType }}
    <div
      class="absolute left-0 top-0 bottom-0 w-1 rounded-full"
      style="background-color: var(--type-{{ $articleType }});"
    ></div>
    {{ end }}

    <!-- Horizontal accent line (bottom, 50% width with fade) -->
    {{ 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%);"
    ></div>
    {{ end }}

    <h1 class="text-4xl md:text-5xl font-bold text-accent pl-6 pt-2">
      {{ .Title }}
    </h1>
  </div>
</div>