Update alert.ftl

Made template dark mode ready
This commit is contained in:
CN 2024-01-04 10:41:01 +01:00 committed by GitHub
parent af97646bfc
commit 2a2b82f9fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,22 @@
<#macro kw color="">
<#switch color>
<#case "error">
<#assign colorClass="bg-red-100 text-red-600">
<#assign colorClass="bg-red-100 text-red-600 dark:bg-red-200 dark:text-red-700">
<#break>
<#case "info">
<#assign colorClass="bg-blue-100 text-blue-600">
<#assign colorClass="bg-blue-100 text-blue-600 dark:bg-blue-200 dark:text-blue-700">
<#break>
<#case "success">
<#assign colorClass="bg-green-100 text-green-600">
<#assign colorClass="bg-green-100 text-green-600 dark:bg-green-200 dark:text-green-700">
<#break>
<#case "warning">
<#assign colorClass="bg-orange-100 text-orange-600">
<#assign colorClass="bg-orange-100 text-orange-600 dark:bg-orange-200 dark:text-orange-700">
<#break>
<#default>
<#assign colorClass="bg-blue-100 text-blue-600">
<#assign colorClass="bg-blue-100 text-blue-600 dark:bg-blue-200 dark:text-blue-700">
</#switch>
<div class="${colorClass} p-4 rounded-lg text-sm" role="alert">
<div class="${colorClass} px-4 py-3 rounded-lg text-sm" role="alert">
<#nested>
</div>
</#macro>