mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
26.12.2022 e581c4372d39c1f3fafeac06839d2425a4374fbd
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
{{/* Available notice types: danger, info, update */}}
{{- $noticeType := .Get 0 -}}
<div
  class="notice{{ if eq $noticeType "warning" }}
    notice--warning
 
  {{ else if eq $noticeType "update" }}
    notice--update
 
  {{ end }}"
>
  <span
    class="notice__title{{ if eq $noticeType "warning" }}
      notice__title--warning
 
    {{ else if eq $noticeType "update" }}
      notice__title--update
 
    {{ end }}"
  >
    {{- i18n $noticeType -}}
</span>
  {{- $noteContent := (markdownify .Inner | chomp) -}}
  <div class="notice__content">
    {{ $noteContent }}
  </div>
</div>