Implement meta tags

This commit is contained in:
2025-07-13 11:17:56 +01:00
parent 060f7942af
commit 15c4aa5643
10 changed files with 77 additions and 1 deletions

BIN
public/meta/img1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
public/meta/img2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
public/meta/img3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
public/meta/img4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
public/meta/img5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
public/meta/img6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

18
src/components/Meta.jsx Normal file
View File

@@ -0,0 +1,18 @@
export default function Meta({ title, description, image, url = "https://fluttershub.com" }) {
return (
<>
<title>{title}</title>
<meta property="og:url" content={url} />
<meta property="og:type" content="website" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
<meta property="og:image:secure_url" content={image} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={image} />
<meta name="theme-color" content="#00ff99" />
</>
);
}

0
src/components/ogp.jsx Normal file
View File

View File

@@ -1,16 +1,19 @@
---
import Meta from "../layouts/Meta.astro";
import CenteredImage from "../components/CenteredImage.jsx";
import ButtonGrid from "../components/ButtonGrid.jsx";
import TypewriterLoader from "../components/TypewriterLoader.jsx";
import Greeting from "../components/Greeting.jsx";
import ConsoleArt from '../components/Console.jsx';
---
<html lang="en" class="h-full bg-gray-900 text-white">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Landing Page</title>
<Meta />
</head>
<body
class="relative h-full min-h-screen overflow-hidden flex items-center justify-center"

55
src/layouts/Meta.astro Normal file
View File

@@ -0,0 +1,55 @@
---
const images = [
"/meta/img1.png",
"/meta/img2.png",
"/meta/img3.png",
"/meta/img4.png",
"/meta/img5.png",
"/meta/img6.png",
];
const titles = [
"Phoenix's Hacker Den",
"404: Privacy Not Found",
"Uplink: British Edition",
"The Cookie Exploiter Zone",
"Gacha Addiction Headquarters",
"Kasane Teto Left Her VPN On",
"Sniffing Your WiFi Packets...",
"Miku's Secret LAN Party",
"Debugging Your Fridge...",
"Terminal Overlord Vibes",
];
const descriptions = [
"We got cookies, milk, and highly suspicious scripts 👀",
"Accessing your fridge in dark mode... 🍪",
"Decrypting your browser history for maximum dopamine.",
"Injecting pizza delivery payloads into your router.",
"I swear I'm just rolling *one* more gacha pull...",
"Kasane Teto left some suspicious .exe files here.",
"Miku is streaming your WiFi logs to the moon 🌕",
"Currently hacking your WiFi. Buffering... 🔥",
"Just an idiot building pity, nothing else.",
"Installing vocaloid drivers on your toaster...",
];
const image = images[Math.floor(Math.random() * images.length)];
const title = titles[Math.floor(Math.random() * titles.length)];
const description = descriptions[Math.floor(Math.random() * descriptions.length)];
---
<title>{title}</title>
<meta property="og:url" content="https://fluttershub.com" />
<meta property="og:type" content="website" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
<meta property="og:image:secure_url" content={image} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={image} />
<meta name="theme-color" content="#b00b69" />