mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
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:
@@ -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[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user