@coffic/cosy-ui 0.8.10 → 0.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/src-astro/alert/index.ts +7 -15
  3. package/dist/src-astro/assets/iconData.ts +100 -0
  4. package/dist/src-astro/button/index_astro.ts +2 -56
  5. package/dist/src-astro/card/CardCourse.astro +31 -11
  6. package/dist/src-astro/card/index.ts +15 -25
  7. package/dist/src-astro/code-container/CodeContainer.astro +205 -5
  8. package/dist/src-astro/code-container/index.ts +9 -13
  9. package/dist/src-astro/contact/index.ts +16 -20
  10. package/dist/src-astro/errors/index.ts +0 -62
  11. package/dist/src-astro/footer/index.ts +1 -30
  12. package/dist/src-astro/header/Header.astro +1 -2
  13. package/dist/src-astro/header/index.ts +1 -40
  14. package/dist/src-astro/hero/index.ts +1 -39
  15. package/dist/src-astro/icons/ChartIcon.astro +28 -0
  16. package/dist/src-astro/icons/DashboardIcon.astro +28 -0
  17. package/dist/src-astro/icons/DeleteIcon.astro +28 -0
  18. package/dist/src-astro/icons/DocumentIcon.astro +28 -0
  19. package/dist/src-astro/icons/DownloadIcon.astro +28 -0
  20. package/dist/src-astro/icons/EditIcon.astro +28 -0
  21. package/dist/src-astro/icons/FolderIcon.astro +28 -0
  22. package/dist/src-astro/icons/HeartIcon.astro +28 -0
  23. package/dist/src-astro/icons/HomeIcon.astro +28 -0
  24. package/dist/src-astro/icons/MailIcon.astro +28 -0
  25. package/dist/src-astro/icons/MessageIcon.astro +28 -0
  26. package/dist/src-astro/icons/NotificationIcon.astro +28 -0
  27. package/dist/src-astro/icons/ReportIcon.astro +28 -0
  28. package/dist/src-astro/icons/SaveIcon.astro +28 -0
  29. package/dist/src-astro/icons/SecurityIcon.astro +28 -0
  30. package/dist/src-astro/icons/StarIcon.astro +28 -0
  31. package/dist/src-astro/icons/ToolsIcon.astro +28 -0
  32. package/dist/src-astro/icons/UploadIcon.astro +28 -0
  33. package/dist/src-astro/icons/UsersIcon.astro +28 -0
  34. package/dist/src-astro/icons/WalletIcon.astro +28 -0
  35. package/dist/src-astro/icons/index.ts +20 -0
  36. package/dist/src-astro/layout-app/index.ts +5 -9
  37. package/dist/src-astro/layout-dashboard/DashboardLayout.astro +159 -555
  38. package/dist/src-astro/layout-dashboard/DashboardSidebar.astro +219 -0
  39. package/dist/src-astro/layout-dashboard/DashboardTopNavbar.astro +164 -0
  40. package/dist/src-astro/layout-dashboard/index.ts +14 -8
  41. package/dist/src-astro/layout-dashboard/tools.ts +0 -0
  42. package/dist/src-astro/layout-dashboard/types.ts +319 -0
  43. package/package.json +1 -1
  44. package/dist/src-astro/alert/EAlertBasic.astro +0 -11
  45. package/dist/src-astro/alert/EAlertBasicContainer.astro +0 -11
  46. package/dist/src-astro/alert/EAlertCustomStyle.astro +0 -16
  47. package/dist/src-astro/alert/EAlertCustomStyleContainer.astro +0 -11
  48. package/dist/src-astro/alert/EAlertError.astro +0 -6
  49. package/dist/src-astro/alert/EAlertInfo.astro +0 -6
  50. package/dist/src-astro/alert/EAlertSuccess.astro +0 -6
  51. package/dist/src-astro/alert/EAlertTypesContainer.astro +0 -43
  52. package/dist/src-astro/alert/EAlertWarning.astro +0 -6
  53. package/dist/src-astro/alert/EAlertWithTitle.astro +0 -12
  54. package/dist/src-astro/alert/EAlertWithTitleContainer.astro +0 -11
  55. package/dist/src-astro/button/ButtonBasic.astro +0 -18
  56. package/dist/src-astro/button/ButtonBasicContainer.astro +0 -11
  57. package/dist/src-astro/button/ButtonBlock.astro +0 -5
  58. package/dist/src-astro/button/ButtonError.astro +0 -5
  59. package/dist/src-astro/button/ButtonGhost.astro +0 -5
  60. package/dist/src-astro/button/ButtonIconBoth.astro +0 -9
  61. package/dist/src-astro/button/ButtonIconLeft.astro +0 -8
  62. package/dist/src-astro/button/ButtonIconRight.astro +0 -8
  63. package/dist/src-astro/button/ButtonInfo.astro +0 -5
  64. package/dist/src-astro/button/ButtonLinkContainer.astro +0 -19
  65. package/dist/src-astro/button/ButtonNeutral.astro +0 -5
  66. package/dist/src-astro/button/ButtonOutline.astro +0 -5
  67. package/dist/src-astro/button/ButtonShapeCircle.astro +0 -5
  68. package/dist/src-astro/button/ButtonShapeDefault.astro +0 -5
  69. package/dist/src-astro/button/ButtonShapeSquare.astro +0 -5
  70. package/dist/src-astro/button/ButtonShapes.astro +0 -23
  71. package/dist/src-astro/button/ButtonShapesContainer.astro +0 -29
  72. package/dist/src-astro/button/ButtonSizes.astro +0 -15
  73. package/dist/src-astro/button/ButtonSizesContainer.astro +0 -11
  74. package/dist/src-astro/button/ButtonStates.astro +0 -12
  75. package/dist/src-astro/button/ButtonStatesContainer.astro +0 -11
  76. package/dist/src-astro/button/ButtonSuccess.astro +0 -5
  77. package/dist/src-astro/button/ButtonVariantsContainer.astro +0 -73
  78. package/dist/src-astro/button/ButtonWarning.astro +0 -5
  79. package/dist/src-astro/button/ButtonWide.astro +0 -5
  80. package/dist/src-astro/button/ButtonWidth.astro +0 -8
  81. package/dist/src-astro/button/ButtonWidthContainer.astro +0 -19
  82. package/dist/src-astro/button/ButtonWithIcons.astro +0 -25
  83. package/dist/src-astro/button/ButtonWithIconsContainer.astro +0 -29
  84. package/dist/src-astro/card/CardBasic.astro +0 -5
  85. package/dist/src-astro/card/ECardBasic.astro +0 -13
  86. package/dist/src-astro/card/ECardBasicContainer.astro +0 -11
  87. package/dist/src-astro/card/ECardClickable.astro +0 -16
  88. package/dist/src-astro/card/ECardClickableContainer.astro +0 -11
  89. package/dist/src-astro/card/ECardCompact.astro +0 -13
  90. package/dist/src-astro/card/ECardCompactContainer.astro +0 -11
  91. package/dist/src-astro/card/ECardCustomStyle.astro +0 -17
  92. package/dist/src-astro/card/ECardCustomStyleContainer.astro +0 -11
  93. package/dist/src-astro/card/ECardWithImage.astro +0 -16
  94. package/dist/src-astro/card/ECardWithImageContainer.astro +0 -11
  95. package/dist/src-astro/card/ECardWithSubtitle.astro +0 -13
  96. package/dist/src-astro/card/ECardWithSubtitleContainer.astro +0 -11
  97. package/dist/src-astro/code-container/ECodeContainerBasic.astro +0 -19
  98. package/dist/src-astro/code-container/ECodeContainerMultiple.astro +0 -49
  99. package/dist/src-astro/contact/EContactBasic.astro +0 -15
  100. package/dist/src-astro/contact/EContactBasicContainer.astro +0 -11
  101. package/dist/src-astro/contact/EContactCompact.astro +0 -11
  102. package/dist/src-astro/contact/EContactCompactContainer.astro +0 -11
  103. package/dist/src-astro/contact/EContactCustomStyle.astro +0 -21
  104. package/dist/src-astro/contact/EContactCustomStyleContainer.astro +0 -11
  105. package/dist/src-astro/contact/EContactSocial.astro +0 -20
  106. package/dist/src-astro/contact/EContactSocialContainer.astro +0 -11
  107. package/dist/src-astro/contact/EContactWithTitle.astro +0 -17
  108. package/dist/src-astro/contact/EContactWithTitleContainer.astro +0 -11
  109. package/dist/src-astro/errors/E403Basic.astro +0 -11
  110. package/dist/src-astro/errors/E403BasicContainer.astro +0 -20
  111. package/dist/src-astro/errors/E404Basic.astro +0 -11
  112. package/dist/src-astro/errors/E404BasicContainer.astro +0 -20
  113. package/dist/src-astro/errors/E404WithDebug.astro +0 -18
  114. package/dist/src-astro/errors/E500Basic.astro +0 -11
  115. package/dist/src-astro/errors/E500BasicContainer.astro +0 -20
  116. package/dist/src-astro/errors/E503Maintenance.astro +0 -20
  117. package/dist/src-astro/errors/E503MaintenanceContainer.astro +0 -21
  118. package/dist/src-astro/errors/EErrorPageCustomStyle.astro +0 -21
  119. package/dist/src-astro/errors/EErrorPageCustomStyleContainer.astro +0 -21
  120. package/dist/src-astro/errors/EErrorPageShowcase.astro +0 -68
  121. package/dist/src-astro/errors/EErrorPageShowcaseContainer.astro +0 -21
  122. package/dist/src-astro/footer/EFooterBasic.astro +0 -18
  123. package/dist/src-astro/footer/EFooterBasicContainer.astro +0 -11
  124. package/dist/src-astro/footer/EFooterComplete.astro +0 -50
  125. package/dist/src-astro/footer/EFooterCompleteContainer.astro +0 -11
  126. package/dist/src-astro/footer/EFooterFeaturesContainer.astro +0 -40
  127. package/dist/src-astro/footer/EFooterWithLogo.astro +0 -28
  128. package/dist/src-astro/footer/EFooterWithLogoContainer.astro +0 -11
  129. package/dist/src-astro/footer/EFooterWithNavigation.astro +0 -24
  130. package/dist/src-astro/footer/EFooterWithNavigationContainer.astro +0 -11
  131. package/dist/src-astro/footer/EFooterWithProducts.astro +0 -24
  132. package/dist/src-astro/footer/EFooterWithProductsContainer.astro +0 -11
  133. package/dist/src-astro/footer/EFooterWithSocial.astro +0 -24
  134. package/dist/src-astro/footer/EFooterWithSocialContainer.astro +0 -11
  135. package/dist/src-astro/header/HeaderBasic.astro +0 -19
  136. package/dist/src-astro/header/HeaderCustomNavbarCenter.astro +0 -28
  137. package/dist/src-astro/header/HeaderCustomNavbarEnd.astro +0 -25
  138. package/dist/src-astro/header/HeaderCustomNavbarStart.astro +0 -27
  139. package/dist/src-astro/header/HeaderCustomPosition.astro +0 -34
  140. package/dist/src-astro/header/HeaderWithNavigation.astro +0 -27
  141. package/dist/src-astro/hero/EHeroAlignCenter.astro +0 -13
  142. package/dist/src-astro/hero/EHeroAlignContainer.astro +0 -27
  143. package/dist/src-astro/hero/EHeroAlignLeft.astro +0 -13
  144. package/dist/src-astro/hero/EHeroAlignRight.astro +0 -13
  145. package/dist/src-astro/hero/EHeroBackgroundContainer.astro +0 -18
  146. package/dist/src-astro/hero/EHeroBackgroundImage.astro +0 -16
  147. package/dist/src-astro/hero/EHeroBackgroundImageContainer.astro +0 -11
  148. package/dist/src-astro/hero/EHeroBasic.astro +0 -12
  149. package/dist/src-astro/hero/EHeroBasicContainer.astro +0 -11
  150. package/dist/src-astro/hero/EHeroGradientBackground.astro +0 -10
  151. package/dist/src-astro/hero/EHeroPlainBackground.astro +0 -10
  152. package/dist/src-astro/hero/EHeroWithButton.astro +0 -14
  153. package/dist/src-astro/hero/EHeroWithButtonContainer.astro +0 -11
  154. package/dist/src-astro/hero/EHeroWithImage.astro +0 -16
  155. package/dist/src-astro/hero/EHeroWithImageContainer.astro +0 -11
  156. package/dist/src-astro/layout-app/AppLayoutBasic.astro +0 -54
  157. package/dist/src-astro/layout-dashboard/DashboardLayoutBasic.astro +0 -51
@@ -1,25 +0,0 @@
1
- ---
2
- /**
3
- * @component Header.CustomNavbarEnd
4
- *
5
- * @description
6
- * 自定义导航栏右侧内容的Header组件示例,展示如何使用slot自定义右侧内容。
7
- */
8
- import '../../style.ts';
9
- import Header from './Header.astro';
10
- import { getExampleImage } from '../utils/image.ts';
11
-
12
- const logo = getExampleImage({
13
- width: 100,
14
- height: 100,
15
- provider: 'picsum',
16
- tag: 'tech',
17
- });
18
- ---
19
-
20
- <Header logoHref={logo} rounded="lg" sticky={false}>
21
- <div slot="navbar-end" class="cosy:flex cosy:items-center cosy:gap-2">
22
- <button class="cosy:btn cosy:btn-sm cosy:btn-ghost">登录</button>
23
- <button class="cosy:btn cosy:btn-sm cosy:btn-primary">注册</button>
24
- </div>
25
- </Header>
@@ -1,27 +0,0 @@
1
- ---
2
- /**
3
- * @component Header.CustomNavbarStart
4
- *
5
- * @description
6
- * 自定义导航栏左侧内容的Header组件示例,展示如何使用slot自定义左侧内容。
7
- */
8
- import '../../style.ts';
9
- import Header from './Header.astro';
10
- import { getExampleImage } from '../utils/image.ts';
11
-
12
- const logo = getExampleImage({
13
- width: 100,
14
- height: 100,
15
- provider: 'picsum',
16
- tag: 'tech',
17
- });
18
- ---
19
-
20
- <Header logoHref={logo} rounded="lg" sticky={false}>
21
- <div
22
- slot="navbar-start"
23
- class="cosy:flex cosy:items-center cosy:gap-2 cosy:ml-2">
24
- <button class="cosy:btn cosy:btn-sm cosy:btn-primary">联系我们</button>
25
- <span class="cosy:badge cosy:badge-outline">在线咨询</span>
26
- </div>
27
- </Header>
@@ -1,34 +0,0 @@
1
- ---
2
- /**
3
- * @component Header.CustomPosition
4
- *
5
- * @description
6
- * 自定义导航菜单位置的Header组件示例,展示如何设置导航菜单在左侧、中间或右侧。
7
- */
8
- import '../../style.ts';
9
- import Header from './Header.astro';
10
- import { getExampleImage } from '../utils/image.ts';
11
-
12
- const logo = getExampleImage({
13
- width: 100,
14
- height: 100,
15
- provider: 'picsum',
16
- tag: 'tech',
17
- });
18
-
19
- const navItems = [
20
- { href: '/docs', label: '文档' },
21
- { href: '/components', label: '组件' },
22
- ];
23
-
24
- // 可以通过navPosition属性设置导航菜单位置:start(左侧)、center(中间)、end(右侧)
25
- const navPosition = 'start';
26
- ---
27
-
28
- <Header
29
- logoHref={logo}
30
- navItems={navItems}
31
- navPosition={navPosition}
32
- rounded="lg"
33
- sticky={false}
34
- />
@@ -1,27 +0,0 @@
1
- ---
2
- /**
3
- * @component Header.WithNavigation
4
- *
5
- * @description
6
- * 带导航菜单的Header组件示例,展示如何添加导航菜单项。
7
- */
8
- import '../../style.ts';
9
- import Header from './Header.astro';
10
- import { getExampleImage } from '../utils/image.ts';
11
-
12
- const logo = getExampleImage({
13
- width: 100,
14
- height: 100,
15
- provider: 'picsum',
16
- tag: 'tech',
17
- });
18
-
19
- const navItems = [
20
- { href: '/', label: '首页' },
21
- { href: '/docs', label: '文档' },
22
- { href: '/components', label: '组件' },
23
- { href: '/about', label: '关于' },
24
- ];
25
- ---
26
-
27
- <Header logoHref={logo} navItems={navItems} rounded="lg" sticky={false} />
@@ -1,13 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="居中对齐标题"
7
- description="这是一个居中对齐的Hero组件示例。"
8
- align="center"
9
- links={[
10
- { text: '主要操作', href: '#' },
11
- { text: '次要操作', href: '#' },
12
- ]}
13
- />
@@ -1,27 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroAlignCenter from './EHeroAlignCenter.astro';
4
- import HeroAlignLeft from './EHeroAlignLeft.astro';
5
- import HeroAlignRight from './EHeroAlignRight.astro';
6
- import HeroAlignCenterSourceCode from './EHeroAlignCenter.astro?raw';
7
- import HeroAlignLeftSourceCode from './EHeroAlignLeft.astro?raw';
8
- import HeroAlignRightSourceCode from './EHeroAlignRight.astro?raw';
9
- ---
10
-
11
- <CodeContainer
12
- titles={['居中对齐', '左对齐', '右对齐']}
13
- codes={[
14
- HeroAlignCenterSourceCode,
15
- HeroAlignLeftSourceCode,
16
- HeroAlignRightSourceCode,
17
- ]}>
18
- <div id="tab-1">
19
- <HeroAlignCenter />
20
- </div>
21
- <div id="tab-2">
22
- <HeroAlignLeft />
23
- </div>
24
- <div id="tab-3">
25
- <HeroAlignRight />
26
- </div>
27
- </CodeContainer>
@@ -1,13 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="左对齐标题"
7
- description="这是一个左对齐的Hero组件示例。"
8
- align="left"
9
- links={[
10
- { text: '主要操作', href: '#' },
11
- { text: '次要操作', href: '#' },
12
- ]}
13
- />
@@ -1,13 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="右对齐标题"
7
- description="这是一个右对齐的Hero组件示例。"
8
- align="right"
9
- links={[
10
- { text: '主要操作', href: '#' },
11
- { text: '次要操作', href: '#' },
12
- ]}
13
- />
@@ -1,18 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroPlainBackground from './EHeroPlainBackground.astro';
4
- import HeroGradientBackground from './EHeroGradientBackground.astro';
5
- import HeroPlainBackgroundSourceCode from './EHeroPlainBackground.astro?raw';
6
- import HeroGradientBackgroundSourceCode from './EHeroGradientBackground.astro?raw';
7
- ---
8
-
9
- <CodeContainer
10
- titles={['纯色背景', '渐变色背景']}
11
- codes={[HeroPlainBackgroundSourceCode, HeroGradientBackgroundSourceCode]}>
12
- <div id="tab-1">
13
- <HeroPlainBackground />
14
- </div>
15
- <div id="tab-2">
16
- <HeroGradientBackground />
17
- </div>
18
- </CodeContainer>
@@ -1,16 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- import { getLandscapeImage } from '../../index-astro';
4
- ---
5
-
6
- <Hero
7
- title="背景图片"
8
- description="使用背景图片增强视觉效果。"
9
- backgroundImage={getLandscapeImage({
10
- width: 800,
11
- height: 400,
12
- provider: 'picsum',
13
- })}
14
- backgroundOverlay="dark"
15
- links={[{ text: '了解更多', href: '/about' }]}
16
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroBackgroundImage from './EHeroBackgroundImage.astro';
4
- import HeroBackgroundImageSourceCode from './EHeroBackgroundImage.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[HeroBackgroundImageSourceCode]}>
8
- <div id="tab-1">
9
- <HeroBackgroundImage />
10
- </div>
11
- </CodeContainer>
@@ -1,12 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="欢迎使用我们的产品"
7
- description="这是一个简短的描述,介绍产品的主要特点和价值。"
8
- links={[
9
- { text: '开始使用', href: '/getting-started' },
10
- { text: '了解更多', href: '/about' },
11
- ]}
12
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroBasic from './EHeroBasic.astro';
4
- import HeroBasicSourceCode from './EHeroBasic.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[HeroBasicSourceCode]}>
8
- <div id="tab-1">
9
- <HeroBasic />
10
- </div>
11
- </CodeContainer>
@@ -1,10 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="渐变色背景"
7
- description="这个例子使用了渐变色背景样式。"
8
- background="gradient"
9
- links={[{ text: '了解更多', href: '/about' }]}
10
- />
@@ -1,10 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- ---
4
-
5
- <Hero
6
- title="纯色背景"
7
- description="这个例子使用了纯色背景样式。"
8
- background="plain"
9
- links={[{ text: '了解更多', href: '/about' }]}
10
- />
@@ -1,14 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- import Button from '../button/Button.astro';
4
- ---
5
-
6
- <Hero
7
- title="带自定义按钮的Hero"
8
- description="这是一个带有自定义按钮的Hero组件示例。"
9
- links={[]}>
10
- <div slot="app" class="cosy:flex cosy:gap-4">
11
- <Button variant="primary">主要操作</Button>
12
- <Button variant="secondary">次要操作</Button>
13
- </div>
14
- </Hero>
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroWithButton from './EHeroWithButton.astro';
4
- import HeroWithButtonSourceCode from './EHeroWithButton.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[HeroWithButtonSourceCode]}>
8
- <div id="tab-1">
9
- <HeroWithButton />
10
- </div>
11
- </CodeContainer>
@@ -1,16 +0,0 @@
1
- ---
2
- import Hero from './Hero.astro';
3
- import { getExampleImage } from '../../index-astro';
4
-
5
- const image = {
6
- src: getExampleImage({ width: 400, height: 300, provider: 'picsum' }),
7
- alt: '示例图片',
8
- };
9
- ---
10
-
11
- <Hero
12
- title="带图片的Hero"
13
- description="这是一个带有图片的Hero组件示例。"
14
- image={image}
15
- links={[{ text: '查看详情', href: '#' }]}
16
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import HeroWithImage from './EHeroWithImage.astro';
4
- import HeroWithImageSourceCode from './EHeroWithImage.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[HeroWithImageSourceCode]}>
8
- <div id="tab-1">
9
- <HeroWithImage />
10
- </div>
11
- </CodeContainer>
@@ -1,54 +0,0 @@
1
- ---
2
- import AppLayout from './AppLayout.astro';
3
- import type { ISidebarItem } from '../types/sidebar';
4
-
5
- const sidebarItems: ISidebarItem[] = [
6
- {
7
- text: '入门',
8
- href: '/docs/getting-started',
9
- items: [
10
- { href: '/docs/getting-started', text: '快速开始' },
11
- { href: '/docs/installation', text: '安装' },
12
- ],
13
- },
14
- {
15
- text: '组件',
16
- href: '/docs/components',
17
- items: [
18
- { href: '/docs/components/button', text: 'Button 按钮' },
19
- { href: '/docs/components/card', text: 'Card 卡片' },
20
- ],
21
- },
22
- ];
23
- ---
24
-
25
- <AppLayout
26
- metaConfig={{
27
- title: '应用布局示例',
28
- description: '这是一个应用布局的示例页面',
29
- keywords: '布局,示例,应用布局',
30
- author: 'CofficLab',
31
- robots: 'noindex,nofollow',
32
- }}
33
- sidebarConfig={{
34
- sidebarItems: sidebarItems,
35
- }}
36
- headerConfig={{
37
- height: 'md',
38
- }}
39
- footerConfig={{
40
- siteName: '我的文档站点',
41
- homeLink: '/',
42
- slogan: '简单而强大的组件库',
43
- company: 'CofficLab',
44
- copyright: '保留所有权利',
45
- inspirationalSlogan: '让开发更加愉悦',
46
- }}
47
- mainContentConfig={{
48
- padding: 'md',
49
- }}
50
- >
51
- <h1 class="cosy:text-2xl cosy:font-bold cosy:mb-4">欢迎使用应用布局</h1>
52
- <p class="cosy:mb-2">这是一个包含侧边栏、头部和页脚的完整布局示例。</p>
53
- <p>应用布局适合用于文档站点、管理后台等场景。</p>
54
- </AppLayout>
@@ -1,51 +0,0 @@
1
- ---
2
- import DashboardLayout from './DashboardLayout.astro';
3
- import type { IMenuItem } from '../types/menu';
4
-
5
- const menuItems: IMenuItem[] = [
6
- {
7
- text: '仪表盘',
8
- href: '/dashboard',
9
- icon: 'dashboard',
10
- },
11
- {
12
- text: '用户管理',
13
- href: '/dashboard/users',
14
- icon: 'users',
15
- },
16
- {
17
- text: '设置',
18
- href: '/dashboard/settings',
19
- icon: 'settings',
20
- },
21
- ];
22
- ---
23
-
24
- <DashboardLayout
25
- title="仪表盘布局示例"
26
- description="这是一个仪表盘布局的示例页面"
27
- navItems={menuItems}
28
- >
29
- <div
30
- class="cosy:grid cosy:grid-cols-1 cosy:md:grid-cols-2 cosy:lg:grid-cols-3 cosy:gap-4"
31
- >
32
- <div class="cosy:card cosy:bg-base-100 cosy:shadow-xl">
33
- <div class="cosy:card-body">
34
- <h2 class="cosy:card-title">总用户数</h2>
35
- <p class="cosy:text-4xl cosy:font-bold">1,234</p>
36
- </div>
37
- </div>
38
- <div class="cosy:card cosy:bg-base-100 cosy:shadow-xl">
39
- <div class="cosy:card-body">
40
- <h2 class="cosy:card-title">今日活跃</h2>
41
- <p class="cosy:text-4xl cosy:font-bold">567</p>
42
- </div>
43
- </div>
44
- <div class="cosy:card cosy:bg-base-100 cosy:shadow-xl">
45
- <div class="cosy:card-body">
46
- <h2 class="cosy:card-title">转化率</h2>
47
- <p class="cosy:text-4xl cosy:font-bold">45.8%</p>
48
- </div>
49
- </div>
50
- </div>
51
- </DashboardLayout>