mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: add callout support (#655)
* feat: toggle .dark class on theme change * feat: add callouts with rehype-callouts plugin * docs: update blog posts with callouts
This commit is contained in:
@@ -21,7 +21,9 @@ function persist(): void {
|
||||
}
|
||||
|
||||
function reflect(): void {
|
||||
document.firstElementChild?.setAttribute("data-theme", themeValue);
|
||||
const root = document.firstElementChild;
|
||||
root?.setAttribute("data-theme", themeValue);
|
||||
root?.classList.toggle("dark", themeValue === DARK);
|
||||
document.querySelector("#theme-btn")?.setAttribute("aria-label", themeValue);
|
||||
|
||||
// Fill <meta name="theme-color"> with the computed background colour so
|
||||
|
||||
Reference in New Issue
Block a user