优化主页,提供通用页面模板组件

This commit is contained in:
2025-12-15 14:09:17 +08:00
parent fd2afe5e01
commit c16bd76821
10 changed files with 509 additions and 475 deletions

View File

@@ -29,7 +29,7 @@ const MENU_ITEMS = [
{
group: '操作指南',
items: [
{key: 'windows7-proxy', label: 'Windows7电脑设置代理教程'},
{key: 'win7-proxy', label: 'Windows7电脑设置代理教程'},
{key: 'mac-proxy', label: 'MAC设置代理教程'},
{key: 'firefox-proxy', label: '火狐浏览器设置代理'},
{key: 'socks5-usage', label: 'Socks5代理使用教程'},
@@ -110,7 +110,7 @@ export default function Sidebar({collapsed = false}: Props) {
return (
<aside
className={`bg-white rounded-lg p-3 transition-all duration-200 shrink-0 ${
collapsed ? 'w-20' : 'w-72'
collapsed ? 'w-20' : 'w-68'
}`}
>
<nav className="space-y-2">
@@ -129,7 +129,7 @@ export default function Sidebar({collapsed = false}: Props) {
finalExpandedGroups[section.group] ? 'rotate-90' : ''
}`}
>
<ChevronRight size={16} />
<ChevronRight size={16}/>
</div>
{!collapsed && (
@@ -141,7 +141,7 @@ export default function Sidebar({collapsed = false}: Props) {
{finalExpandedGroups[section.group] && (
<ul className={`mt-1 text-base ${collapsed ? 'hidden' : 'block'}`}>
{section.items.map(item => {
{section.items.map((item) => {
const isActive = currentKey === item.key
const href = getItemHref(item.key)