From bcc5e97fd9f08a1c4caa625ed5515ebfdb3cef10 Mon Sep 17 00:00:00 2001 From: Lyric <5h3ll3x@gmail.com> Date: Wed, 21 Feb 2024 17:02:43 -0800 Subject: [PATCH] switch img src according to the theme --- .../theme/components/ThemedImageSwitch.vue | 91 +++++++++++++++++++ 1000-hours/.vitepress/theme/index.ts | 1 + 1000-hours/.vitepress/theme/layouts/index.vue | 2 + .../public/images/speech-tract-l.dark.svg | 27 ++++++ .../public/images/speech-tract-l.light.svg | 27 ++++++ 1000-hours/sounds-of-english/23-l.md | 2 + 6 files changed, 150 insertions(+) create mode 100644 1000-hours/.vitepress/theme/components/ThemedImageSwitch.vue create mode 100644 1000-hours/public/images/speech-tract-l.dark.svg create mode 100644 1000-hours/public/images/speech-tract-l.light.svg diff --git a/1000-hours/.vitepress/theme/components/ThemedImageSwitch.vue b/1000-hours/.vitepress/theme/components/ThemedImageSwitch.vue new file mode 100644 index 00000000..1e8e9284 --- /dev/null +++ b/1000-hours/.vitepress/theme/components/ThemedImageSwitch.vue @@ -0,0 +1,91 @@ + + + + + + diff --git a/1000-hours/.vitepress/theme/index.ts b/1000-hours/.vitepress/theme/index.ts index 7e61e7d3..61a71b0b 100644 --- a/1000-hours/.vitepress/theme/index.ts +++ b/1000-hours/.vitepress/theme/index.ts @@ -16,6 +16,7 @@ export default { // }, enhanceApp({ app, router, siteData }) { // ... + app.component('Image', Image) app.component('SpeakWord', SpeakWord) } } satisfies Theme diff --git a/1000-hours/.vitepress/theme/layouts/index.vue b/1000-hours/.vitepress/theme/layouts/index.vue index e4580981..cee94a85 100644 --- a/1000-hours/.vitepress/theme/layouts/index.vue +++ b/1000-hours/.vitepress/theme/layouts/index.vue @@ -1,6 +1,7 @@