website/layouts/partials/admonition.html
{{ $info := "blue-400" }} {{ $success := "green-400" }} {{ $danger := "red-400" }} {{ $warning := "yellow-400" }} {{ $requirement := "violet-400" }} {{ $quote := "gray-400" }} {{ $types := dict "info" $info "success" $success "danger" $danger "warning" $warning "requirement" $requirement "quote" $quote }} {{ $color := index $types .type }} {{ $dimension := 6 }} {{ $viewBox := cond (eq .type "requirement") 24 20 }}
{{ if eq .type "info" }} {{/* Heroicon: solid/information-circle */}} {{ end }} {{ if eq .type "success" }} {{/* Heroicon: solid/check-circle */}} {{ end }} {{ if eq .type "danger" }} {{/* Heroicon: solid/x-circle */}} {{ end }} {{ if eq .type "warning" }} {{/* Heroicon: solid/exclamation */}} {{ end }} {{ if eq .type "requirement" }} {{/* Heroicon: solid/code */}} {{ end }} {{ if eq .type "quote" }} {{/* Heroicon: solid/speakerphone */}} {{ end }}
{{ with .title }} {{ . | markdownify }} {{ end }} {{ .content | markdownify }}