新增pwa
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="theme-color" content="#D3E3FD" id="theme-color-meta">
|
||||
<title></title>
|
||||
<link rel="icon" href="./src/assets/favicon.svg" type="image/svg+xml">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
|
||||
@@ -13,6 +14,9 @@
|
||||
const uiStore = JSON.parse(uiStoreStr)
|
||||
const root = document.documentElement
|
||||
root.setAttribute('class', uiStore.dark ? 'dark' : '');
|
||||
const metaTag = document.getElementById('theme-color-meta');
|
||||
const isMobile = !window.matchMedia("(pointer: fine) and (hover: hover)").matches;
|
||||
metaTag.setAttribute('content', uiStore.dark ? (isMobile ? '#141414' : '#000000') : (isMobile ? '#FFFFFF' : '#D3E3FD'));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user