summaryrefslogtreecommitdiff
path: root/layouts/_markup/render-blockquote.html
blob: 9dbd47403aaf0ca5cc47b64df742e3e9073b6968 (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: rgba(var(--block-background-color-rgb), 0.5)"
  >
    <div class="py-5">
      {{ with .AlertTitle }}
        {{.}}
      {{ else }}
        {{ index $emojis .AlertType }}
      {{ end }}
    </div>
    <div>
        {{ .Text }}
    </div>
  </blockquote>
{{ else }}
  <blockquote class="text-secondary p-0 m-0 ml-[1em]">
    {{ .Text }}
  </blockquote>
{{ end }}