From ea4931880908750d70d469344750ffefbc3c50db Mon Sep 17 00:00:00 2001 From: StarHeart Date: Wed, 1 May 2024 22:28:36 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20Docs:=20=E6=B7=BB=E5=8A=A0=20uwu=20log?= =?UTF-8?q?o=20(#2689)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/docusaurus.config.js | 6 ++++++ website/src/components/Home/Hero.tsx | 1 + website/src/components/Home/styles.css | 13 +++++++++++++ website/static/img/uwu.svg | 1 + website/static/uwu.js | 2 ++ 5 files changed, 23 insertions(+) create mode 100644 website/static/img/uwu.svg create mode 100644 website/static/uwu.js diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 0b999a00..e3eaf796 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -251,6 +251,12 @@ const siteConfig = { src: "https://cdn.wwads.cn/js/makemoney.js", async: true, }, + // uwu logo + { + type: "text/javascript", + charset: "UTF-8", + src: "/uwu.js", + }, ], presets: [ diff --git a/website/src/components/Home/Hero.tsx b/website/src/components/Home/Hero.tsx index 8c1dc036..3ba0dc31 100644 --- a/website/src/components/Home/Hero.tsx +++ b/website/src/components/Home/Hero.tsx @@ -47,6 +47,7 @@ function HomeHero(): JSX.Element { return (
+ uwu {logo!.alt}

None diff --git a/website/src/components/Home/styles.css b/website/src/components/Home/styles.css index fd15a2b9..898ac316 100644 --- a/website/src/components/Home/styles.css +++ b/website/src/components/Home/styles.css @@ -39,3 +39,16 @@ @apply inline-block !max-w-[600px]; } } + +.home-hero-uwu { + @apply hidden; +} + +[data-uwu=true] .home-hero-uwu { + @apply block max-w-xs; +} + +[data-uwu=true] .home-hero-logo, +[data-uwu=true] .home-hero-title { + @apply hidden; +} diff --git a/website/static/img/uwu.svg b/website/static/img/uwu.svg new file mode 100644 index 00000000..fd432f26 --- /dev/null +++ b/website/static/img/uwu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/static/uwu.js b/website/static/uwu.js new file mode 100644 index 00000000..b29baefa --- /dev/null +++ b/website/static/uwu.js @@ -0,0 +1,2 @@ +if (location.search.includes("?uwu")) + document.documentElement.setAttribute("data-uwu", "true");