From 421f979e109d2aee258eb721e74772454be3dace Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 12 Mar 2026 02:23:10 -0500 Subject: [PATCH] 's' --- .../[moduleIndex]/[lessonIndex]/page.tsx | 14 +- app/[locale]/day/[id]/page.tsx | 2 +- app/[locale]/page.tsx | 9 +- app/components/Community.tsx | 168 ++++++----- app/components/Features.tsx | 7 - app/components/Footer.tsx | 3 +- app/components/Header.tsx | 7 +- app/components/Hero.tsx | 44 --- app/components/ResourceNavigation.tsx | 275 ++++++++++++++++++ app/components/Resources.tsx | 2 +- app/components/Roadmap.tsx | 149 ++++++---- app/components/Tools.tsx | 21 -- app/components/course/CTASection.tsx | 36 ++- app/components/course/CourseHero.tsx | 28 +- app/lib/theme-data.ts | 44 +++ config/site.config.ts | 4 +- content/themes/digital-nomad/data/books.json | 19 ++ content/themes/digital-nomad/data/pan.json | 52 ++++ .../themes/digital-nomad/data/products.json | 19 ++ content/themes/digital-nomad/messages/en.json | 35 ++- content/themes/digital-nomad/messages/zh.json | 35 ++- 21 files changed, 709 insertions(+), 264 deletions(-) create mode 100644 app/components/ResourceNavigation.tsx create mode 100644 content/themes/digital-nomad/data/books.json create mode 100644 content/themes/digital-nomad/data/pan.json create mode 100644 content/themes/digital-nomad/data/products.json diff --git a/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx b/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx index 926480a..374d004 100644 --- a/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx +++ b/app/[locale]/course/[moduleIndex]/[lessonIndex]/page.tsx @@ -1,8 +1,8 @@ "use client"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { useParams, useRouter } from "next/navigation"; -import { Link } from "@/i18n/navigation"; +import { Link, useTranslation } from "@/i18n/navigation"; import { VideoPlayer } from "@/app/components/course/VideoPlayer"; import { LessonMarkdown } from "./LessonMarkdown"; import { getLesson } from "@/config/lessons"; @@ -14,6 +14,8 @@ import Header from "@/app/components/Header"; export default function LessonPage() { const params = useParams(); const router = useRouter(); + const { t } = useTranslation("community"); + const [toast, setToast] = useState(false); const moduleIndex = Number(params.moduleIndex); const lessonIndex = Number(params.lessonIndex); @@ -149,6 +151,14 @@ export default function LessonPage() { )} + {toast && ( +
+ {t("updating")} +
+ )} ); } diff --git a/app/[locale]/day/[id]/page.tsx b/app/[locale]/day/[id]/page.tsx index faf0189..fa9bb31 100644 --- a/app/[locale]/day/[id]/page.tsx +++ b/app/[locale]/day/[id]/page.tsx @@ -120,7 +120,7 @@ export default async function DayPage({ params }: PageProps) { 🌍 数字游民指南 · - 开源免费 · 社区驱动 + 精选内容 · 持续更新 ); diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 1610e14..747088f 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -5,10 +5,13 @@ import Roadmap from "../components/Roadmap"; import Tools from "../components/Tools"; import Community from "../components/Community"; import Footer from "../components/Footer"; -import { getThemeToolsData } from "../lib/theme-data"; +import { getThemeToolsData, getResourceData } from "../lib/theme-data"; export default async function HomePage() { - const toolsData = await getThemeToolsData(); + const [toolsData, resourceData] = await Promise.all([ + getThemeToolsData(), + getResourceData(), + ]); return ( <> @@ -18,7 +21,7 @@ export default async function HomePage() { - +