mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
parent
7c97f7b610
commit
3dc2f9a629
1 changed files with 8 additions and 6 deletions
|
@ -1478,6 +1478,14 @@ function updateTheme( detail ){
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(function(){
|
||||||
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||||
|
initChroma( true );
|
||||||
|
initMermaid( true );
|
||||||
|
initOpenapi( true );
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
function useMermaid( config ){
|
function useMermaid( config ){
|
||||||
if( !Object.assign ){
|
if( !Object.assign ){
|
||||||
// We don't support Mermaid for IE11 anyways, so bail out early
|
// We don't support Mermaid for IE11 anyways, so bail out early
|
||||||
|
@ -1665,9 +1673,3 @@ ready( function(){
|
||||||
moveTopbarButtons();
|
moveTopbarButtons();
|
||||||
adjustEmptyTopbarContents();
|
adjustEmptyTopbarContents();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(function(){
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
|
||||||
initOpenapi( true );
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
Loading…
Reference in a new issue