change 404 image

This commit is contained in:
artie 2024-05-09 19:07:49 +02:00
parent 0c245b3fd9
commit fc5e55278a
3 changed files with 35 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

BIN
src/assets/notFound.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

View File

@ -1,14 +1,43 @@
--- ---
import Prompt from "../components/Prompt.astro"; import Prompt from "../components/Prompt.astro";
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import ayuaura from "../assets/ayuaura.jpg" import notFound from "../assets/notFound.png";
--- ---
<Layout title="404"> <Layout title="404">
<Prompt /> <Prompt />
<p class="font-bold lg:text-6xl text-4xl text-ctp-pink"> <img
404 draggable="false"
</p> src={notFound.src}
<img src={ayuaura.src} alt="ayuaura" class="mt-3 rounded-[20px] lg:w-[50vw] w-[75vw]"> alt="404 Not Found"
<a href="/" class="font-medium lg:text-2xl text-xl mt-3 underline text-ctp-pink hover:text-ctp-red">take me home</a> class="w-[50rem]"
/>
<a
href="/"
class="home font-medium lg:text-2xl text-xl mt-3 underline text-ctp-pink hover:text-ctp-red"
>take me home</a
>
</Layout> </Layout>
<script>
const anchor = document.querySelector("a");
anchor?.addEventListener("contextmenu", (e) => {
const img = document.querySelector<HTMLImageElement>("img");
if (!img) return;
e.preventDefault();
img.replaceWith(
// })
Object.assign(document.createElement("video"), {
src: "https://cdn.artie.moe/country-road.mp4",
poster: "https://pbs.twimg.com/media/FVI89ICUYAIicVt.jpg:large",
controls: true,
playsinline: true,
})
);
const video = document.querySelector("video");
video.classList.add("w-[50rem]", "max-w-full", "aspect-video");
});
</script>