First commit
Some checks failed
Blowfish Docs Deploy / build (push) Has been cancelled
Blowfish Docs Deploy / deploy (push) Has been cancelled
Test Build / Build Example Site (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Update Hugo version / updateBlowfish (push) Has been cancelled
Some checks failed
Blowfish Docs Deploy / build (push) Has been cancelled
Blowfish Docs Deploy / deploy (push) Has been cancelled
Test Build / Build Example Site (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Update Hugo version / updateBlowfish (push) Has been cancelled
Delete exampleSite Add initial content, images & docker-compose.yml Use extend-head.html for analytics Set remote url to gitea.novicelab.io Remove original .git due to "shallow update not allowed" error
This commit is contained in:
37
layouts/shortcodes/alert.html
Normal file
37
layouts/shortcodes/alert.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get "icon") ) }}
|
||||
{{ $.Scratch.Set "cardColor" (.Get "cardColor") }}
|
||||
{{ $.Scratch.Set "iconColor" (.Get "iconColor") }}
|
||||
{{ $.Scratch.Set "textColor" (.Get "textColor") }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "icon" (default "triangle-exclamation" (.Get 0) ) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div
|
||||
{{ if not ($.Scratch.Get "cardColor") }}
|
||||
class="flex px-4 py-3 rounded-md shadow bg-primary-100 dark:bg-primary-900"
|
||||
{{ else }}
|
||||
class="flex px-4 py-3 rounded-md shadow" style="background-color: {{ $.Scratch.Get "cardColor" }}"
|
||||
{{ end }}
|
||||
>
|
||||
<span
|
||||
{{ if not ($.Scratch.Get "iconColor") }}
|
||||
class="text-primary-400 pe-3 flex items-center"
|
||||
{{ else }}
|
||||
class="pe-3 flex items-center" style="color: {{ $.Scratch.Get "iconColor" }}"
|
||||
{{ end }}
|
||||
>
|
||||
{{ partial "icon.html" ($.Scratch.Get "icon") }}
|
||||
</span>
|
||||
|
||||
<span
|
||||
{{ if not ($.Scratch.Get "textColor") }}
|
||||
class="dark:text-neutral-300"
|
||||
{{ else }}
|
||||
style="color: {{ $.Scratch.Get "textColor" }}"
|
||||
{{ end }}
|
||||
>
|
||||
{{- .Inner | markdownify -}}
|
||||
</span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user