根据 Argon主题模式 & 系统主题外观 改变浏览器色调
This commit is contained in:
parent
7bd54380a7
commit
eff14a1c6a
@ -85,7 +85,20 @@
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<% if mode == 'normal' then %>
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<script type="text/javascript">
|
||||
let prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (prefersDarkMode) {
|
||||
viewport = document.querySelector("meta[name=theme-color]");
|
||||
viewport.setAttribute('content', '#000');
|
||||
}
|
||||
</script>
|
||||
<% elseif mode == 'dark' then %>
|
||||
<meta name="theme-color" content="#000">
|
||||
<% elseif mode == 'light' then %>
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<% end -%>
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
|
@ -81,7 +81,20 @@
|
||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||
<% if mode == 'normal' then %>
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<script type="text/javascript">
|
||||
let prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (prefersDarkMode) {
|
||||
viewport = document.querySelector("meta[name=theme-color]");
|
||||
viewport.setAttribute('content', '#000');
|
||||
}
|
||||
</script>
|
||||
<% elseif mode == 'dark' then %>
|
||||
<meta name="theme-color" content="#000">
|
||||
<% elseif mode == 'light' then %>
|
||||
<meta name="theme-color" content="<%=bar_color%>">
|
||||
<% end -%>
|
||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
||||
<style title="text/css">
|
||||
<% if mode == 'normal' then %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user