Add sticker
All checks were successful
Deploy website / deploy (push) Successful in 20s

This commit is contained in:
lumi 2025-08-11 17:30:49 +10:00
parent b3966fbb37
commit 5fc6dafbbb
Signed by: luaneko
GPG Key ID: 406809B8763FF07A
6 changed files with 48 additions and 19 deletions

BIN
src/assets/sticker.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

16
src/components/card.astro Normal file
View File

@ -0,0 +1,16 @@
---
import type { HTMLAttributes, HTMLTag } from "astro/types";
type Props = HTMLAttributes<"section"> & { tag?: HTMLTag };
const { tag: Tag = "section", class: className, ...props } = Astro.props;
---
<Tag
class:list={[
"relative px-5 py-4 min-w-0 min-h-0 overflow-scroll",
"bg-white shadow-xs rounded-xl",
className,
]}
{...props}
>
<slot />
</Tag>

View File

@ -1,13 +1,15 @@
---
import { type UnresolvedImageTransform } from "astro";
import type { HTMLTag } from "astro/types";
import { getImage } from "astro:assets";
type Props = UnresolvedImageTransform & {
tag?: HTMLTag;
id?: string;
class?: string;
};
const { id, class: className, ...transform } = Astro.props;
const { tag: Tag = "span", id, class: className, ...transform } = Astro.props;
const {
src,
options: { width, height },
@ -16,17 +18,16 @@ const {
<style>
.image {
display: inline-block;
width: 100%;
background-size: contain;
background-position: center;
}
</style>
<span
<Tag
id={id}
class:list={["image", className]}
style={{
aspectRatio: width && height ? width / height : undefined,
backgroundImage: `url(${JSON.stringify(src)})`,
}}></span>
}}
/>

View File

@ -0,0 +1,11 @@
---
import Image from "@components/image.astro";
import sticker from "@assets/sticker.gif";
---
<Image
tag="aside"
class="fixed -bottom-14 right-0 -rotate-10 opacity-10 -z-10 w-48 pointer-events-none"
format="webp"
src={sticker}
/>

View File

@ -1,13 +1,11 @@
---
import "./index.css";
import icon from "@assets/icon.png";
import Sticker from "@components/sticker.astro";
import type { HTMLAttributes } from "astro/types";
type Props = {
title?: string;
class?: string;
};
const { title, class: className } = Astro.props;
type Props = HTMLAttributes<"body"> & { title?: string };
const { title, class: className, ...props } = Astro.props;
---
<html lang="en">
@ -37,7 +35,11 @@ const { title, class: className } = Astro.props;
data-domain="lua.re"
src="https://track.lua.re/js/script.js"></script>
</head>
<body class:list={["max-w-screen-sm mx-auto p-4 flex flex-col", className]}>
<body
class:list={["max-w-screen-sm mx-auto p-4 flex flex-col", className]}
{...props}
>
<slot />
<Sticker />
</body>
</html>

View File

@ -1,5 +1,6 @@
---
import Layout from "@layouts/index.astro";
import Card from "@components/card.astro";
import Image from "@components/image.astro";
import miku from "@assets/miku.jpg";
import gato from "@assets/gato.jpg";
@ -9,7 +10,7 @@ const links = {
twt: { alt: "Twitter", href: "https://twitter.com/luanekos" },
mail: { alt: "Email", href: "mailto:lumi(at)lua.re" },
pgp: {
alt: "PGP",
alt: "PGP Key",
href: "https://git.lua.re/luaneko/.profile/raw/branch/master/luaneko.pgp.pub",
},
// bsky: { alt: "Bluesky", href: "https://bsky.app/profile/lua.re" },
@ -17,9 +18,7 @@ const links = {
---
<Layout class="max-h-screen">
<main
class="px-5 py-4 space-y-2 bg-white rounded-lg shadow-xs min-h-0 overflow-scroll"
>
<Card tag="main" class="flex flex-col space-y-2">
<pre>{
` ∧...∧ 𝜗𝜚
( ̳• · • ̳) ᭢
@ -27,7 +26,7 @@ const links = {
}</pre>
<p>hi i'm luaneko ^^</p>
<p>this is my site where i put a bunch of random stuff !</p>
<p><Image src={miku} class="rounded-lg max-w-80" /></p>
<p><Image src={miku} class="block rounded-lg max-w-80" /></p>
<pre>{
` へ
૮ - ՛ ) (˚ˎ 。7
@ -35,9 +34,9 @@ const links = {
乀(ˍ, ل ل じしˍ,)`
}</pre>
<p>i love cats they miau miau</p>
<p><Image src={gato} class="rounded-lg max-w-60" /></p>
<p><Image src={gato} class="block rounded-lg max-w-60" /></p>
<p>best way to contact me is by twt or mail {`<3`}</p>
</main>
</Card>
<footer class="flex flex-row space-x-1 my-2 text-sm">
{