feat: add avatar support and update dependencies

- Added avatar configuration to the author section in config.example.json and README.md.
- Integrated @radix-ui/react-avatar package for avatar rendering in the MasonryHeaderMasonryItem component.
- Updated pnpm-lock.yaml and package.json to include @radix-ui/react-avatar dependency.
- Removed loading text from index.html for a cleaner UI.
- Adjusted photo-loader.ts to use the workdir for manifest path.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-06-11 01:11:56 +08:00
parent 491e8ddb6e
commit ccfb313038
7 changed files with 81 additions and 22 deletions

View File

@@ -1,6 +1,8 @@
import { readFileSync } from 'node:fs'
import { join } from 'node:path'
import { workdir } from '../packages/builder/src/path.js'
interface PhotoManifest {
id: string
title: string
@@ -26,7 +28,7 @@ class BuildTimePhotoLoader {
constructor() {
try {
const manifestPath = join(process.cwd(), 'src/data/photos-manifest.json')
const manifestPath = join(workdir, 'src/data/photos-manifest.json')
const manifestContent = readFileSync(manifestPath, 'utf-8')
this.photos = JSON.parse(manifestContent) as PhotoManifest[]