Add Lotusdocs theme
This commit is contained in:
30
themes/lotusdocs/layouts/shortcodes/alert.html
Normal file
30
themes/lotusdocs/layouts/shortcodes/alert.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{ $icon_array := dict
|
||||
"info" "info"
|
||||
"warning" "warning"
|
||||
"success" "check_circle"
|
||||
"danger" "report"
|
||||
"default" "notifications"
|
||||
"primary" "info"
|
||||
}}
|
||||
<div class="alert alert-{{ with .Get "context" }}{{.}}{{ else }}default{{ end }} d-flex" role="alert">
|
||||
<div class="flex-shrink-1 alert-icon">
|
||||
{{ with .Get "icon" }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
<span class="material-icons size-20 me-2">
|
||||
{{ with .Get "context" }}{{ index $icon_array . }}{{ else }}{{ $icon_array.default }}{{ end }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ with .Get "text" }}
|
||||
<div class="w-100">{{ . | $.Page.RenderString }}</div>
|
||||
{{ else }}
|
||||
{{ with .InnerDeindent }}
|
||||
<div class="w-100">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ errorf "No valid text variable or Inner content given"}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user