diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-05-24 23:01:12 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-05-24 23:01:12 +0200 |
| commit | 5e4d759614c4b50b004f887c92df2e4d6aead34e (patch) | |
| tree | 5b9ceff6e5d3c90faeb5b0a74523d646561c17cc /layouts/shortcodes | |
| parent | b15201fd9ddb1a6ef9c52f55aab928345da8c59e (diff) | |
Sidenote / alert
Diffstat (limited to 'layouts/shortcodes')
| -rw-r--r-- | layouts/shortcodes/alert.html | 71 |
1 files changed, 12 insertions, 59 deletions
diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index b980b41..bb07868 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -2,72 +2,25 @@ {{ $title := .Get 1 }} <div class="alert-box {{ $severity }}"> - {{ if $title }} - <h3 class="alert-title">{{ $title }}</h3> - {{ end }} - <p> + <h3 class="alert-title flex-row items-center"> {{ if eq $severity "info" }} - <svg - xmlns="http://www.w3.org/2000/svg" - fill="none" - viewBox="0 0 24 24" - stroke-width="1.5" - stroke="currentColor" - class="alert-icon" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" - /> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="alert-icon"> + <path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /> </svg> {{ else if eq $severity "warning" }} - <svg - xmlns="http://www.w3.org/2000/svg" - fill="none" - viewBox="0 0 24 24" - stroke-width="1.5" - stroke="currentColor" - class="alert-icon" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" - /> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="alert-icon"> + <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" /> </svg> {{ else if eq $severity "error" }} - <svg - xmlns="http://www.w3.org/2000/svg" - fill="none" - viewBox="0 0 24 24" - stroke-width="1.5" - stroke="currentColor" - class="alert-icon" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" - /> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="alert-icon"> + <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" /> </svg> {{ else if eq $severity "success" }} - <svg - xmlns="http://www.w3.org/2000/svg" - fill="none" - viewBox="0 0 24 24" - stroke-width="1.5" - stroke="currentColor" - class="alert-icon" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" - /> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="alert-icon"> + <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> - {{ end }} - {{.Inner}} - </p> + {{ if $title }}{{ $title }}{{ end }} + </h3> + <div>{{.Inner | markdownify}}</div> </div> |
