Check if background color is nil before setting

This commit is contained in:
Svilen Markov 2024-05-09 04:05:25 +01:00 committed by GitHub
parent ecbad7ce6c
commit 461c984317
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Glance">
<meta name="theme-color" content="{{ .App.Config.Theme.BackgroundColor }}">
<meta name="theme-color" content="{{ if ne nil .App.Config.Theme.BackgroundColor }}{{ .App.Config.Theme.BackgroundColor }}{{ else }}hsl(240, 8%, 9%){{ end }}">
<link rel="apple-touch-icon" sizes="512x512" href="/static/app-icon.png">
<link rel="icon" type="image/png" sizes="512x512" href="/static/app-icon.png">
<link rel="manifest" href="/static/manifest.json">