@coffic/cosy-ui 0.8.10 → 0.8.11
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.
- package/dist/app.css +1 -1
- package/dist/src-astro/alert/index.ts +7 -15
- package/dist/src-astro/assets/iconData.ts +100 -0
- package/dist/src-astro/button/index_astro.ts +2 -56
- package/dist/src-astro/card/CardCourse.astro +31 -11
- package/dist/src-astro/card/index.ts +15 -25
- package/dist/src-astro/code-container/CodeContainer.astro +205 -5
- package/dist/src-astro/code-container/index.ts +9 -13
- package/dist/src-astro/contact/index.ts +16 -20
- package/dist/src-astro/errors/index.ts +0 -62
- package/dist/src-astro/footer/index.ts +1 -30
- package/dist/src-astro/header/Header.astro +1 -2
- package/dist/src-astro/header/index.ts +1 -40
- package/dist/src-astro/hero/index.ts +1 -39
- package/dist/src-astro/icons/ChartIcon.astro +28 -0
- package/dist/src-astro/icons/DashboardIcon.astro +28 -0
- package/dist/src-astro/icons/DeleteIcon.astro +28 -0
- package/dist/src-astro/icons/DocumentIcon.astro +28 -0
- package/dist/src-astro/icons/DownloadIcon.astro +28 -0
- package/dist/src-astro/icons/EditIcon.astro +28 -0
- package/dist/src-astro/icons/FolderIcon.astro +28 -0
- package/dist/src-astro/icons/HeartIcon.astro +28 -0
- package/dist/src-astro/icons/HomeIcon.astro +28 -0
- package/dist/src-astro/icons/MailIcon.astro +28 -0
- package/dist/src-astro/icons/MessageIcon.astro +28 -0
- package/dist/src-astro/icons/NotificationIcon.astro +28 -0
- package/dist/src-astro/icons/ReportIcon.astro +28 -0
- package/dist/src-astro/icons/SaveIcon.astro +28 -0
- package/dist/src-astro/icons/SecurityIcon.astro +28 -0
- package/dist/src-astro/icons/StarIcon.astro +28 -0
- package/dist/src-astro/icons/ToolsIcon.astro +28 -0
- package/dist/src-astro/icons/UploadIcon.astro +28 -0
- package/dist/src-astro/icons/UsersIcon.astro +28 -0
- package/dist/src-astro/icons/WalletIcon.astro +28 -0
- package/dist/src-astro/icons/index.ts +20 -0
- package/dist/src-astro/layout-app/index.ts +5 -9
- package/dist/src-astro/layout-dashboard/DashboardLayout.astro +101 -555
- package/dist/src-astro/layout-dashboard/DashboardSidebar.astro +206 -0
- package/dist/src-astro/layout-dashboard/DashboardTopNavbar.astro +132 -0
- package/dist/src-astro/layout-dashboard/index.ts +14 -8
- package/dist/src-astro/layout-dashboard/tools.ts +0 -0
- package/dist/src-astro/layout-dashboard/types.ts +313 -0
- package/package.json +1 -1
- package/dist/src-astro/alert/EAlertBasic.astro +0 -11
- package/dist/src-astro/alert/EAlertBasicContainer.astro +0 -11
- package/dist/src-astro/alert/EAlertCustomStyle.astro +0 -16
- package/dist/src-astro/alert/EAlertCustomStyleContainer.astro +0 -11
- package/dist/src-astro/alert/EAlertError.astro +0 -6
- package/dist/src-astro/alert/EAlertInfo.astro +0 -6
- package/dist/src-astro/alert/EAlertSuccess.astro +0 -6
- package/dist/src-astro/alert/EAlertTypesContainer.astro +0 -43
- package/dist/src-astro/alert/EAlertWarning.astro +0 -6
- package/dist/src-astro/alert/EAlertWithTitle.astro +0 -12
- package/dist/src-astro/alert/EAlertWithTitleContainer.astro +0 -11
- package/dist/src-astro/button/ButtonBasic.astro +0 -18
- package/dist/src-astro/button/ButtonBasicContainer.astro +0 -11
- package/dist/src-astro/button/ButtonBlock.astro +0 -5
- package/dist/src-astro/button/ButtonError.astro +0 -5
- package/dist/src-astro/button/ButtonGhost.astro +0 -5
- package/dist/src-astro/button/ButtonIconBoth.astro +0 -9
- package/dist/src-astro/button/ButtonIconLeft.astro +0 -8
- package/dist/src-astro/button/ButtonIconRight.astro +0 -8
- package/dist/src-astro/button/ButtonInfo.astro +0 -5
- package/dist/src-astro/button/ButtonLinkContainer.astro +0 -19
- package/dist/src-astro/button/ButtonNeutral.astro +0 -5
- package/dist/src-astro/button/ButtonOutline.astro +0 -5
- package/dist/src-astro/button/ButtonShapeCircle.astro +0 -5
- package/dist/src-astro/button/ButtonShapeDefault.astro +0 -5
- package/dist/src-astro/button/ButtonShapeSquare.astro +0 -5
- package/dist/src-astro/button/ButtonShapes.astro +0 -23
- package/dist/src-astro/button/ButtonShapesContainer.astro +0 -29
- package/dist/src-astro/button/ButtonSizes.astro +0 -15
- package/dist/src-astro/button/ButtonSizesContainer.astro +0 -11
- package/dist/src-astro/button/ButtonStates.astro +0 -12
- package/dist/src-astro/button/ButtonStatesContainer.astro +0 -11
- package/dist/src-astro/button/ButtonSuccess.astro +0 -5
- package/dist/src-astro/button/ButtonVariantsContainer.astro +0 -73
- package/dist/src-astro/button/ButtonWarning.astro +0 -5
- package/dist/src-astro/button/ButtonWide.astro +0 -5
- package/dist/src-astro/button/ButtonWidth.astro +0 -8
- package/dist/src-astro/button/ButtonWidthContainer.astro +0 -19
- package/dist/src-astro/button/ButtonWithIcons.astro +0 -25
- package/dist/src-astro/button/ButtonWithIconsContainer.astro +0 -29
- package/dist/src-astro/card/CardBasic.astro +0 -5
- package/dist/src-astro/card/ECardBasic.astro +0 -13
- package/dist/src-astro/card/ECardBasicContainer.astro +0 -11
- package/dist/src-astro/card/ECardClickable.astro +0 -16
- package/dist/src-astro/card/ECardClickableContainer.astro +0 -11
- package/dist/src-astro/card/ECardCompact.astro +0 -13
- package/dist/src-astro/card/ECardCompactContainer.astro +0 -11
- package/dist/src-astro/card/ECardCustomStyle.astro +0 -17
- package/dist/src-astro/card/ECardCustomStyleContainer.astro +0 -11
- package/dist/src-astro/card/ECardWithImage.astro +0 -16
- package/dist/src-astro/card/ECardWithImageContainer.astro +0 -11
- package/dist/src-astro/card/ECardWithSubtitle.astro +0 -13
- package/dist/src-astro/card/ECardWithSubtitleContainer.astro +0 -11
- package/dist/src-astro/code-container/ECodeContainerBasic.astro +0 -19
- package/dist/src-astro/code-container/ECodeContainerMultiple.astro +0 -49
- package/dist/src-astro/contact/EContactBasic.astro +0 -15
- package/dist/src-astro/contact/EContactBasicContainer.astro +0 -11
- package/dist/src-astro/contact/EContactCompact.astro +0 -11
- package/dist/src-astro/contact/EContactCompactContainer.astro +0 -11
- package/dist/src-astro/contact/EContactCustomStyle.astro +0 -21
- package/dist/src-astro/contact/EContactCustomStyleContainer.astro +0 -11
- package/dist/src-astro/contact/EContactSocial.astro +0 -20
- package/dist/src-astro/contact/EContactSocialContainer.astro +0 -11
- package/dist/src-astro/contact/EContactWithTitle.astro +0 -17
- package/dist/src-astro/contact/EContactWithTitleContainer.astro +0 -11
- package/dist/src-astro/errors/E403Basic.astro +0 -11
- package/dist/src-astro/errors/E403BasicContainer.astro +0 -20
- package/dist/src-astro/errors/E404Basic.astro +0 -11
- package/dist/src-astro/errors/E404BasicContainer.astro +0 -20
- package/dist/src-astro/errors/E404WithDebug.astro +0 -18
- package/dist/src-astro/errors/E500Basic.astro +0 -11
- package/dist/src-astro/errors/E500BasicContainer.astro +0 -20
- package/dist/src-astro/errors/E503Maintenance.astro +0 -20
- package/dist/src-astro/errors/E503MaintenanceContainer.astro +0 -21
- package/dist/src-astro/errors/EErrorPageCustomStyle.astro +0 -21
- package/dist/src-astro/errors/EErrorPageCustomStyleContainer.astro +0 -21
- package/dist/src-astro/errors/EErrorPageShowcase.astro +0 -68
- package/dist/src-astro/errors/EErrorPageShowcaseContainer.astro +0 -21
- package/dist/src-astro/footer/EFooterBasic.astro +0 -18
- package/dist/src-astro/footer/EFooterBasicContainer.astro +0 -11
- package/dist/src-astro/footer/EFooterComplete.astro +0 -50
- package/dist/src-astro/footer/EFooterCompleteContainer.astro +0 -11
- package/dist/src-astro/footer/EFooterFeaturesContainer.astro +0 -40
- package/dist/src-astro/footer/EFooterWithLogo.astro +0 -28
- package/dist/src-astro/footer/EFooterWithLogoContainer.astro +0 -11
- package/dist/src-astro/footer/EFooterWithNavigation.astro +0 -24
- package/dist/src-astro/footer/EFooterWithNavigationContainer.astro +0 -11
- package/dist/src-astro/footer/EFooterWithProducts.astro +0 -24
- package/dist/src-astro/footer/EFooterWithProductsContainer.astro +0 -11
- package/dist/src-astro/footer/EFooterWithSocial.astro +0 -24
- package/dist/src-astro/footer/EFooterWithSocialContainer.astro +0 -11
- package/dist/src-astro/header/HeaderBasic.astro +0 -19
- package/dist/src-astro/header/HeaderCustomNavbarCenter.astro +0 -28
- package/dist/src-astro/header/HeaderCustomNavbarEnd.astro +0 -25
- package/dist/src-astro/header/HeaderCustomNavbarStart.astro +0 -27
- package/dist/src-astro/header/HeaderCustomPosition.astro +0 -34
- package/dist/src-astro/header/HeaderWithNavigation.astro +0 -27
- package/dist/src-astro/hero/EHeroAlignCenter.astro +0 -13
- package/dist/src-astro/hero/EHeroAlignContainer.astro +0 -27
- package/dist/src-astro/hero/EHeroAlignLeft.astro +0 -13
- package/dist/src-astro/hero/EHeroAlignRight.astro +0 -13
- package/dist/src-astro/hero/EHeroBackgroundContainer.astro +0 -18
- package/dist/src-astro/hero/EHeroBackgroundImage.astro +0 -16
- package/dist/src-astro/hero/EHeroBackgroundImageContainer.astro +0 -11
- package/dist/src-astro/hero/EHeroBasic.astro +0 -12
- package/dist/src-astro/hero/EHeroBasicContainer.astro +0 -11
- package/dist/src-astro/hero/EHeroGradientBackground.astro +0 -10
- package/dist/src-astro/hero/EHeroPlainBackground.astro +0 -10
- package/dist/src-astro/hero/EHeroWithButton.astro +0 -14
- package/dist/src-astro/hero/EHeroWithButtonContainer.astro +0 -11
- package/dist/src-astro/hero/EHeroWithImage.astro +0 -16
- package/dist/src-astro/hero/EHeroWithImageContainer.astro +0 -11
- package/dist/src-astro/layout-app/AppLayoutBasic.astro +0 -54
- package/dist/src-astro/layout-dashboard/DashboardLayoutBasic.astro +0 -51
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterBasic from './EFooterBasic.astro';
|
4
|
-
import FooterBasicSourceCode from './EFooterBasic.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterBasicSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterBasic />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,50 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Footer.Complete
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* 展示完整功能的页脚示例,包含所有主要属性。
|
7
|
-
*/
|
8
|
-
import { Footer } from '../../index-astro';
|
9
|
-
import { getExampleImage } from '../utils/image';
|
10
|
-
---
|
11
|
-
|
12
|
-
<Footer
|
13
|
-
siteName="我的网站"
|
14
|
-
homeLink="/"
|
15
|
-
slogan="简单而强大"
|
16
|
-
company="我的公司"
|
17
|
-
copyright="保留所有权利"
|
18
|
-
inspirationalSlogan="构建美好的数字体验"
|
19
|
-
logo={{
|
20
|
-
src: getExampleImage({
|
21
|
-
width: 100,
|
22
|
-
height: 100,
|
23
|
-
provider: 'robohash',
|
24
|
-
tag: 'logo',
|
25
|
-
}),
|
26
|
-
alt: '网站Logo',
|
27
|
-
}}
|
28
|
-
products={[
|
29
|
-
{ name: '产品A', href: '/products/a' },
|
30
|
-
{ name: '产品B', href: '/products/b' },
|
31
|
-
{ name: '产品C', href: '/products/c' },
|
32
|
-
{ name: '外部产品', href: 'https://example.com', external: true },
|
33
|
-
]}
|
34
|
-
socialLinks={[
|
35
|
-
'https://github.com/myusername',
|
36
|
-
'https://twitter.com/myusername',
|
37
|
-
'https://linkedin.com/in/myusername',
|
38
|
-
'https://facebook.com/myusername',
|
39
|
-
]}
|
40
|
-
aboutLink="/about"
|
41
|
-
contactLink="/contact"
|
42
|
-
termsLink="/terms"
|
43
|
-
privacyLink="/privacy"
|
44
|
-
teamLink="/team"
|
45
|
-
careersLink="/careers"
|
46
|
-
newsLink="/news"
|
47
|
-
blogLink="/blog"
|
48
|
-
faqLink="/faq"
|
49
|
-
icp="京ICP备12345678号"
|
50
|
-
/>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterComplete from './EFooterComplete.astro';
|
4
|
-
import FooterCompleteSourceCode from './EFooterComplete.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterCompleteSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterComplete />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,40 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterBasic from './EFooterBasic.astro';
|
4
|
-
import FooterWithSocial from './EFooterWithSocial.astro';
|
5
|
-
import FooterWithProducts from './EFooterWithProducts.astro';
|
6
|
-
import FooterWithLogo from './EFooterWithLogo.astro';
|
7
|
-
import FooterWithNavigation from './EFooterWithNavigation.astro';
|
8
|
-
|
9
|
-
import FooterBasicSourceCode from './EFooterBasic.astro?raw';
|
10
|
-
import FooterWithSocialSourceCode from './EFooterWithSocial.astro?raw';
|
11
|
-
import FooterWithProductsSourceCode from './EFooterWithProducts.astro?raw';
|
12
|
-
import FooterWithLogoSourceCode from './EFooterWithLogo.astro?raw';
|
13
|
-
import FooterWithNavigationSourceCode from './EFooterWithNavigation.astro?raw';
|
14
|
-
---
|
15
|
-
|
16
|
-
<CodeContainer
|
17
|
-
titles={['基础', '社交媒体', '产品链接', 'Logo', '导航链接']}
|
18
|
-
codes={[
|
19
|
-
FooterBasicSourceCode,
|
20
|
-
FooterWithSocialSourceCode,
|
21
|
-
FooterWithProductsSourceCode,
|
22
|
-
FooterWithLogoSourceCode,
|
23
|
-
FooterWithNavigationSourceCode,
|
24
|
-
]}>
|
25
|
-
<div id="tab-1">
|
26
|
-
<FooterBasic />
|
27
|
-
</div>
|
28
|
-
<div id="tab-2">
|
29
|
-
<FooterWithSocial />
|
30
|
-
</div>
|
31
|
-
<div id="tab-3">
|
32
|
-
<FooterWithProducts />
|
33
|
-
</div>
|
34
|
-
<div id="tab-4">
|
35
|
-
<FooterWithLogo />
|
36
|
-
</div>
|
37
|
-
<div id="tab-5">
|
38
|
-
<FooterWithNavigation />
|
39
|
-
</div>
|
40
|
-
</CodeContainer>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Footer.WithLogo
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* 展示带有Logo的页脚示例。
|
7
|
-
*/
|
8
|
-
import { Footer } from '../../index-astro';
|
9
|
-
import { getExampleImage } from '../utils/image';
|
10
|
-
---
|
11
|
-
|
12
|
-
<Footer
|
13
|
-
siteName="我的网站"
|
14
|
-
homeLink="/"
|
15
|
-
slogan="简单而强大"
|
16
|
-
company="我的公司"
|
17
|
-
copyright="保留所有权利"
|
18
|
-
inspirationalSlogan="构建美好的数字体验"
|
19
|
-
logo={{
|
20
|
-
src: getExampleImage({
|
21
|
-
width: 100,
|
22
|
-
height: 100,
|
23
|
-
provider: 'robohash',
|
24
|
-
tag: 'logo',
|
25
|
-
}),
|
26
|
-
alt: '网站Logo',
|
27
|
-
}}
|
28
|
-
/>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterWithLogo from './EFooterWithLogo.astro';
|
4
|
-
import FooterWithLogoSourceCode from './EFooterWithLogo.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterWithLogoSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterWithLogo />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Footer.WithNavigation
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* 展示带有导航链接的页脚示例。
|
7
|
-
*/
|
8
|
-
import { Footer } from '../../index-astro';
|
9
|
-
---
|
10
|
-
|
11
|
-
<Footer
|
12
|
-
siteName="我的网站"
|
13
|
-
homeLink="/"
|
14
|
-
slogan="简单而强大"
|
15
|
-
company="我的公司"
|
16
|
-
copyright="保留所有权利"
|
17
|
-
inspirationalSlogan="构建美好的数字体验"
|
18
|
-
aboutLink="/about"
|
19
|
-
contactLink="/contact"
|
20
|
-
termsLink="/terms"
|
21
|
-
privacyLink="/privacy"
|
22
|
-
blogLink="/blog"
|
23
|
-
faqLink="/faq"
|
24
|
-
/>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterWithNavigation from './EFooterWithNavigation.astro';
|
4
|
-
import FooterWithNavigationSourceCode from './EFooterWithNavigation.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterWithNavigationSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterWithNavigation />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Footer.WithProducts
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* 展示带有产品链接的页脚示例。
|
7
|
-
*/
|
8
|
-
import { Footer } from '../../index-astro';
|
9
|
-
---
|
10
|
-
|
11
|
-
<Footer
|
12
|
-
siteName="我的网站"
|
13
|
-
homeLink="/"
|
14
|
-
slogan="简单而强大"
|
15
|
-
company="我的公司"
|
16
|
-
copyright="保留所有权利"
|
17
|
-
inspirationalSlogan="构建美好的数字体验"
|
18
|
-
products={[
|
19
|
-
{ name: '产品A', href: '/products/a' },
|
20
|
-
{ name: '产品B', href: '/products/b' },
|
21
|
-
{ name: '产品C', href: '/products/c' },
|
22
|
-
{ name: '外部产品', href: 'https://example.com', external: true },
|
23
|
-
]}
|
24
|
-
/>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterWithProducts from './EFooterWithProducts.astro';
|
4
|
-
import FooterWithProductsSourceCode from './EFooterWithProducts.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterWithProductsSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterWithProducts />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Footer.WithSocial
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* 展示带有社交媒体链接的页脚示例。
|
7
|
-
*/
|
8
|
-
import { Footer } from '../../index-astro';
|
9
|
-
---
|
10
|
-
|
11
|
-
<Footer
|
12
|
-
siteName="我的网站"
|
13
|
-
homeLink="/"
|
14
|
-
slogan="简单而强大"
|
15
|
-
company="我的公司"
|
16
|
-
copyright="保留所有权利"
|
17
|
-
inspirationalSlogan="构建美好的数字体验"
|
18
|
-
socialLinks={[
|
19
|
-
'https://github.com/myusername',
|
20
|
-
'https://twitter.com/myusername',
|
21
|
-
'https://linkedin.com/in/myusername',
|
22
|
-
'https://facebook.com/myusername',
|
23
|
-
]}
|
24
|
-
/>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
---
|
2
|
-
import { CodeContainer } from '../../index-astro';
|
3
|
-
import FooterWithSocial from './EFooterWithSocial.astro';
|
4
|
-
import FooterWithSocialSourceCode from './EFooterWithSocial.astro?raw';
|
5
|
-
---
|
6
|
-
|
7
|
-
<CodeContainer codes={[FooterWithSocialSourceCode]}>
|
8
|
-
<div id="tab-1">
|
9
|
-
<FooterWithSocial />
|
10
|
-
</div>
|
11
|
-
</CodeContainer>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Header.Basic
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* Header组件的基础示例,展示最基本的顶部导航栏,包含logo和语言切换功能。
|
7
|
-
*/
|
8
|
-
import Header from './Header.astro';
|
9
|
-
import { getExampleImage } from '../utils/image';
|
10
|
-
|
11
|
-
const logo = getExampleImage({
|
12
|
-
width: 100,
|
13
|
-
height: 100,
|
14
|
-
provider: 'picsum',
|
15
|
-
tag: 'tech',
|
16
|
-
});
|
17
|
-
---
|
18
|
-
|
19
|
-
<Header logoHref={logo} rounded="lg" sticky={false} />
|
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
/**
|
3
|
-
* @component Header.CustomNavbarCenter
|
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-center" class="cosy:flex cosy:items-center cosy:gap-4">
|
22
|
-
<span class="cosy:badge cosy:badge-accent">新功能</span>
|
23
|
-
<div class="cosy:divider cosy:divider-horizontal"></div>
|
24
|
-
<span class="cosy:badge cosy:badge-secondary">热门</span>
|
25
|
-
<div class="cosy:divider cosy:divider-horizontal"></div>
|
26
|
-
<span class="cosy:badge">推荐</span>
|
27
|
-
</div>
|
28
|
-
</Header>
|
@@ -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,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,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,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,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
|
-
/>
|