mirror of https://github.com/jpanther/congo.git
💄 Fix Safari status bar style
Add status bar style meta tag in head.html, add setting same value in appearance.jspull/789/head
parent
c8f648d5c2
commit
088be03f0b
|
@ -8,9 +8,13 @@ function getCSSValue(varName) {
|
|||
|
||||
function setThemeColor() {
|
||||
var metaThemeColor = document.querySelector("meta[name=theme-color]");
|
||||
var metaAppleMobileWebAppStatusBarStyle = document.querySelector("meta[name=apple-mobile-web-app-status-bar-style]");
|
||||
document.documentElement.classList.contains("dark")
|
||||
? metaThemeColor.setAttribute("content", getCSSValue("--color-neutral-800"))
|
||||
: metaThemeColor.setAttribute("content", getCSSValue("--color-neutral"));
|
||||
document.documentElement.classList.contains("dark")
|
||||
? metaAppleMobileWebAppStatusBarStyle.setAttribute("content", getCSSValue("--color-neutral-800"))
|
||||
: metaAppleMobileWebAppStatusBarStyle.setAttribute("content", getCSSValue("--color-neutral"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="rgb(255,255,255)" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="rgb(255,255,255)" />
|
||||
{{/* Title */}}
|
||||
{{ if .IsHome -}}
|
||||
<title>{{ .Site.Title | emojify }}</title>
|
||||
|
|
Loading…
Reference in New Issue