Skip to content

Commit

Permalink
fix: ios pwa color
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 3, 2024
1 parent b291d01 commit eb6612e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
run: bun x changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="NEZHA" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="theme-color" content="#242424" />
<title>NEZHA</title>
<script>
Expand Down
5 changes: 3 additions & 2 deletions src/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ export function ThemeProvider({
: "light";

root.classList.add(systemTheme);
const themeColor = systemTheme === "dark" ? "#242424" : "#fafafa";
const themeColor =
systemTheme === "dark" ? "hsl(30 15% 8%)" : "hsl(0 0% 98%)";
document
.querySelector('meta[name="theme-color"]')
?.setAttribute("content", themeColor);
return;
}

root.classList.add(theme);
const themeColor = theme === "dark" ? "#242424" : "#fafafa";
const themeColor = theme === "dark" ? "hsl(30 15% 8%)" : "hsl(0 0% 98%)";
document
.querySelector('meta[name="theme-color"]')
?.setAttribute("content", themeColor);
Expand Down

0 comments on commit eb6612e

Please sign in to comment.