-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] pre-commit autoupdate (#151)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 23.10.1 → 23.12.1](psf/black@23.10.1...23.12.1) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](PyCQA/isort@5.12.0...5.13.2) - [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.0.3...v4.0.0-alpha.8) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9d07ad2
commit 78ea078
Showing
12 changed files
with
52 additions
and
52 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
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,6 +1,6 @@ | ||
name: Issue | ||
description: General Issue | ||
title: '[MISC]: ' | ||
title: "[MISC]: " | ||
labels: [] | ||
body: | ||
- type: markdown | ||
|
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,6 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: monthly |
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
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
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,30 +1,30 @@ | ||
console.log('RUNNING CUSTOM JAVASCRIPT') | ||
console.log("RUNNING CUSTOM JAVASCRIPT"); | ||
|
||
function getBodyThemeName() { | ||
var bodyTheme = document.body.dataset.theme | ||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches | ||
var bodyTheme = document.body.dataset.theme; | ||
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches; | ||
|
||
if (bodyTheme === 'auto') { | ||
if (bodyTheme === "auto") { | ||
if (prefersDark) { | ||
bodyTheme = 'dark' | ||
bodyTheme = "dark"; | ||
} else { | ||
bodyTheme = 'light' | ||
bodyTheme = "light"; | ||
} | ||
} | ||
|
||
return bodyTheme | ||
return bodyTheme; | ||
} | ||
|
||
document.documentElement.setAttribute('theme', getBodyThemeName()) | ||
document.documentElement.setAttribute("theme", getBodyThemeName()); | ||
|
||
var observer = new MutationObserver(function (mutations) { | ||
mutations.forEach(function (mutation) { | ||
if (mutation.type == 'attributes') { | ||
var bodyTheme = getBodyThemeName() | ||
console.log('document.body.dataset.theme changed to ' + bodyTheme) | ||
document.documentElement.setAttribute('theme', bodyTheme) | ||
if (mutation.type == "attributes") { | ||
var bodyTheme = getBodyThemeName(); | ||
console.log("document.body.dataset.theme changed to " + bodyTheme); | ||
document.documentElement.setAttribute("theme", bodyTheme); | ||
} | ||
}) | ||
}) | ||
}); | ||
}); | ||
|
||
observer.observe(document.body, { attributeFilter: ['data-theme'] }) | ||
observer.observe(document.body, { attributeFilter: ["data-theme"] }); |
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
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