Add option of background

This commit is contained in:
Florian Hoss 2023-10-03 18:17:06 +00:00
parent dba27e3368
commit f7adb14a25
2 changed files with 8 additions and 6 deletions

View file

@ -6,6 +6,7 @@ type Config struct {
Category string Category string
Entries []struct { Entries []struct {
Name string Name string
Background bool
URL string URL string
} }
} }
@ -14,6 +15,7 @@ type Config struct {
Entries []struct { Entries []struct {
Name string Name string
Icon string Icon string
Background bool
URL string URL string
} }
} }

View file

@ -287,7 +287,7 @@
<div class="grid-apps"> <div class="grid-apps">
{{ range .Entries }} {{ range .Entries }}
<a href="{{ .URL }}" class="bookmark-link flex items-center hover-effect"> <a href="{{ .URL }}" class="bookmark-link flex items-center hover-effect">
<div class="img rounded w-8 h-8 bg-contain bg-center bg-no-repeat opacity-90" style="background-image: url({{ .Icon }})"></div> <div class="{{ if .Background }}bg-white {{ end }}img rounded w-8 h-8 bg-contain bg-center bg-no-repeat opacity-90" style="background-image: url({{ .Icon }})"></div>
<div class="uppercase truncate ml-2">{{ .Name }}</div> <div class="uppercase truncate ml-2">{{ .Name }}</div>
</a> </a>
{{ end }} {{ end }}