feat: add sidebar component with context and mobile support

- Implemented Sidebar component with collapsible functionality.
- Added SidebarProvider for managing open state and keyboard shortcuts.
- Created SidebarTrigger, SidebarRail, and various sidebar elements (Header, Footer, Content, etc.).
- Integrated mobile responsiveness using Sheet component.
- Added utility hooks for mobile detection.

feat: create table component for structured data display

- Developed Table component with subcomponents: TableHeader, TableBody, TableFooter, TableRow, TableCell, and TableCaption.
- Enhanced styling for better readability and usability.

feat: implement tabs component for navigation

- Created Tabs component with TabsList, TabsTrigger, and TabsContent for tabbed navigation.
- Ensured accessibility and responsive design.

feat: add toggle group component for grouped toggle buttons

- Developed ToggleGroup and ToggleGroupItem components for managing toggle states.
- Integrated context for consistent styling and behavior.

feat: create toggle component for binary state representation

- Implemented Toggle component with variant and size options.
- Enhanced user interaction with visual feedback.

feat: add tooltip component for contextual information

- Developed Tooltip, TooltipTrigger, and TooltipContent for displaying additional information on hover.
- Integrated animations for a smoother user experience.

feat: implement mobile detection hook

- Created useIsMobile hook to determine if the user is on a mobile device.
- Utilized matchMedia for responsive design adjustments.
This commit is contained in:
2025-09-14 23:52:18 +08:00
parent 2e715b1ac7
commit 88166a2c7d
60 changed files with 5680 additions and 460 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/cloudwego/hertz/pkg/app/middlewares/server/recovery"
"github.com/cloudwego/hertz/pkg/app/server"
"github.com/sirupsen/logrus"
"github.com/snowykami/neo-blog/internal/middleware"
"github.com/snowykami/neo-blog/internal/router/apiv1"
"github.com/snowykami/neo-blog/pkg/utils"
)
@ -26,6 +27,6 @@ func init() {
server.WithHostPorts(":"+utils.Env.Get("PORT", "8888")),
server.WithMaxRequestBodySize(utils.Env.GetAsInt("MAX_REQUEST_BODY_SIZE", 1048576000)), // 1000MiB
)
h.Use(recovery.Recovery())
h.Use(recovery.Recovery(), middleware.UseTrack())
apiv1.RegisterRoutes(h)
}