-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dark splash screen, ref #4398
- Loading branch information
1 parent
787c03a
commit 4e8723b
Showing
6 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches; | ||
|
||
var body = document.querySelector('body'); | ||
var html = document.querySelector('html'); | ||
var defClassName = 'splash-screen'; | ||
|
||
if (!isDark) { | ||
body?.classList.remove(defClassName); | ||
html.classList.remove(defClassName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<!doctype html> | ||
<html class="mode__popup light"> | ||
<html class="mode__popup light splash-screen"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link href="/assets/base.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<body class="splash-screen"> | ||
<div id="app"></div> | ||
<script src="/assets/splash-screen.js"></script> | ||
<script src="browser-polyfill.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters