Feat: 新增评论组件,细化通知组件样式,引入环境变量,替换图标组件

This commit is contained in:
2026-07-30 00:59:09 +08:00
parent d585fc909f
commit b66de3129d
18 changed files with 630 additions and 14 deletions
+3 -1
View File
@@ -8,6 +8,8 @@ import { getFirstImage, years } from "~/utils/note";
import type { Route } from "./+types/note";
const { APP_APIURL } = import.meta.env;
export function meta({}: Route.MetaArgs) {
return [
{ title: siteTitle("日记") },
@@ -20,7 +22,7 @@ export async function loader({ request }: Route.LoaderArgs) {
const year = url.searchParams.get("year") || new Date().getFullYear();
const page = url.searchParams.get("page") || 1;
const note = await fetch(`https://paul.ren/api/note/?page=${page}&year=${year}`).then((res) => res.json()) as API.PageResponse<API.Note.INoteData[]>;
const note = await fetch(`${APP_APIURL}/api/note/?page=${page}&year=${year}`).then((res) => res.json()) as API.PageResponse<API.Note.INoteData[]>;
return { note, page, year };
}