From 9cf3b3b5b54753d967cc21b4536dd88df7f83772 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 3 May 2024 10:01:47 -0700 Subject: [PATCH] bring back the uwu logo --- .vitepress/config.ts | 8 ++++++++ .vitepress/inlined-scripts/uwu.js | 3 +++ .vitepress/theme/components/Home.vue | 20 ++++++++++++++++++++ src/public/logo-uwu.png | Bin 0 -> 93369 bytes 4 files changed, 31 insertions(+) create mode 100644 .vitepress/inlined-scripts/uwu.js create mode 100644 src/public/logo-uwu.png diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 6b8c13eef..2de27c70d 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -638,6 +638,14 @@ export default defineConfigWithTheme({ 'utf-8' ) ], + [ + 'script', + {}, + fs.readFileSync( + path.resolve(__dirname, './inlined-scripts/uwu.js'), + 'utf-8' + ) + ], [ 'script', { diff --git a/.vitepress/inlined-scripts/uwu.js b/.vitepress/inlined-scripts/uwu.js new file mode 100644 index 000000000..5b25107e4 --- /dev/null +++ b/.vitepress/inlined-scripts/uwu.js @@ -0,0 +1,3 @@ +if (location.search.includes('?uwu')) { + document.documentElement.classList.add('uwu') +} diff --git a/.vitepress/theme/components/Home.vue b/.vitepress/theme/components/Home.vue index 618d8dd36..a101772a3 100644 --- a/.vitepress/theme/components/Home.vue +++ b/.vitepress/theme/components/Home.vue @@ -11,6 +11,7 @@ onMounted(load)