diff --git a/.vscode/settings.json b/.vscode/settings.json index b91cc0d..f265668 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,8 @@ "quickfix.biome": "always", "source.organizeImports.biome": "always" }, - "frontMatter.dashboard.openOnStart": false + "frontMatter.dashboard.openOnStart": false, + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features" + } } diff --git a/public/assets/avatar.jpg b/public/assets/avatar.jpg new file mode 100644 index 0000000..b284533 Binary files /dev/null and b/public/assets/avatar.jpg differ diff --git a/src/assets/images/demo-avatar.png b/src/assets/images/demo-avatar.png deleted file mode 100644 index 84320d4..0000000 Binary files a/src/assets/images/demo-avatar.png and /dev/null differ diff --git a/src/assets/images/demo-banner.png b/src/assets/images/demo-banner.png deleted file mode 100644 index f8c0310..0000000 Binary files a/src/assets/images/demo-banner.png and /dev/null differ diff --git a/src/components/Footer.astro b/src/components/Footer.astro index fe39b38..3062c14 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -11,11 +11,13 @@ const currentYear = new Date().getFullYear();
- © {currentYear} {profileConfig.name}. All Rights Reserved. / + © {currentYear} {profileConfig.name}. All Rights Reserved. +
RSS / Sitemap
- Powered by - Astro & + 由 + AstroFuwari + 强力驱动
\ No newline at end of file diff --git a/src/components/LightDarkSwitch.svelte b/src/components/LightDarkSwitch.svelte index c200bd6..50f0906 100644 --- a/src/components/LightDarkSwitch.svelte +++ b/src/components/LightDarkSwitch.svelte @@ -87,13 +87,6 @@ function hidePanel() { {i18n(I18nKey.darkMode)} - diff --git a/src/config.ts b/src/config.ts index aec790a..1ff984c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,5 @@ import type { + ImageFallbackConfig, ExpressiveCodeConfig, LicenseConfig, NavBarConfig, @@ -8,11 +9,11 @@ import type { import { LinkPreset } from "./types/config"; export const siteConfig: SiteConfig = { - title: "Fuwari", - subtitle: "Demo Site", - lang: "en", // Language code, e.g. 'en', 'zh-CN', 'ja', etc. + title: "Ad_closeNN Blog", + subtitle: "Ad_closeNN 的博客,时不时会刷新一些文档。", + lang: "zh_CN", // Language code, e.g. 'en', 'zh-CN', 'ja', etc. themeColor: { - hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 + hue: 250, // Invalid but fun( Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 fixed: false, // Hide the theme color picker for visitors }, banner: { @@ -20,16 +21,28 @@ export const siteConfig: SiteConfig = { src: "assets/images/demo-banner.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/' position: "center", // Equivalent to object-position, only supports 'top', 'center', 'bottom'. 'center' by default credit: { - enable: false, // Display the credit text of the banner image - text: "", // Credit text to be displayed + enable: true, // Display the credit text of the banner image + text: "a", // Credit text to be displayed url: "", // (Optional) URL link to the original artwork or artist's page }, }, + background: { + enable: true, // Enable background image + src: "https://eo-pic.2x.nz/h", // Background image URL (supports HTTPS) + position: "center", // Background position: 'top', 'center', 'bottom' + size: "cover", // Background size: 'cover', 'contain', 'auto' + repeat: "no-repeat", // Background repeat: 'no-repeat', 'repeat', 'repeat-x', 'repeat-y' + attachment: "fixed", // Background attachment: 'fixed', 'scroll', 'local' + opacity: 0.5, // Background opacity (0-1) + }, toc: { enable: true, // Display the table of contents on the right side of the post depth: 2, // Maximum heading depth to show in the table, from 1 to 3 }, favicon: [ + { + src: '/assets/avatar.jpg', + } // Leave this array empty to use the default favicon // { // src: '/favicon/icon.png', // Path of the favicon, relative to the /public directory @@ -45,7 +58,7 @@ export const navBarConfig: NavBarConfig = { LinkPreset.Archive, LinkPreset.About, { - name: "GitHub", + name: "GiwtHub", url: "https://github.com/saicaca/fuwari", // Internal links should not include the base path, as it is automatically added external: true, // Show an external link icon and will open in a new tab }, @@ -53,10 +66,11 @@ export const navBarConfig: NavBarConfig = { }; export const profileConfig: ProfileConfig = { - avatar: "assets/images/demo-avatar.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/' - name: "Lorem Ipsum", - bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + avatar: "/assets/avatar.jpg", // Relative to the /src directory. Relative to the /public directory if it starts with '/' + name: "Ad_closeNN", + bio: "永远相信美好的事情即将发生", links: [ + /* { name: "Twitter", icon: "fa6-brands:twitter", // Visit https://icones.js.org/ for icon codes @@ -64,15 +78,16 @@ export const profileConfig: ProfileConfig = { // `pnpm add @iconify-json/` url: "https://twitter.com", }, + */ { name: "Steam", icon: "fa6-brands:steam", - url: "https://store.steampowered.com", + url: "https://steamcommunity.com/id/Ad_closeNN", }, { name: "GitHub", icon: "fa6-brands:github", - url: "https://github.com/saicaca/fuwari", + url: "https://github.com/Ad-closeNN", }, ], }; @@ -88,3 +103,9 @@ export const expressiveCodeConfig: ExpressiveCodeConfig = { // Please select a dark theme, as this blog theme currently only supports dark background color theme: "github-dark", }; + +export const imageFallbackConfig: ImageFallbackConfig = { + enable: true, + originalDomain: "eo-r2.2x.nz", + fallbackDomain: "pub-d433ca7edaa74994b3d7c40a7fd7d9ac.r2.dev", +}; \ No newline at end of file diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 40d9fe8..766ce3e 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,9 +1,27 @@ -# About -This is the demo site for [Fuwari](https://github.com/saicaca/fuwari). +# 关于 / Hi there! +既然你来到了这里,就说明你在访问由 [Netlify](https://www.netlify.com) 托管的 [adclosenn.top](https://adclosenn.top)。 + +本站使用 [@satcaca/fuwari](https://github.com/saicaca/fuwari) 博客模板。嗯,真漂亮,真好用。 ::github{repo="saicaca/fuwari"} +::github{repo="withastro/astro"} -> ### Sources of images used in this site -> - [Unsplash](https://unsplash.com/) -> - [星と少女](https://www.pixiv.net/artworks/108916539) by [Stella](https://www.pixiv.net/users/93273965) -> - [Rabbit - v1.4 Showcase](https://civitai.com/posts/586908) by [Rabbit_YourMajesty](https://civitai.com/user/Rabbit_YourMajesty) \ No newline at end of file +## 域名 +目前你现在见到的,也就是 [adclosenn.top](https://adclosenn.top)。除了这个,还有其他的域名: + +1. adclosenn.top +2. 19991230.xyz +3. adsb.dpdns.org +4. adclosenn.dpdns.org + +--- + +## 关于我 +好了,本站的介绍完了,到介绍我自己了。 + +关于我的名字 Ad_closeNN... 你可以叫我 **Ad**、**closeNN**或**广告猫猫**。 + +一位住在[中华人民共和国广西壮族自治区梧州市](https://baike.baidu.com/item/%E6%A2%A7%E5%B7%9E%E5%B8%82/7260153)的苦逼学生。长吗?长就对了!谁让广西是自治区呢! + +### 爱好 +玩游戏、写代码、写博客(也许吧),哦,还有读书。只会一点 [Python](https://baike.baidu.com/item/Python/407313),初学者罢了。 \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index c180522..e7f00fa 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -140,7 +140,59 @@ const bannerOffset = + /* https://github.com/afoim/fuwari/commit/aad0a7734be5f6e96a54a3aed51e49760ab3162a */ + 'bg-url': siteConfig.background.src ? `url(${siteConfig.background.src})` : 'none', + 'bg-enable': siteConfig.background.enable ? '1' : '0', + 'bg-position': siteConfig.background.position || 'center', + 'bg-size': siteConfig.background.size || 'cover', + 'bg-repeat': siteConfig.background.repeat || 'no-repeat', + 'bg-attachment': siteConfig.background.attachment || 'fixed', + 'bg-opacity': (siteConfig.background.opacity || 0.3).toString() + }}> + :root { + --bg-url: var(--bg-url); + --bg-enable: var(--bg-enable); + --bg-position: var(--bg-position); + --bg-size: var(--bg-size); + --bg-repeat: var(--bg-repeat); + --bg-attachment: var(--bg-attachment); + --bg-opacity: var(--bg-opacity); + } + + /* Background image configuration */ + body { + --bg-url: var(--bg-url); + --bg-enable: var(--bg-enable); + --bg-position: var(--bg-position); + --bg-size: var(--bg-size); + --bg-repeat: var(--bg-repeat); + --bg-attachment: var(--bg-attachment); + --bg-opacity: var(--bg-opacity); + } + + body::before { + content: '' !important; + position: fixed !important; + top: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + background-image: var(--bg-url) !important; + background-position: var(--bg-position) !important; + background-size: var(--bg-size) !important; + background-repeat: var(--bg-repeat) !important; + background-attachment: var(--bg-attachment) !important; + opacity: 0 !important; + pointer-events: none !important; + z-index: -1 !important; + display: block !important; + transition: opacity 0.3s ease-in-out !important; + } + + body.bg-loaded::before { + opacity: calc(var(--bg-opacity) * var(--bg-enable)) !important; + } + @@ -501,7 +553,27 @@ window.onresize = () => { offset = offset - offset % 4; document.documentElement.style.setProperty('--banner-height-extend', `${offset}px`); } +// Background image loading detection https://github.com/afoim/fuwari/commit/aad0a7734be5f6e96a54a3aed51e49760ab3162a +const bgUrl = getComputedStyle(document.documentElement).getPropertyValue('--bg-url').trim(); +const bgEnable = getComputedStyle(document.documentElement).getPropertyValue('--bg-enable').trim(); +if (bgUrl && bgUrl !== 'none' && bgEnable === '1') { + const img = new Image(); + const urlMatch = bgUrl.match(/url\(["']?([^"')]+)["']?\)/); + if (urlMatch) { + img.onload = function() { + // 背景图片完全加载后,显示背景并启用卡片透明效果 + document.body.classList.add('bg-loaded'); + document.documentElement.style.setProperty('--card-bg', 'var(--card-bg-transparent)'); + document.documentElement.style.setProperty('--float-panel-bg', 'var(--float-panel-bg-transparent)'); + }; + img.onerror = function() { + // Keep cards opaque if background image fails to load + console.warn('Background image failed to load, keeping cards opaque'); + }; + img.src = urlMatch[1]; + } +}