aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/shortcodes/alert.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
committerivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
commit900bb5e845c3ad44defbd427cae3d44a4a43321f (patch)
treedf3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/shortcodes/alert.html
downloadgreatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz
greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/shortcodes/alert.html')
-rw-r--r--code/frontpage/layouts/shortcodes/alert.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/code/frontpage/layouts/shortcodes/alert.html b/code/frontpage/layouts/shortcodes/alert.html
new file mode 100644
index 0000000..e2abe8e
--- /dev/null
+++ b/code/frontpage/layouts/shortcodes/alert.html
@@ -0,0 +1,12 @@
+<div class="alert alert-{{ with .Get "context" }}{{.}}{{ else }}doks{{ end }} d-flex" role="alert">
+ <div class="flex-shrink-1 alert-icon">{{ with .Get "icon" }}{{.}} {{ end }}</div>
+ {{ with .Get "text"}}
+ <div class="w-100">{{ . | safeHTML }} </div>
+ {{ else }}
+ {{ with .Inner}}
+ <div class="w-100"> {{ . | markdownify}}</div>
+ {{ else }}
+ {{ errorf "No valid text variable or Inner content given"}}
+ {{ end }}
+ {{ end}}
+</div>