mirror of https://github.com/luizdepra/hugo-coder.git

Simon Hollingshead
31.39.2024 1fdac008175cba35ad5cbbac619671774c0e1afe
layouts/shortcodes/notice.html
@@ -1,10 +1,10 @@
{{- $type := .Get 0 -}}
{{- $title := .Get 1 | default $type -}}
{{- $inner := .Inner | .Page.RenderString | chomp -}}
{{- $icon := dict "note" "fa-sticky-note" "tip" "fa-lightbulb-o" "example" "fa-file-text" "question" "fa-question" "info" "fa-exclamation-circle" "warning" "fa-exclamation-triangle" "error" "fa-times-circle" -}}
{{- $icon := dict "note" "fa-sticky-note" "tip" "fa-lightbulb" "example" "fa-file-text" "question" "fa-question" "info" "fa-exclamation-circle" "warning" "fa-exclamation-triangle" "error" "fa-times-circle" -}}
<div class="notice {{ $type }}">
  <div class="notice-title">
    <i class="fa {{ index $icon $type }}" aria-hidden="true"></i>{{ i18n $title | default $title | humanize }}
    <i class="fa-solid {{ index $icon $type }}" aria-hidden="true"></i>{{ i18n $title | default $title | humanize }}
  </div>
  <div class="notice-content">
    {{- $inner -}}