refactor: 清理无用资源并更新项目配置

删除大量未使用的图标、图片和组件文件
更新.gitignore、tsconfig.json和astro配置
添加新的工具函数和UI组件
修改项目元数据和依赖项
This commit is contained in:
joyzhao
2025-06-13 12:03:15 +08:00
parent 43d830aa27
commit c1bfb0915e
145 changed files with 1901 additions and 13996 deletions

View File

@@ -1,94 +1,83 @@
---
import "../styles/global.css";
import Header from "../components/layout/Header.astro";
import Footer from "../components/layout/Footer.astro";
import SpeedInsights from "@vercel/speed-insights/astro"
const {
pageTitle = "NeonMint by EFEELE 🚀",
description = "Welcome to NeonMint by EFEELE, where I develop software and share knowledge.",
ogimage = {
url: "/images/imagedefault.webp",
alt: "Default image of EFEELE",
},
} = Astro.props;
const siteUrl = new URL(Astro.url).origin;
const SEO = {
sitename: "NeonMint by EFEELE🚀",
url: siteUrl,
locale: "en_US",
author: "Fernando Lopez | EFEELE",
twitter: "@efeeledev",
};
interface Props {
title?: string;
description?: string;
}
const twitterimage = `${siteUrl}${ogimage.url}`;
const { title = "Rishikesh S - Portfolio", description = "My Portfolio" } =
Astro.props;
---
<html
lang="en"
class="dark:bg-[#0E0E11] bg-mint-50/5 font-montserrat scroll-smooth"
>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>{pageTitle}</title>
<!-- Favicon for different platforms -->
<link rel="icon" href="/favicon-32x32.png" sizes="32x32" />
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="icon" href="/android-chrome-192x192.png" sizes="192x192" />
<link rel="icon" href="/android-chrome-512x512.png" sizes="512x512" />
<!-- Web manifest -->
<link rel="manifest" href="/site.webmanifest" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<meta name="description" content={description} />
<meta name="author" content={SEO.author} />
<meta name="robots" content="index, follow" />
<link rel="canonical" href={`${Astro.site}${Astro.url.pathname}`}>
<!-- Open Graph / Facebook -->
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
<meta property="og:image" content={ogimage.url} />
<meta property="og:image:alt" content={ogimage.alt} />
<meta property="og:url" content={SEO.url} />
<meta property="og:type" content="website" />
<meta property="og:site_name" content={SEO.sitename} />
<meta property="og:locale" content={SEO.locale} />
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={twitterimage} />
<meta name="twitter:image:alt" content={ogimage.alt} />
<meta name="twitter:site" content={SEO.twitter} />
<meta name="theme-color" content="#0E0E11"/>
<!-- Sitemap -->
<link rel="sitemap" href="/sitemap-index.xml" />
<title>{title}</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
</head>
<body class="overflow-x-hidden">
<SpeedInsights/>
<div class="blur-circle"></div>
<body
class="min-h-screen bg-background font-sans antialiased selection:bg-purple-500/20 selection:text-purple-500"
>
<div
style=" background:linear-gradient(45deg, rgba(96, 250, 155, 0) 10.79%, rgba(96, 250, 170, 0.03) 40.92%, rgba(96, 250, 155, 0) 90.35%)"
class="fixed top-0 left-0 w-full h-full pointer-events-none -z-1"
class="fixed inset-0 -z-10 h-full w-full bg-background bg-[radial-gradient(ellipse_80%_80%_at_50%_-20%,rgba(120,119,198,0.3),rgba(255,255,255,0))]"
>
</div>
<Header />
<div class="min-h-[85vh] ">
<slot />
</div>
<Footer />
<script>
import "../scripts/menu.js";
</script>
<slot />
</body>
</html>
<script is:inline>
const getThemePreference = () => {
if (typeof localStorage !== "undefined" && localStorage.getItem("theme")) {
return localStorage.getItem("theme");
}
return window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
};
const isDark = getThemePreference() === "dark";
document.documentElement.classList[isDark ? "add" : "remove"]("dark");
if (typeof localStorage !== "undefined") {
const observer = new MutationObserver(() => {
const isDark = document.documentElement.classList.contains("dark");
localStorage.setItem("theme", isDark ? "dark" : "light");
});
observer.observe(document.documentElement, {
attributes: true,
attributeFilter: ["class"],
});
}
</script>
<style>
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
scroll-behavior: smooth;
}
:root {
--transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body {
transition:
background-color var(--transition-standard),
color var(--transition-standard);
}
</style>