diff --git a/.gitignore b/.gitignore index c43ed84..358e87c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ pnpm-debug.log* # 归档文件 *.tar.gz + +# Windows 目录配置文件 +desktop.ini \ No newline at end of file diff --git a/public/gallery/cyans-commissions/01.jpg b/public/gallery/cyans-commissions/01.jpg new file mode 100644 index 0000000..c182c60 Binary files /dev/null and b/public/gallery/cyans-commissions/01.jpg differ diff --git a/public/gallery/cyans-commissions/02.png b/public/gallery/cyans-commissions/02.png new file mode 100644 index 0000000..f15da41 Binary files /dev/null and b/public/gallery/cyans-commissions/02.png differ diff --git a/public/gallery/cyans-commissions/03.png b/public/gallery/cyans-commissions/03.png new file mode 100644 index 0000000..c30f3bb Binary files /dev/null and b/public/gallery/cyans-commissions/03.png differ diff --git a/public/gallery/cyans-commissions/04.png b/public/gallery/cyans-commissions/04.png new file mode 100644 index 0000000..ceb7c17 Binary files /dev/null and b/public/gallery/cyans-commissions/04.png differ diff --git a/public/gallery/cyans-commissions/05.png b/public/gallery/cyans-commissions/05.png new file mode 100644 index 0000000..12a27b9 Binary files /dev/null and b/public/gallery/cyans-commissions/05.png differ diff --git a/public/gallery/encrypted-test/urls.txt b/public/gallery/encrypted-test/urls.txt deleted file mode 100644 index bc9bfd4..0000000 --- a/public/gallery/encrypted-test/urls.txt +++ /dev/null @@ -1,10 +0,0 @@ -# 每行一个图片 URL,支持 jpg/png/webp/avif/gif后缀 -# # 号开头的行为注释,空行会被忽略 -# 示例: -https://s41.ax1x.com/2026/05/13/peXsfit.webp -https://s41.ax1x.com/2026/05/13/peXyh79.jpg -https://s41.ax1x.com/2026/05/13/peXshJP.webp -https://s41.ax1x.com/2026/05/13/peXyWm4.jpg -https://s41.ax1x.com/2026/05/13/peXsRII.webp -https://s41.ax1x.com/2026/05/13/peXyf0J.jpg -https://s41.ax1x.com/2026/05/13/peXs2dA.webp \ No newline at end of file diff --git a/public/gallery/firefly-2026/1.avif b/public/gallery/firefly-2026/1.avif deleted file mode 100644 index c4ba515..0000000 Binary files a/public/gallery/firefly-2026/1.avif and /dev/null differ diff --git a/public/gallery/firefly-2026/cover.avif b/public/gallery/firefly-2026/cover.avif deleted file mode 100644 index 95859fd..0000000 Binary files a/public/gallery/firefly-2026/cover.avif and /dev/null differ diff --git a/public/gallery/firefly-2026/urls.txt b/public/gallery/firefly-2026/urls.txt deleted file mode 100644 index bc9bfd4..0000000 --- a/public/gallery/firefly-2026/urls.txt +++ /dev/null @@ -1,10 +0,0 @@ -# 每行一个图片 URL,支持 jpg/png/webp/avif/gif后缀 -# # 号开头的行为注释,空行会被忽略 -# 示例: -https://s41.ax1x.com/2026/05/13/peXsfit.webp -https://s41.ax1x.com/2026/05/13/peXyh79.jpg -https://s41.ax1x.com/2026/05/13/peXshJP.webp -https://s41.ax1x.com/2026/05/13/peXyWm4.jpg -https://s41.ax1x.com/2026/05/13/peXsRII.webp -https://s41.ax1x.com/2026/05/13/peXyf0J.jpg -https://s41.ax1x.com/2026/05/13/peXs2dA.webp \ No newline at end of file diff --git a/src/config/friendsConfig.ts b/src/config/friendsConfig.ts index 34acf6e..d034c0b 100644 --- a/src/config/friendsConfig.ts +++ b/src/config/friendsConfig.ts @@ -17,7 +17,7 @@ export const friendsPageConfig: FriendsPageConfig = { showComment: false, // 是否开启随机排序配置,如果开启,就会忽略权重,构建时进行一次随机排序 - randomizeSort: false, + randomizeSort: true, }; // 友链配置 diff --git a/src/config/galleryConfig.ts b/src/config/galleryConfig.ts index 5f3e9b2..ad59439 100644 --- a/src/config/galleryConfig.ts +++ b/src/config/galleryConfig.ts @@ -16,23 +16,10 @@ export const galleryConfig: GalleryConfig = { // passwordHint: 密码提示,设置后在输入密码错误时显示(可选,需配合password使用) // 每添加一个数组项就相当于添加了一个相册,记得在 public/gallery/ 目录下创建对应的子目录并放入图片 { - id: "firefly-2026", - name: "可爱流萤", - description: "飞萤之火自无梦的长夜亮起,绽放在终竟的明天。", - location: "崩坏:星穹铁道", - date: "2026-01-01", - tags: ["崩坏星穹铁道", "流萤"], - }, - { - id: "encrypted-test", - name: "加密相册示例", - description: - "这是一个加密相册的示例,设置了访问密码,只有输入正确的密码才能查看相册内容。", - location: "崩坏:星穹铁道", - date: "2026-02-01", - tags: ["加密相册", "示例"], - password: "123456", - passwordHint: "示例密码123456", + id: "cyans-commissions", + name: "墨青的稿件", + description: "这么可爱的小摩羯,在哪里可以吃到呀", + tags: ["Furry", "Black Cyan"], }, ], diff --git a/src/config/navBarConfig.ts b/src/config/navBarConfig.ts index f5822e2..ee97d48 100644 --- a/src/config/navBarConfig.ts +++ b/src/config/navBarConfig.ts @@ -26,6 +26,9 @@ const getDynamicNavBarConfig = (): NavBarConfig => { ], }, + // 相册 + LinkPresets.Gallery, + // 友链 LinkPresets.Friends, diff --git a/src/config/siteConfig.ts b/src/config/siteConfig.ts index a523c1f..d593ee0 100644 --- a/src/config/siteConfig.ts +++ b/src/config/siteConfig.ts @@ -99,7 +99,7 @@ export const siteConfig: SiteConfig = { sponsor: true, guestbook: false, bangumi: false, - gallery: false, + gallery: true, anime: false, }, diff --git a/src/constants/lqips.json b/src/constants/lqips.json index 122046c..52fe1c2 100644 --- a/src/constants/lqips.json +++ b/src/constants/lqips.json @@ -1,7 +1,5 @@ { "src:assets/images/firefly.png": "72d3af9ee699aced93", - "public:gallery/firefly-2026/cover.avif": "7588a28a8f989e8d88", - "public:gallery/firefly-2026/1.avif": "c8bca9dde6d2babfb5", "public:assets/images/other/beian.png": "c18975c3886cc99d5e", "src:assets/images/blog.jpg": "b8bde8b3bce89a9fce", "src:assets/images/MobileWallpaper/hunter.png": "7b8b9085a8bd83818d", @@ -12,6 +10,13 @@ "src:content/posts/ensure-ntfs3-on-linux/paragon-ntfs3.avif": "bfc4c4c0c0bcb2b8b9", "public:avatars/yebai.jpg": "76bfe588cef1a0b2c6", "src:content/posts/custom-screensaver-kde-plasma/screensaver.webp": "000000000000000000", - "src:content/posts/custom-screensaver-kde-plasma/preview.png": "010101010101010101", - "src:content/posts/custom-screensaver-kde-plasma/power-management.png": "ebeef0eaeaebedeced" + "src:content/posts/custom-screensaver-kde-plasma/power-management.png": "ebeef0eaeaebedeced", + "public:gallery/cyans-commissions/05.png": "7089c94564bf757bc9", + "public:gallery/cyans-commissions/04.png": "c1c3d3c6c9d7b5b9c4", + "public:gallery/cyans-commissions/03.png": "969de5c8c8d1afc4ec", + "public:gallery/cyans-commissions/02.png": "eceff6dadfeecbd3e7", + "public:gallery/cyans-commissions/01.jpg": "d4ddfad8e0faedf1fa", + "src:content/posts/documenting-cyans-first-3d-rendering/vrm.png": "8e68478d6c4e876b44", + "src:content/posts/documenting-cyans-first-3d-rendering/unity-interface.png": "6f7781676f783e3e3d", + "src:content/posts/documenting-cyans-first-3d-rendering/unexpected.png": "3839553a3b4432333e" } \ No newline at end of file diff --git a/src/content/posts/custom-screensaver-kde-plasma.md b/src/content/posts/custom-screensaver-kde-plasma/index.md similarity index 98% rename from src/content/posts/custom-screensaver-kde-plasma.md rename to src/content/posts/custom-screensaver-kde-plasma/index.md index c4d656d..24fbb78 100644 --- a/src/content/posts/custom-screensaver-kde-plasma.md +++ b/src/content/posts/custom-screensaver-kde-plasma/index.md @@ -4,7 +4,7 @@ published: 2026-10-16 tags: ["Linux", "屏保", "ASCII", "Omarchy", "KDE Plasma"] category: 教程 description: 在 Linux (KDE Plasma) 上通过 Kitty 与 ttfx 实现如 Omarchy 般酷炫的 ASCII 字符动画屏保,并支持 Bash 与 Fish 双 Shell 兼容。 -image: "./custom-screensaver-kde-plasma/screensaver.webp" +image: "./screensaver.webp" --- > [!NOTE] @@ -208,7 +208,7 @@ chmod +x ~/.local/bin/ascii-screensaver (或者完整绝对路径,如 `/home/black/.local/bin/ascii-screensaver`)。 5. 点击右下角的 **应用(A)** 保存配置。 -![KDE Plasma 电源管理配置](./custom-screensaver-kde-plasma/power-management.png) +![KDE Plasma 电源管理配置](./power-management.png) 配置完成后,当系统静置无操作达到设定时间(例如 5 分钟)后,KDE Plasma 便会自动唤起全屏终端屏保。 diff --git a/src/content/posts/documenting-cyans-first-3d-rendering/index.md b/src/content/posts/documenting-cyans-first-3d-rendering/index.md new file mode 100644 index 0000000..ba39f89 --- /dev/null +++ b/src/content/posts/documenting-cyans-first-3d-rendering/index.md @@ -0,0 +1,42 @@ +--- +title: 记录墨青的第一次三维化 +published: 2026-11-15 +tags: ["3D", "Blender", "Unity", "Furry"] +category: 杂谈 +description: 经历两周鏖战,终于将墨青三维化 +image: "./vrm.png" +--- + +大三开学也有两个月了,除了准备考研之外,我总还想给自己找点什么事情做。 + +于是我在日常逛 B 站的时候,在主页看到了 **[@左旋葡萄酸](https://space.bilibili.com/1493996813)** 大佬发布的 Furry 建模教程。我抱着试一试的心态去学习,没想到大佬的教程非常详细,从来没有学过 Blender 和 Unity 的我也能跟着他的教程一步一步做下去。 + +![Unity界面](unity-interface.png) + +## 用来干什么? + +我其实一直都想拥有一个属于自己的 3D 模型,最开始是有想当虚拟主播的梦想。但是你墨青叔叔老了,吃不上这碗饭了,声音也不咋好听,这个梦想也就此作罢了。不过我现在一直在进修各种代码和技术栈,或许我可以录制一些课程?有一个虚拟形象总归是好的,课程看起来不会太枯燥,我这个社恐也不至于直接露脸。 + +## 踩的一些坑 + +1. **獭可工具导入 Blender 报错** + +我在建模的过程中,用到了獭可大佬开发的獭可工具。不过工具中的脚本有一些脏引用(可能来源于开发时编辑器加上的一些测试库?),按理来说是不会影响插件正常使用的,但是在 Blender 5.1.0 及以后的版本中导入插件会遇到一些问题。具体原因是 Blender 5.1.0 已经将内置的 Python 版本更新为 `3.13`,脚本中 `Core/Mesh.py` 导入的 `cgitb` 模块和 `05_Shape_Key_Tool.py` 导入的 `msilib.schema` 已经被弃用,导致插件导入时触发 `ModuleNotFountError`。这些模块并没有被使用,只需要手动将这些模块相应的 import 声明删除即可。 + +::github{repo="Takko233/Takko_Avatar_Blender_Plugin"} + +2. **奇怪的脖子右拧现象** + +![脖子右拧](unexpected.png) + +我被这个现象困扰了很久,一遍又一遍地检查权重和顶点状态,都没有找出来是什么原因。最后我找到了一个专门检测类似异常的插件: + +::github{repo="XinyiRan0001/Blender-Skin-Deformation-Validator"} + +这个插件能够扫描蒙皮权重、分析当前姿态、实时变形分析、查找问题区域。基于此脚本,我进行了二次开发,为脚本实现汉化,并添加了导出分析结果的功能,最终我成功找到了问题所在:脖子上的一百六十多个顶点中,有六十多个顶点被异常绑定到了手部的骨骼上,导致播放动画时有异常拉伸。由于我的 GitHub 账号在前几天很不幸地被暂停了,我无法直接上传到仓库,所以需要此脚本的小伙伴可以[联系我](mailto:blackcyan07@outlook.com)。 + +--- + +## 指路 + + \ No newline at end of file diff --git a/src/content/posts/documenting-cyans-first-3d-rendering/unexpected.png b/src/content/posts/documenting-cyans-first-3d-rendering/unexpected.png new file mode 100644 index 0000000..49d7095 Binary files /dev/null and b/src/content/posts/documenting-cyans-first-3d-rendering/unexpected.png differ diff --git a/src/content/posts/documenting-cyans-first-3d-rendering/unity-interface.png b/src/content/posts/documenting-cyans-first-3d-rendering/unity-interface.png new file mode 100644 index 0000000..c9e7fd8 Binary files /dev/null and b/src/content/posts/documenting-cyans-first-3d-rendering/unity-interface.png differ diff --git a/src/content/posts/documenting-cyans-first-3d-rendering/vrm.png b/src/content/posts/documenting-cyans-first-3d-rendering/vrm.png new file mode 100644 index 0000000..42a2140 Binary files /dev/null and b/src/content/posts/documenting-cyans-first-3d-rendering/vrm.png differ diff --git a/src/content/posts/ensure-ntfs3-on-linux.md b/src/content/posts/ensure-ntfs3-on-linux/index.md similarity index 99% rename from src/content/posts/ensure-ntfs3-on-linux.md rename to src/content/posts/ensure-ntfs3-on-linux/index.md index 058a1e6..95715d4 100644 --- a/src/content/posts/ensure-ntfs3-on-linux.md +++ b/src/content/posts/ensure-ntfs3-on-linux/index.md @@ -6,7 +6,7 @@ pinned: true tags: ["Linux", "文件系统", "NTFS", "ntfs3", "内核模块", "NVMe"] category: 技术 description: 在 Linux 上启用 Linux 内核原生 ntfs3 驱动以替代 ntfs-3g,大幅提升 NTFS 移动硬盘读写速度,包含内核模块检查、mount 配置及双系统注意事项。 -image: "./ensure-ntfs3-on-linux/paragon-ntfs3.avif" +image: "./paragon-ntfs3.avif" --- 前几天突然想起来自己还有一个 256G 的 NVMe SSD,是大一的时候买来当移动硬盘用的,可惜之前两次由于对这方面知识的欠缺,购买的硬盘盒都比较差劲,硬盘就一直搁置着。现如今,我还是认为自己需要一个移动硬盘,于是又新购入了一个硬盘盒。组装好后,我尝试在 Fedora 上测试它的读写速度,发现原本理论上是 10 Gbps 的传输速度,在使用 `dd` 测试顺序写入时,平均速度只有约 142 MB/s!我查阅了大量资料,发现貌似是文件系统的原因,我的硬盘使用的文件系统是 NTFS,而我并不想改用别的文件系统,所以只能找找看有没有两全其美的办法。 diff --git a/src/pages/gallery/[album].astro b/src/pages/gallery/[album].astro new file mode 100644 index 0000000..bac6a22 --- /dev/null +++ b/src/pages/gallery/[album].astro @@ -0,0 +1,182 @@ +--- +import { Icon } from "astro-icon/components"; +import EncryptedContent from "@/components/features/EncryptedContent.astro"; +import PhotoCard from "@/components/pages/gallery/PhotoCard.astro"; +import { galleryConfig, siteConfig } from "@/config"; +import I18nKey from "@/i18n/i18nKey"; +import { i18n } from "@/i18n/translation"; +import MainGridLayout from "@/layouts/MainGridLayout.astro"; +import "@/styles/pages/gallery-album.css"; +import { getAlbumCover, scanAlbumPhotos } from "@/utils/gallery-utils"; +import { getLqipProps } from "@/utils/lqip-utils"; +import { url } from "@/utils/url-utils"; + +// 检查页面是否启用 +if (!siteConfig.pages.gallery) { + return Astro.redirect("/404/"); +} + +export function getStaticPaths() { + return galleryConfig.albums.map((album) => ({ + params: { album: album.id }, + })); +} + +const { album: albumId } = Astro.params; +const albumMeta = galleryConfig.albums.find((a) => a.id === albumId); + +if (!albumMeta) { + return Astro.redirect("/404/"); +} + +const photos = scanAlbumPhotos(albumMeta.id); +const cover = getAlbumCover(albumMeta, photos); +const columnWidth = galleryConfig.columnWidth || 240; + +// LQIP 渐变占位 +const coverLqipProps = cover + ? getLqipProps(cover, undefined, true) + : { style: "" }; +--- + + + +
+ {cover ? ( +
+ + {albumMeta.name} +
+ + + +
+
+ {albumMeta.name} +
+ {albumMeta.description && ( +

+ {albumMeta.description} +

+ )} +
+ {albumMeta.date && ( + + + {albumMeta.date} + + )} + {albumMeta.location && ( + + + {albumMeta.location} + + )} + + + {photos.length} {i18n(I18nKey.galleryPhotos)} + +
+ {albumMeta.tags && albumMeta.tags.length > 0 && ( +
+ {albumMeta.tags.map((tag) => ( + + {tag} + + ))} +
+ )} +
+
+ ) : ( +
+ + + {i18n(I18nKey.galleryBackToAlbums)} + +
+ {albumMeta.name} +
+ {albumMeta.description && ( +

+ {albumMeta.description} +

+ )} +
+ {albumMeta.date && ( + + + {albumMeta.date} + + )} + {albumMeta.location && ( + + + {albumMeta.location} + + )} + {photos.length} {i18n(I18nKey.galleryPhotos)} +
+ {albumMeta.tags && albumMeta.tags.length > 0 && ( +
+ {albumMeta.tags.map((tag) => ( + + {tag} + + ))} +
+ )} +
+ )} +
+ + +
+
+ {photos.length > 0 ? ( + albumMeta.password ? ( + + + + ) : ( + + ) + ) : ( +
+ +

{i18n(I18nKey.galleryNoAlbums)}

+
+ )} +
+
+ + \ No newline at end of file diff --git a/src/pages/gallery/index.astro b/src/pages/gallery/index.astro new file mode 100644 index 0000000..82313e0 --- /dev/null +++ b/src/pages/gallery/index.astro @@ -0,0 +1,202 @@ +--- +import { Icon } from "astro-icon/components"; +import AlbumCard from "@/components/pages/gallery/AlbumCard.astro"; +import { galleryConfig, siteConfig } from "@/config"; +import I18nKey from "@/i18n/i18nKey"; +import { i18n } from "@/i18n/translation"; +import MainGridLayout from "@/layouts/MainGridLayout.astro"; +import "@/styles/pages/common.css"; +import { getAlbumCover, scanAlbumPhotos } from "@/utils/gallery-utils"; +import "@/styles/pages/card-grid.css"; + +// 检查页面是否启用 +if (!siteConfig.pages.gallery) { + return Astro.redirect("/404/"); +} + +const title = i18n(I18nKey.gallery); +const description = i18n(I18nKey.galleryDescription); + +// 构建相册数据(扫描照片、获取封面) +const albums = galleryConfig.albums.map((album) => { + const photos = scanAlbumPhotos(album.id); + const cover = getAlbumCover(album, photos); + return { ...album, cover, photoCount: photos.length }; +}); + +// 收集所有标签用于筛选 +const allTags = [...new Set(albums.flatMap((a) => a.tags || []))].sort(); +--- + + +
+ +
+
+
+ +
+

{title}

+ {description &&

{description}

} +
+
+
+ + + {albums.length > 0 && ( + +
+ + +
+ {allTags.length > 0 && ( +
+ + {allTags.map((tag) => ( + + ))} +
+ )} +
+ )} +
+ + + {albums.length > 0 ? ( + <> +
+ {albums.map((album) => ( + + ))} +
+ {/* 搜索无结果提示 */} + + + ) : ( +
+ +

{i18n(I18nKey.galleryNoAlbums)}

+
+ )} +
+ + + +
\ No newline at end of file diff --git a/src/styles/pages/card-grid.css b/src/styles/pages/card-grid.css new file mode 100644 index 0000000..5540157 --- /dev/null +++ b/src/styles/pages/card-grid.css @@ -0,0 +1,9 @@ +/* 卡片列表通用网格:auto-fill 自动换列,列宽下限由页面通过 --card-grid-min-width 指定 */ +.card-grid { + display: grid; + grid-template-columns: repeat( + auto-fill, + minmax(var(--card-grid-min-width, 320px), 1fr) + ); + gap: 1rem; +} \ No newline at end of file diff --git a/src/styles/pages/common.css b/src/styles/pages/common.css new file mode 100644 index 0000000..e3e9f0e --- /dev/null +++ b/src/styles/pages/common.css @@ -0,0 +1,107 @@ +/* 页面通用外壳与页头:各列表页共用的 .page-* 骨架(按页引入) */ + +.page-shell { + box-sizing: border-box; + min-width: 0; + width: 100%; + max-width: 100%; +} + +.page-header { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + gap: 1rem; + margin-bottom: 1rem; + padding: 1.5rem 2rem; +} + +.page-heading { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.875rem; +} + +.page-count { + display: inline-flex; + align-items: baseline; + gap: 0.3rem; + align-self: center; + color: var(--primary); + white-space: nowrap; +} + +.page-count svg { + align-self: center; + font-size: 1.35rem; +} + +.page-count strong { + font-size: 1.3rem; + font-weight: 700; + line-height: 1; +} + +.page-count span { + color: var(--content-meta); + font-size: 0.8rem; + font-weight: 500; +} + +.page-icon { + display: grid; + width: 3.5rem; + height: 3.5rem; + flex: 0 0 3.5rem; + place-items: center; + border-radius: var(--radius-large); + background: var(--primary); + color: white; + font-size: 2.5rem; +} + +:root.dark .page-icon { + color: rgb(0 0 0 / 70%); +} + +.page-heading h2 { + margin: 0; + color: rgb(0 0 0 / 90%); + font-size: 1.5rem; + font-weight: 700; + line-height: 1.25; +} + +.page-heading p { + margin: 0.2rem 0 0; + color: var(--content-meta); + font-size: 0.875rem; +} + +/* 更新时间等次要说明行 */ +.page-heading .page-updated { + margin: 0 0 0 auto; + align-self: center; + color: var(--content-meta); + font-size: 0.75rem; + line-height: 1.5; + text-align: center; +} + +.page-heading .page-updated span { + display: block; +} + +:root.dark .page-heading h2 { + color: rgb(255 255 255 / 90%); +} + +@media (max-width: 640px) { + .page-header { + padding: 1.25rem; + } + + .page-count { + align-self: center; + } +} \ No newline at end of file diff --git a/src/styles/pages/gallery-album.css b/src/styles/pages/gallery-album.css new file mode 100644 index 0000000..ef19993 --- /dev/null +++ b/src/styles/pages/gallery-album.css @@ -0,0 +1,7 @@ +/* Gallery masonry responsive layout */ +@media (min-width: 640px) { + .gallery-masonry { + column-width: var(--col-width, 240px) !important; + column-count: auto !important; + } +} \ No newline at end of file