Meta theme color (#547)
* feat(theme/index): Add meta tag for theme-color * feat(theme/book): Sync theme-color meta tag with the current theme
This commit is contained in:
parent
61fad2786b
commit
b0e91193e9
|
@ -161,6 +161,10 @@ $( document ).ready(function() {
|
|||
ace_theme = "ace/theme/dawn";
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
document.querySelector('meta[name="theme-color"]').content = getComputedStyle(document.body).backgroundColor;
|
||||
}, 1);
|
||||
|
||||
if (window.ace && window.editors) {
|
||||
window.editors.forEach(function(editor) {
|
||||
editor.setTheme(ace_theme);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<meta name="description" content="{{ description }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
|
||||
<base href="{{ path_to_root }}">
|
||||
|
||||
|
|
Loading…
Reference in New Issue