summaryrefslogtreecommitdiff
path: root/layouts/_markup/render-blockquote.html
blob: 2dff9b8de84bcfc799fd62b317cf094b7a344e07 (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
30
{{ $emojis := dict
  "caution" "🚨"
  "important" "☝️"
  "note" "ℹ️"
  "tip" "💡"
  "warning" "⚠️"
  "announcement" "📣"
}}

{{ if eq .Type "alert" }}
  <blockquote class="rounded-1 leading-[1.75] mx-0 px-5
      flex gap-3 my-2 alert-{{ .AlertType }}"
      style="background-color: oklch(from var(--block-background-color) l c h / calc(alpha - 0.5))"
  >
    <div class="py-5">
      {{ with .AlertTitle }}
        {{.}}
      {{ else }}
        {{ index $emojis .AlertType }}
      {{ end }}
    </div>
    <div>
        {{ .Text }}
    </div>
  </blockquote>
{{ else }}
  <blockquote class="quoted p-0 m-0 mx-[1em]">
      {{ .Text }}
  </blockquote>
{{ end }}