mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 23:32:53 +01:00
feat: introduce Expressive Code for code block rendering (#476)
* feat: improve code block feature with Expressive Code * docs: add example Markdown file for visual review * feat: improve styles of Expressive Code * fix: errors from the merging * chore: formatting * chore: update config * chore: update dependencies * fix: fix build error * fix: minor fixes * fix: style tweaks * docs: update example post * fix: isolate copy button timeouts to avoid cross-button interference --------- Co-authored-by: Hasenpfote <Hasenpfote36@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { expressiveCodeConfig } from "@/config";
|
||||
import type { LIGHT_DARK_MODE } from "@/types/config";
|
||||
import {
|
||||
AUTO_MODE,
|
||||
@@ -42,6 +43,12 @@ export function applyThemeToDocument(theme: LIGHT_DARK_MODE) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the theme for Expressive Code
|
||||
document.documentElement.setAttribute(
|
||||
"data-theme",
|
||||
expressiveCodeConfig.theme,
|
||||
);
|
||||
}
|
||||
|
||||
export function setTheme(theme: LIGHT_DARK_MODE): void {
|
||||
|
||||
Reference in New Issue
Block a user