Skip to content

Commit 219df9d

Browse files
committed
Set primary color to meta theme-color
1 parent e6e2795 commit 219df9d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- Web App Config -->
88
<title>SnapShare</title>
99
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
10-
<meta name="theme-color" content="#3367d6">
10+
<meta name="theme-color" content="">
1111
<meta name="color-scheme" content="dark light">
1212
<meta name="apple-mobile-web-app-capable" content="no">
1313
<meta name="apple-mobile-web-app-title" content="SnapShare">

client/scripts/theme.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
// Overwrite css primary color variable
2121
if (window.snapshareConfig.PRIMARY_COLOR) {
2222
document.documentElement.style.setProperty('--primary-color', window.snapshareConfig.PRIMARY_COLOR);
23+
24+
// update theme-color meta tag
25+
document.querySelector("meta[name=theme-color]").setAttribute("content", window.snapshareConfig.PRIMARY_COLOR);
2326
}
2427

2528
// Listen for a click on the button

0 commit comments

Comments
 (0)