Allow fixed color
This commit is contained in:
parent
efce5162da
commit
8ad7cc0fa4
3 changed files with 10 additions and 5 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
templ Application(application services.Application) {
|
||||
<a href={ templ.URL(application.URL) } class="flex items-center hover-effect">
|
||||
<div class="w-8 h-8 dark:text-white fill-current">
|
||||
<div class="w-8 h-8 dark:text-white fill-current flex items-center">
|
||||
@templ.Raw(application.Icon)
|
||||
</div>
|
||||
<div class="uppercase truncate ml-2">{ application.Name }</div>
|
||||
|
|
|
@ -102,6 +102,10 @@ func (bs *BookmarkService) replaceIconString() {
|
|||
continue
|
||||
}
|
||||
color, ok := iconsByTitle[bookmark.Name]
|
||||
if bookmark.OverwriteColor != "" {
|
||||
ok = true
|
||||
color = bookmark.OverwriteColor
|
||||
}
|
||||
if !(bookmark.IgnoreColor || !ok || color == "") {
|
||||
data = []byte(insertColor(string(data), color))
|
||||
}
|
||||
|
|
|
@ -22,10 +22,11 @@ type Link struct {
|
|||
}
|
||||
|
||||
type Application struct {
|
||||
Name string
|
||||
Icon string
|
||||
IgnoreColor bool `yaml:"ignore_color"`
|
||||
URL string
|
||||
Name string
|
||||
Icon string
|
||||
IgnoreColor bool `yaml:"ignore_color"`
|
||||
OverwriteColor string `yaml:"overwrite_color"`
|
||||
URL string
|
||||
}
|
||||
|
||||
type SimpleIcons struct {
|
||||
|
|
Loading…
Reference in a new issue