Skip to content

Commit 86a1078

Browse files
committed
feat: 实现SPA核心功能与组件
新增SPA插件核心功能,包括首页布局、文章页组件、导航栏、评论系统等 重构主题结构,移除旧版app插件,整合为统一SPA架构 添加多种实用组件如TOC目录、返回顶部、工具提示等 实现数据获取hooks与状态管理 优化样式与交互体验
1 parent 30ab7d5 commit 86a1078

File tree

99 files changed

+23
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+23
-27
lines changed

themes/shadcn/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createTheme } from 'tona'
22
import './styles/globals.css'
3-
import { app } from './plugins/app'
43
import { codeCopyButton } from './plugins/code-copy-button'
54
import { smoothScroll } from './plugins/smooth-scroll'
5+
import { spa } from './plugins/spa'
66

7-
createTheme().use(app).use(smoothScroll).use(codeCopyButton)
7+
createTheme().use(spa).use(smoothScroll).use(codeCopyButton)

themes/shadcn/src/plugins/app/context/avatar-context.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

themes/shadcn/src/plugins/app/app.tsx renamed to themes/shadcn/src/plugins/spa/components/app-root/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Toaster } from '../../components/ui/sonner'
2-
import { Page } from './components/page'
3-
import { AvatarContext } from './context/avatar-context'
1+
import { Toaster } from '../../../../components/ui/sonner'
2+
import { AvatarContext } from '../../context/avatar-context'
3+
import { Page } from '../page'
44
import 'tona-sonner/dist/index.css'
55
import { TooltipProvider } from '@/components/ui/tooltip'
6-
import { useAvatar } from './hooks/use-avatar'
6+
import { useAvatar } from '../../hooks/use-avatar'
77

88
function PageWrapper() {
99
const avatar = useAvatar()
@@ -17,7 +17,7 @@ function PageWrapper() {
1717
)
1818
}
1919

20-
export function App() {
20+
export function AppRoot() {
2121
return (
2222
<>
2323
<PageWrapper />

themes/shadcn/src/plugins/app/components/back-to-top/index.tsx renamed to themes/shadcn/src/plugins/spa/components/back-to-top/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/basic-tooltip/index.tsx renamed to themes/shadcn/src/plugins/spa/components/basic-tooltip/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/flip-sentences/index.tsx renamed to themes/shadcn/src/plugins/spa/components/flip-sentences/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/footer/index.tsx renamed to themes/shadcn/src/plugins/spa/components/footer/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/home-page/about/index.tsx renamed to themes/shadcn/src/plugins/spa/components/home-page/about/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/home-page/index.tsx renamed to themes/shadcn/src/plugins/spa/components/home-page/index.tsx

File renamed without changes.

themes/shadcn/src/plugins/app/components/home-page/item-groups/index.tsx renamed to themes/shadcn/src/plugins/spa/components/home-page/item-groups/index.tsx

File renamed without changes.

0 commit comments

Comments
 (0)