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) {
|
templ Application(application services.Application) {
|
||||||
<a href={ templ.URL(application.URL) } class="flex items-center hover-effect">
|
<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)
|
@templ.Raw(application.Icon)
|
||||||
</div>
|
</div>
|
||||||
<div class="uppercase truncate ml-2">{ application.Name }</div>
|
<div class="uppercase truncate ml-2">{ application.Name }</div>
|
||||||
|
|
|
@ -102,6 +102,10 @@ func (bs *BookmarkService) replaceIconString() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
color, ok := iconsByTitle[bookmark.Name]
|
color, ok := iconsByTitle[bookmark.Name]
|
||||||
|
if bookmark.OverwriteColor != "" {
|
||||||
|
ok = true
|
||||||
|
color = bookmark.OverwriteColor
|
||||||
|
}
|
||||||
if !(bookmark.IgnoreColor || !ok || color == "") {
|
if !(bookmark.IgnoreColor || !ok || color == "") {
|
||||||
data = []byte(insertColor(string(data), color))
|
data = []byte(insertColor(string(data), color))
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,11 @@ type Link struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Application struct {
|
type Application struct {
|
||||||
Name string
|
Name string
|
||||||
Icon string
|
Icon string
|
||||||
IgnoreColor bool `yaml:"ignore_color"`
|
IgnoreColor bool `yaml:"ignore_color"`
|
||||||
URL string
|
OverwriteColor string `yaml:"overwrite_color"`
|
||||||
|
URL string
|
||||||
}
|
}
|
||||||
|
|
||||||
type SimpleIcons struct {
|
type SimpleIcons struct {
|
||||||
|
|
Loading…
Reference in a new issue