From 08fd9553e1db2c28e89117f18296e5260511b6b8 Mon Sep 17 00:00:00 2001 From: Loong Loong Date: Sun, 14 Sep 2025 17:59:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E4=B8=BB=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/Community.tsx | 139 + app/components/ExternalFrame.tsx | 45 + app/components/Features.tsx | 89 + app/components/Footer.tsx | 128 + app/components/Header.tsx | 69 + app/components/Hero.tsx | 88 + app/components/ThemeProvider.tsx | 89 + app/components/ThemeToggle.tsx | 21 + app/components/ZoteroFeed.tsx | 131 + app/components/icons/Github.tsx | 25 + app/components/ui/accordion.tsx | 56 + app/components/ui/alert-dialog.tsx | 139 + app/components/ui/alert.tsx | 59 + app/components/ui/aspect-ratio.tsx | 5 + app/components/ui/avatar.tsx | 48 + app/components/ui/badge.tsx | 36 + app/components/ui/breadcrumb.tsx | 115 + app/components/ui/button.tsx | 60 + app/components/ui/calendar.tsx | 64 + app/components/ui/card.tsx | 86 + app/components/ui/carousel.tsx | 260 + app/components/ui/chart.tsx | 363 + app/components/ui/checkbox.tsx | 28 + app/components/ui/collapsible.tsx | 9 + app/components/ui/command.tsx | 153 + app/components/ui/context-menu.tsx | 198 + app/components/ui/dialog.tsx | 120 + app/components/ui/drawer.tsx | 116 + app/components/ui/dropdown-menu.tsx | 198 + app/components/ui/form.tsx | 177 + app/components/ui/hover-card.tsx | 27 + app/components/ui/input-otp.tsx | 69 + app/components/ui/input.tsx | 22 + app/components/ui/label.tsx | 24 + app/components/ui/menubar.tsx | 234 + app/components/ui/navigation-menu.tsx | 128 + app/components/ui/pagination.tsx | 117 + app/components/ui/popover.tsx | 29 + app/components/ui/progress.tsx | 26 + app/components/ui/radio-group.tsx | 42 + app/components/ui/resizable.tsx | 43 + app/components/ui/scroll-area.tsx | 46 + app/components/ui/select.tsx | 158 + app/components/ui/separator.tsx | 29 + app/components/ui/sheet.tsx | 138 + app/components/ui/sidebar.tsx | 769 + app/components/ui/skeleton.tsx | 15 + app/components/ui/slider.tsx | 26 + app/components/ui/sonner.tsx | 29 + app/components/ui/switch.tsx | 27 + app/components/ui/table.tsx | 117 + app/components/ui/tabs.tsx | 53 + app/components/ui/textarea.tsx | 24 + app/components/ui/toast.tsx | 127 + app/components/ui/toaster.tsx | 33 + app/components/ui/toggle-group.tsx | 59 + app/components/ui/toggle.tsx | 43 + app/components/ui/tooltip.tsx | 28 + app/components/ui/use-toast.ts | 3 + .../pytorch/index.assets}/word-img-01.png | Bin .../pytorch/index.assets}/word-img-02.png | Bin app/docs/ai/llm-basics/pytorch/index.mdx | 4 +- app/docs/layout.tsx | 9 +- app/globals.css | 271 +- app/layout.tsx | 10 +- app/page.tsx | 49 +- package-lock.json | 10812 - public/cloud_1.png | Bin 0 -> 280780 bytes public/cloud_2.png | Bin 0 -> 137153 bytes public/mascot.svg | 172288 +++++++++++++++ scripts/compute-svg-bbox.js | 35 + 71 files changed, 178172 insertions(+), 10905 deletions(-) create mode 100644 app/components/Community.tsx create mode 100644 app/components/ExternalFrame.tsx create mode 100644 app/components/Features.tsx create mode 100644 app/components/Footer.tsx create mode 100644 app/components/Header.tsx create mode 100644 app/components/Hero.tsx create mode 100644 app/components/ThemeProvider.tsx create mode 100644 app/components/ThemeToggle.tsx create mode 100644 app/components/ZoteroFeed.tsx create mode 100644 app/components/icons/Github.tsx create mode 100644 app/components/ui/accordion.tsx create mode 100644 app/components/ui/alert-dialog.tsx create mode 100644 app/components/ui/alert.tsx create mode 100644 app/components/ui/aspect-ratio.tsx create mode 100644 app/components/ui/avatar.tsx create mode 100644 app/components/ui/badge.tsx create mode 100644 app/components/ui/breadcrumb.tsx create mode 100644 app/components/ui/button.tsx create mode 100644 app/components/ui/calendar.tsx create mode 100644 app/components/ui/card.tsx create mode 100644 app/components/ui/carousel.tsx create mode 100644 app/components/ui/chart.tsx create mode 100644 app/components/ui/checkbox.tsx create mode 100644 app/components/ui/collapsible.tsx create mode 100644 app/components/ui/command.tsx create mode 100644 app/components/ui/context-menu.tsx create mode 100644 app/components/ui/dialog.tsx create mode 100644 app/components/ui/drawer.tsx create mode 100644 app/components/ui/dropdown-menu.tsx create mode 100644 app/components/ui/form.tsx create mode 100644 app/components/ui/hover-card.tsx create mode 100644 app/components/ui/input-otp.tsx create mode 100644 app/components/ui/input.tsx create mode 100644 app/components/ui/label.tsx create mode 100644 app/components/ui/menubar.tsx create mode 100644 app/components/ui/navigation-menu.tsx create mode 100644 app/components/ui/pagination.tsx create mode 100644 app/components/ui/popover.tsx create mode 100644 app/components/ui/progress.tsx create mode 100644 app/components/ui/radio-group.tsx create mode 100644 app/components/ui/resizable.tsx create mode 100644 app/components/ui/scroll-area.tsx create mode 100644 app/components/ui/select.tsx create mode 100644 app/components/ui/separator.tsx create mode 100644 app/components/ui/sheet.tsx create mode 100644 app/components/ui/sidebar.tsx create mode 100644 app/components/ui/skeleton.tsx create mode 100644 app/components/ui/slider.tsx create mode 100644 app/components/ui/sonner.tsx create mode 100644 app/components/ui/switch.tsx create mode 100644 app/components/ui/table.tsx create mode 100644 app/components/ui/tabs.tsx create mode 100644 app/components/ui/textarea.tsx create mode 100644 app/components/ui/toast.tsx create mode 100644 app/components/ui/toaster.tsx create mode 100644 app/components/ui/toggle-group.tsx create mode 100644 app/components/ui/toggle.tsx create mode 100644 app/components/ui/tooltip.tsx create mode 100644 app/components/ui/use-toast.ts rename {public/images/word => app/docs/ai/llm-basics/pytorch/index.assets}/word-img-01.png (100%) rename {public/images/word => app/docs/ai/llm-basics/pytorch/index.assets}/word-img-02.png (100%) delete mode 100644 package-lock.json create mode 100644 public/cloud_1.png create mode 100644 public/cloud_2.png create mode 100644 public/mascot.svg create mode 100644 scripts/compute-svg-bbox.js diff --git a/app/components/Community.tsx b/app/components/Community.tsx new file mode 100644 index 0000000..d5593b0 --- /dev/null +++ b/app/components/Community.tsx @@ -0,0 +1,139 @@ +import { Button } from "./ui/button"; +import { Card, CardContent } from "./ui/card"; +import { Badge } from "./ui/badge"; +import { + ExternalLink, + MessageCircle, + Github, + BookOpen, + GraduationCap, +} from "lucide-react"; + +export function Community() { + return ( +
+
+
+

+ 成为{" "} + + 社区 + {" "} + 的一员 +

+

+ 与来自世界各地的开发者一起学习、成长、创造。每个人的贡献都让社区变得更好。 +

+
+ + {/* Main CTA Card */} +
+ + +
+
+ +
+

+ 内卷知识库 +

+

+ 探索我们精心整理的技术文档、教程和工具。从基础到进阶,应有尽有。 +

+ +
+
+
+
+ + {/* Action Cards */} +
+ + +
+
+ +
+

GitHub 仓库

+

+ 查看源代码,提交 Issue,参与项目讨论。 +

+ +
+
+
+ + + +
+
+ +
+

Discord 社区

+

+ 实时交流,分享经验,结识志同道合的朋友。 +

+ +
+
+
+ + + +
+
+ +
+

文献资料

+

+ 访问我们在 Zotero 的文献库,获取精选学术资源。 +

+ +
+
+
+
+
+
+ ); +} diff --git a/app/components/ExternalFrame.tsx b/app/components/ExternalFrame.tsx new file mode 100644 index 0000000..48d2ff6 --- /dev/null +++ b/app/components/ExternalFrame.tsx @@ -0,0 +1,45 @@ +import * as React from "react"; + +type Props = { + src: string; + title?: string; + height?: number | string; // e.g. 480 or "70vh" + className?: string; + allowFullScreen?: boolean; + sandbox?: string; // override if needed + referrerPolicy?: React.IframeHTMLAttributes["referrerPolicy"]; +}; + +export function ExternalFrame({ + src, + title = "Embedded Content", + height = "70vh", + className, + allowFullScreen = true, + sandbox, + referrerPolicy = "no-referrer", +}: Props) { + // Keep the API conservative by default; caller can override sandbox if needed. + const sandboxAttrs = + sandbox ?? "allow-scripts allow-popups allow-forms allow-presentation"; + + return ( +
+