mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-12 14:09:21 +00:00
Use dictionary to pass whether to use a secondaryColor for the badge.
This commit is contained in:
3 files changed
+16
-14
No files matched your search
@@ -1,6 +1,17 @@
|
||||
<span class="flex cursor-pointer">
|
||||
<span
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
{{ . }}
|
||||
{{ $linkTitle := . }}
|
||||
{{ $useSecondaryColor := false }}
|
||||
{{ if (reflect.IsMap . ) }}
|
||||
{{ $linkTitle = .linkTitle }}
|
||||
{{ $useSecondaryColor = cond (not .useSecondaryColor) false .useSecondaryColor }}
|
||||
{{ end }}
|
||||
{{ if $useSecondaryColor }}
|
||||
<span
|
||||
class="rounded-md border border-secondary-400 px-1 py-[1px] text-xs font-normal text-secondary-700 dark:border-secondary-600 dark:text-secondary-400">
|
||||
{{ else }}
|
||||
<span
|
||||
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400">
|
||||
{{ end }}
|
||||
{{ $linkTitle }}
|
||||
</span>
|
||||
</span>
|
||||
Reference in new issue
Block a user