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

@ -5,16 +5,18 @@ type Config struct {
Links []struct {
Category string
Entries []struct {
Name string
URL string
Name string
Background bool
URL string
}
}
Applications []struct {
Category string
Entries []struct {
Name string
Icon string
URL string
Name string
Icon string
Background bool
URL string
}
}
}

View file

@ -287,7 +287,7 @@
<div class="grid-apps">
{{ range .Entries }}
<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>
</a>
{{ end }}