@wordup-md/nuxt-layer-shadcn-unocss 0.2.0
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/.cursor/rules/active-context-rule.mdc +8 -0
- package/.cursor/rules/memory-bank-overview.mdc +17 -0
- package/.cursor/rules/product-context-rule.mdc +8 -0
- package/.cursor/rules/progress-rule.mdc +8 -0
- package/.cursor/rules/projectbrief-rule.mdc +8 -0
- package/.cursor/rules/system-patterns-rule.mdc +8 -0
- package/.cursor/rules/tech-context-rule.mdc +8 -0
- package/.cursorrules +52 -0
- package/.editorconfig +12 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +189 -0
- package/.playground/assets/style.css +15 -0
- package/.playground/components/content/MdcExample.vue +81 -0
- package/.playground/components/content/MdcReplay.vue +319 -0
- package/.playground/content/1.getting-started/1.introduction.md +8 -0
- package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
- package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
- package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
- package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
- package/.playground/content/1.getting-started/_dir.yml +3 -0
- package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
- package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
- package/.playground/content/2.content-elements/11.tables.md +25 -0
- package/.playground/content/2.content-elements/12.overview.md +93 -0
- package/.playground/content/2.content-elements/13.text-components.md +36 -0
- package/.playground/content/2.content-elements/2.headings.md +32 -0
- package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
- package/.playground/content/2.content-elements/4.lists.md +37 -0
- package/.playground/content/2.content-elements/5.links.md +17 -0
- package/.playground/content/2.content-elements/6.images.md +17 -0
- package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
- package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
- package/.playground/content/2.content-elements/9.inline-code.md +21 -0
- package/.playground/content/2.content-elements/_dir.yml +3 -0
- package/.playground/content/2.content-elements/index.md +8 -0
- package/.playground/content/3.components/1.index.md +187 -0
- package/.playground/content/3.components/2.docs/_dir.yml +3 -0
- package/.playground/content/3.components/2.docs/alert.md +152 -0
- package/.playground/content/3.components/2.docs/badge.md +131 -0
- package/.playground/content/3.components/2.docs/button-link.md +53 -0
- package/.playground/content/3.components/2.docs/callout.md +16 -0
- package/.playground/content/3.components/2.docs/code-group.md +77 -0
- package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
- package/.playground/content/3.components/2.docs/field-group.md +62 -0
- package/.playground/content/3.components/2.docs/field.md +39 -0
- package/.playground/content/3.components/2.docs/file-tree.md +144 -0
- package/.playground/content/3.components/2.docs/icon.md +94 -0
- package/.playground/content/3.components/2.docs/pm.md +67 -0
- package/.playground/content/3.components/2.docs/read-more.md +44 -0
- package/.playground/content/3.components/2.docs/shortcut.md +36 -0
- package/.playground/content/3.components/2.docs/stack.md +81 -0
- package/.playground/content/3.components/2.docs/steps.md +148 -0
- package/.playground/content/3.components/2.docs/tabs.md +375 -0
- package/.playground/content/3.components/3.page/_dir.yml +2 -0
- package/.playground/content/3.components/3.page/accordion.md +74 -0
- package/.playground/content/3.components/3.page/card-group.md +115 -0
- package/.playground/content/3.components/3.page/card.md +142 -0
- package/.playground/content/3.components/3.page/collapsible.md +61 -0
- package/.playground/content/3.components/3.page/hero-alt.md +118 -0
- package/.playground/content/3.components/3.page/hero.md +60 -0
- package/.playground/content/3.components/3.page/team-card.md +82 -0
- package/.playground/content/3.components/_dir.yml +2 -0
- package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
- package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
- package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
- package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
- package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
- package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
- package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
- package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
- package/.playground/content/4.development/2.advanced/1.override.md +49 -0
- package/.playground/content/4.development/2.advanced/2.math.md +89 -0
- package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
- package/.playground/content/4.development/3.themes.md +9 -0
- package/.playground/content/4.development/4.composables.md +38 -0
- package/.playground/content/4.development/5.installation.md +36 -0
- package/.playground/content/4.development/_dir.yml +3 -0
- package/.playground/content/_menu-footer.md +5 -0
- package/.playground/content/index.md +67 -0
- package/.playground/content/test-card.md +187 -0
- package/.playground/content/test.md +88 -0
- package/.playground/content/test2.md +12 -0
- package/.playground/content/test3.md +187 -0
- package/.playground/nuxt.config.ts +52 -0
- package/.playground/public/banner-preview.png +0 -0
- package/.playground/public/favicon.ico +0 -0
- package/.playground/public/front-matter-showcase/authors.png +0 -0
- package/.playground/public/front-matter-showcase/badges.png +0 -0
- package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
- package/.playground/public/hero.png +0 -0
- package/.playground/public/logo-dark.svg +12 -0
- package/.playground/public/logo.svg +12 -0
- package/.playground/public/og-nuxt-seo.png +0 -0
- package/.playground/public/og-nuxt.png +0 -0
- package/.playground/public/og-shadcn-docs-dark.png +0 -0
- package/.playground/public/og-shadcn-docs.png +0 -0
- package/.playground/public/sidebar-default.png +0 -0
- package/.playground/public/sidebar-group.png +0 -0
- package/.playground/public/sidebar-tree.png +0 -0
- package/.playground/uno.config.ts +16 -0
- package/README.md +93 -0
- package/app.vue +59 -0
- package/assets/css/a11y.css +48 -0
- package/assets/css/mdc-editor.css +91 -0
- package/components/A11yModeToggle.vue +23 -0
- package/components/DarkModeToggle.vue +26 -0
- package/components/LinkIcon.vue +32 -0
- package/components/OgImage/ShadcnDocs.vue +55 -0
- package/components/ThemeCustomizer.vue +156 -0
- package/components/ThemePopover.vue +27 -0
- package/components/content/Accordion.vue +18 -0
- package/components/content/AccordionItem.vue +32 -0
- package/components/content/Alert.vue +100 -0
- package/components/content/Badge.vue +52 -0
- package/components/content/ButtonLink.vue +38 -0
- package/components/content/Callout.vue +17 -0
- package/components/content/Card.vue +173 -0
- package/components/content/CardGroup.vue +38 -0
- package/components/content/CodeCopy.vue +52 -0
- package/components/content/CodeGroup._vue +27 -0
- package/components/content/CodeSnippet._vue +78 -0
- package/components/content/Collapsible.vue +80 -0
- package/components/content/Field.vue +53 -0
- package/components/content/FieldGroup.vue +5 -0
- package/components/content/FileTree.vue +110 -0
- package/components/content/FileTreeItem.vue +64 -0
- package/components/content/FileTreeRoot.vue +27 -0
- package/components/content/Hero.vue +154 -0
- package/components/content/HeroAlt.vue +116 -0
- package/components/content/Icon.vue +69 -0
- package/components/content/Kbd.vue +20 -0
- package/components/content/PmInstall.vue +35 -0
- package/components/content/PmRun.vue +31 -0
- package/components/content/PmX.vue +31 -0
- package/components/content/ProseA.vue +21 -0
- package/components/content/ProseBlockquote.vue +5 -0
- package/components/content/ProseCode.vue +121 -0
- package/components/content/ProseCodeInline.vue +24 -0
- package/components/content/ProseEm.vue +5 -0
- package/components/content/ProseH1.vue +27 -0
- package/components/content/ProseH2.vue +22 -0
- package/components/content/ProseH3.vue +21 -0
- package/components/content/ProseH4.vue +21 -0
- package/components/content/ProseH5.vue +21 -0
- package/components/content/ProseH6.vue +21 -0
- package/components/content/ProseHr.vue +3 -0
- package/components/content/ProseImg.vue +42 -0
- package/components/content/ProseLi.vue +5 -0
- package/components/content/ProseOl.vue +5 -0
- package/components/content/ProseP.vue +5 -0
- package/components/content/ProsePre.vue +56 -0
- package/components/content/ProseSection.vue +27 -0
- package/components/content/ProseStrong.vue +5 -0
- package/components/content/ProseTable.vue +7 -0
- package/components/content/ProseTbody.vue +5 -0
- package/components/content/ProseTd.vue +5 -0
- package/components/content/ProseTh.vue +5 -0
- package/components/content/ProseThead.vue +5 -0
- package/components/content/ProseTr.vue +5 -0
- package/components/content/ProseUl.vue +5 -0
- package/components/content/ReadMore.vue +41 -0
- package/components/content/Shortcut.vue +20 -0
- package/components/content/Stack.vue +17 -0
- package/components/content/Steps.vue +23 -0
- package/components/content/Tabs.vue +52 -0
- package/components/content/TabsInner.vue +263 -0
- package/components/content/TeamCard.vue +52 -0
- package/components/content/TeamCardGroup.vue +5 -0
- package/components/content/global/AlertEditor.vue +58 -0
- package/components/content/global/BadgeEditor.vue +56 -0
- package/components/content/global/BrEditor.vue +3 -0
- package/components/content/global/CardEditor.vue +142 -0
- package/components/content/global/CardGroupEditor.vue +50 -0
- package/components/content/global/CodeGroup.vue +13 -0
- package/components/content/global/CodeGroupEditor.vue +50 -0
- package/components/content/global/DivEditor.vue +22 -0
- package/components/content/global/FieldEditor.vue +38 -0
- package/components/content/global/FieldGroupEditor.vue +24 -0
- package/components/content/global/HeroEditor.vue +67 -0
- package/components/content/global/ProseSectionEditor.vue +180 -0
- package/components/content/global/ReadMoreEditor.vue +70 -0
- package/components/content/global/SectionEditor.vue +22 -0
- package/components/content/global/StackEditor.vue +35 -0
- package/components/content/global/StepsEditor.vue +55 -0
- package/components/content/global/Tabs._vue +97 -0
- package/components/content/global/TabsEditor.vue +38 -0
- package/components/layout/Aside.vue +83 -0
- package/components/layout/AsideTree.vue +25 -0
- package/components/layout/AsideTreeItem.vue +86 -0
- package/components/layout/AsideTreeItemButton.vue +32 -0
- package/components/layout/Banner.vue +77 -0
- package/components/layout/Breadcrumb.vue +34 -0
- package/components/layout/DocsFooter.vue +6 -0
- package/components/layout/EditLink.vue +23 -0
- package/components/layout/Footer.vue +80 -0
- package/components/layout/FooterItem.vue +50 -0
- package/components/layout/FooterSubmenuItem.vue +39 -0
- package/components/layout/Header/Logo.vue +30 -0
- package/components/layout/Header/MenuItem.vue +83 -0
- package/components/layout/Header/Nav.vue +112 -0
- package/components/layout/Header/NavMobile.vue +14 -0
- package/components/layout/Header/NavMobileItem.vue +79 -0
- package/components/layout/Header/SubmenuItem.vue +39 -0
- package/components/layout/Header.vue +160 -0
- package/components/layout/LangSwitcher.vue +90 -0
- package/components/layout/MobileNav.vue +44 -0
- package/components/layout/PrevNext.vue +24 -0
- package/components/layout/PrevNextButton.vue +50 -0
- package/components/layout/SearchButton.vue +46 -0
- package/components/layout/SearchDialog.vue +217 -0
- package/components/layout/Title.vue +98 -0
- package/components/layout/Toc.vue +99 -0
- package/components/layout/TocTree.vue +42 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +24 -0
- package/components/ui/accordion/AccordionItem.vue +24 -0
- package/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/alert/Alert.vue +19 -0
- package/components/ui/alert/AlertDescription.vue +14 -0
- package/components/ui/alert/AlertTitle.vue +14 -0
- package/components/ui/alert/index.ts +23 -0
- package/components/ui/avatar/Avatar.vue +25 -0
- package/components/ui/avatar/AvatarFallback.vue +11 -0
- package/components/ui/avatar/AvatarImage.vue +12 -0
- package/components/ui/avatar/index.ts +24 -0
- package/components/ui/badge/Badge.vue +17 -0
- package/components/ui/badge/index.ts +71 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/components/ui/breadcrumb/index.ts +6 -0
- package/components/ui/button/Button.vue +29 -0
- package/components/ui/button/index.ts +35 -0
- package/components/ui/card/Card.vue +21 -0
- package/components/ui/card/CardContent.vue +14 -0
- package/components/ui/card/CardDescription.vue +14 -0
- package/components/ui/card/CardFooter.vue +14 -0
- package/components/ui/card/CardHeader.vue +14 -0
- package/components/ui/card/CardTitle.vue +18 -0
- package/components/ui/card/index.ts +6 -0
- package/components/ui/collapsible/Collapsible.vue +18 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/command/Command.vue +89 -0
- package/components/ui/command/CommandEmpty.vue +30 -0
- package/components/ui/command/CommandGroup.vue +50 -0
- package/components/ui/command/CommandInput.vue +44 -0
- package/components/ui/command/CommandInputOnly.vue +50 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/index.ts +24 -0
- package/components/ui/dialog/Dialog.vue +14 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +52 -0
- package/components/ui/dialog/DialogDescription.vue +24 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +61 -0
- package/components/ui/dialog/DialogTitle.vue +29 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +27 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +27 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
- package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
- package/components/ui/navigation-menu/index.ts +14 -0
- package/components/ui/popover/Popover.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +11 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/scroll-area/ScrollArea.vue +32 -0
- package/components/ui/scroll-area/ScrollBar.vue +41 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/separator/Separator.vue +20 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +14 -0
- package/components/ui/sheet/SheetClose.vue +11 -0
- package/components/ui/sheet/SheetContent.vue +58 -0
- package/components/ui/sheet/SheetDescription.vue +22 -0
- package/components/ui/sheet/SheetFooter.vue +19 -0
- package/components/ui/sheet/SheetHeader.vue +16 -0
- package/components/ui/sheet/SheetTitle.vue +22 -0
- package/components/ui/sheet/SheetTrigger.vue +11 -0
- package/components/ui/sheet/index.ts +31 -0
- package/components/ui/slider/Slider.vue +36 -0
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +27 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +27 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toast/Toast.vue +28 -0
- package/components/ui/toast/ToastAction.vue +22 -0
- package/components/ui/toast/ToastClose.vue +27 -0
- package/components/ui/toast/ToastDescription.vue +22 -0
- package/components/ui/toast/ToastProvider.vue +11 -0
- package/components/ui/toast/ToastTitle.vue +22 -0
- package/components/ui/toast/ToastViewport.vue +20 -0
- package/components/ui/toast/Toaster.vue +34 -0
- package/components/ui/toast/index.ts +38 -0
- package/components/ui/toast/use-toast.ts +165 -0
- package/components.json +18 -0
- package/composables/useBreadcrumb.ts +47 -0
- package/composables/useCollapsedMap.ts +3 -0
- package/composables/useConfig.ts +227 -0
- package/composables/useEditLink.ts +27 -0
- package/composables/useI18nDocs.ts +114 -0
- package/composables/useMdcMenu.ts +204 -0
- package/composables/usePm.ts +58 -0
- package/composables/useScrollspy.ts +51 -0
- package/composables/useThemes.ts +46 -0
- package/composables/useToast.ts +1 -0
- package/content/index.md +45 -0
- package/eslint.config.js +3 -0
- package/i18n/i18n.config.ts +414 -0
- package/index.d.ts +610 -0
- package/layouts/blank.vue +5 -0
- package/layouts/default.vue +9 -0
- package/layouts/editorial.vue +83 -0
- package/lib/registry/themes.ts +636 -0
- package/lib/uno-preset.ts +143 -0
- package/memory-bank/activeContext.md +17 -0
- package/memory-bank/productContext.md +21 -0
- package/memory-bank/progress.md +16 -0
- package/memory-bank/projectbrief.md +20 -0
- package/memory-bank/systemPatterns.md +25 -0
- package/memory-bank/techContext.md +29 -0
- package/modules/inject-css.ts +40 -0
- package/nuxt.config.ts +124 -0
- package/package.json +71 -0
- package/pages/[...slug].vue +109 -0
- package/pages/admin/[...slug].vue +145 -0
- package/pages/index.vue +24 -0
- package/plugins/injectCssHmr.ts +26 -0
- package/plugins/wordup.ts +130 -0
- package/public/content-doc.json +792 -0
- package/public/iconesjs.svg +4 -0
- package/scripts/buildContentDoc-cli.ts +8 -0
- package/scripts/buildContentDoc.ts +165 -0
- package/tailwind.config.js +1 -0
- package/tsconfig.json +3 -0
- package/uno.config.mjs +58 -0
- package/utils/index.ts +12 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Test 3
|
|
3
|
+
layout: editorial
|
|
4
|
+
toc: false
|
|
5
|
+
aside: false
|
|
6
|
+
breadcrumb: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Basic
|
|
10
|
+
|
|
11
|
+
::card
|
|
12
|
+
test
|
|
13
|
+
::
|
|
14
|
+
|
|
15
|
+
## With title
|
|
16
|
+
|
|
17
|
+
::card
|
|
18
|
+
---
|
|
19
|
+
to: https://shadcn-vue.com
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### title
|
|
23
|
+
|
|
24
|
+
Card content
|
|
25
|
+
::
|
|
26
|
+
|
|
27
|
+
::card
|
|
28
|
+
---
|
|
29
|
+
to: https://shadcn-vue.com
|
|
30
|
+
---
|
|
31
|
+
#title
|
|
32
|
+
Card Title
|
|
33
|
+
|
|
34
|
+
#content
|
|
35
|
+
Card content
|
|
36
|
+
::
|
|
37
|
+
|
|
38
|
+
::card
|
|
39
|
+
---
|
|
40
|
+
icon: lucide:arrow-up-right
|
|
41
|
+
to: https://shadcn-vue.com
|
|
42
|
+
---
|
|
43
|
+
Card content
|
|
44
|
+
::
|
|
45
|
+
|
|
46
|
+
::card
|
|
47
|
+
---
|
|
48
|
+
to: https://shadcn-vue.com
|
|
49
|
+
---
|
|
50
|
+
#title
|
|
51
|
+
Card Title
|
|
52
|
+
::
|
|
53
|
+
|
|
54
|
+
## With image
|
|
55
|
+
|
|
56
|
+
::card
|
|
57
|
+
---
|
|
58
|
+
icon: lucide:arrow-up-right
|
|
59
|
+
media: /og-shadcn-docs-dark.png
|
|
60
|
+
to: https://shadcn-vue.com
|
|
61
|
+
---
|
|
62
|
+
Content
|
|
63
|
+
::
|
|
64
|
+
|
|
65
|
+
::card
|
|
66
|
+
---
|
|
67
|
+
media: /og-nuxt.png
|
|
68
|
+
to: https://shadcn-vue.com
|
|
69
|
+
---
|
|
70
|
+
#title
|
|
71
|
+
Card Title
|
|
72
|
+
|
|
73
|
+
#description
|
|
74
|
+
Description
|
|
75
|
+
|
|
76
|
+
#content
|
|
77
|
+
Beautifully designed **Nuxt Content** template with **shadcn-vue**.\
|
|
78
|
+
\_Customizable. Compatible. Open Source.\_
|
|
79
|
+
|
|
80
|
+
#footer
|
|
81
|
+
Footer
|
|
82
|
+
::
|
|
83
|
+
|
|
84
|
+
## Media position
|
|
85
|
+
|
|
86
|
+
:/\:card-group
|
|
87
|
+
|
|
88
|
+
::card
|
|
89
|
+
---
|
|
90
|
+
icon: lucide:sun
|
|
91
|
+
media: /og-shadcn-docs-dark.png
|
|
92
|
+
mediaPosition: right
|
|
93
|
+
to: https://shadcn-vue.com
|
|
94
|
+
---
|
|
95
|
+
#title
|
|
96
|
+
Card Title #test
|
|
97
|
+
|
|
98
|
+
#descriptionn
|
|
99
|
+
Description
|
|
100
|
+
|
|
101
|
+
#content
|
|
102
|
+
test #test lorem ipsum dolor sit **amet** !
|
|
103
|
+
Donec vitae orci sed dolor rutrum auctor. Vestibulum fringilla pede sit amet augue. In auctor lobortis lacus. Praesent vestibulum dapibus nibh.
|
|
104
|
+
::
|
|
105
|
+
|
|
106
|
+
::card
|
|
107
|
+
---
|
|
108
|
+
class: border-none shadow-none
|
|
109
|
+
icon: lucide:sun
|
|
110
|
+
media: /og-nuxt.png
|
|
111
|
+
mediaPosition: left
|
|
112
|
+
to: https://shadcn-vue.com
|
|
113
|
+
---
|
|
114
|
+
#title
|
|
115
|
+
Card Title #test uit auiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
116
|
+
|
|
117
|
+
#description
|
|
118
|
+
Description group-hover/card\:scale-105 transition-all group-hover/card\:scale-105 transition-all
|
|
119
|
+
|
|
120
|
+
#content
|
|
121
|
+
test #test uiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
122
|
+
uiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
123
|
+
uiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
124
|
+
uiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
125
|
+
uiesrt auienrst auie auieeee st auitest anursit ast auirset rst auind pnets a
|
|
126
|
+
::
|
|
127
|
+
|
|
128
|
+
::card
|
|
129
|
+
---
|
|
130
|
+
class: h-100
|
|
131
|
+
icon: lucide:sun
|
|
132
|
+
media: https://static.vecteezy.com/system/resources/thumbnails/002/073/237/small_2x/helix-pattern-on-a-white-background-free-vector.jpg
|
|
133
|
+
mediaPosition: cover
|
|
134
|
+
to: https://shadcn-vue.com
|
|
135
|
+
---
|
|
136
|
+
#tsest
|
|
137
|
+
|
|
138
|
+
#title
|
|
139
|
+
Card Title #test uit auiesrt auienrst auie auieeee
|
|
140
|
+
::
|
|
141
|
+
|
|
142
|
+
::card
|
|
143
|
+
---
|
|
144
|
+
class: h-50 bg-blue-200
|
|
145
|
+
icon: lucide:sun
|
|
146
|
+
iconPosition: right
|
|
147
|
+
mediaPosition: center
|
|
148
|
+
title: Title Etiam feugiat lorem non metus.
|
|
149
|
+
---
|
|
150
|
+
auieaui
|
|
151
|
+
::
|
|
152
|
+
|
|
153
|
+
::card
|
|
154
|
+
---
|
|
155
|
+
icon: lucide:sun
|
|
156
|
+
media: https://static.vecteezy.com/system/resources/thumbnails/002/073/237/small_2x/helix-pattern-on-a-white-background-free-vector.jpg
|
|
157
|
+
mediaPosition: centere
|
|
158
|
+
---
|
|
159
|
+
#tsest
|
|
160
|
+
|
|
161
|
+
#title
|
|
162
|
+
Card Title #test uit auiesrt auienrst auie auieeee
|
|
163
|
+
|
|
164
|
+
#media
|
|
165
|
+
:::hero
|
|
166
|
+
---
|
|
167
|
+
actions:
|
|
168
|
+
- name: Get Started
|
|
169
|
+
to: /getting-started
|
|
170
|
+
- name: GitHub
|
|
171
|
+
variant: outline
|
|
172
|
+
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt
|
|
173
|
+
leftIcon: lucide:github
|
|
174
|
+
announcement:
|
|
175
|
+
title: Release v1.0.0
|
|
176
|
+
icon: lucide:party-popper
|
|
177
|
+
to: /getting-started
|
|
178
|
+
---
|
|
179
|
+
#title
|
|
180
|
+
Effortless and Beautiful :br Docs Template.
|
|
181
|
+
|
|
182
|
+
#description
|
|
183
|
+
Beautifully designed Nuxt Content template with shadcn-vue. :br Customizable. Compatible. Open Source.
|
|
184
|
+
:::
|
|
185
|
+
::
|
|
186
|
+
|
|
187
|
+
\::
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
|
|
3
|
+
export default defineNuxtConfig({
|
|
4
|
+
extends: ['..'],
|
|
5
|
+
modules: [
|
|
6
|
+
'@nuxt/eslint',
|
|
7
|
+
'@unpress/nuxt-module',
|
|
8
|
+
// '../../../unpress/packages/nuxt-module/src/module',
|
|
9
|
+
],
|
|
10
|
+
|
|
11
|
+
css: [
|
|
12
|
+
'~/assets/style.css',
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
compatibilityDate: '2025-01-10',
|
|
16
|
+
|
|
17
|
+
// vite: {
|
|
18
|
+
// server: {
|
|
19
|
+
// fs: {
|
|
20
|
+
// allow: [
|
|
21
|
+
// // Always allow the project root
|
|
22
|
+
// fileURLToPath(new URL('.', import.meta.url)),
|
|
23
|
+
// // Allow the parent directory (for monorepos)
|
|
24
|
+
// fileURLToPath(new URL('../../..', import.meta.url)),
|
|
25
|
+
// // Add any other custom paths you need
|
|
26
|
+
// ],
|
|
27
|
+
// },
|
|
28
|
+
// },
|
|
29
|
+
// optimizeDeps: {
|
|
30
|
+
// include: ['extend', 'debug'],
|
|
31
|
+
// },
|
|
32
|
+
// },
|
|
33
|
+
|
|
34
|
+
eslint: {
|
|
35
|
+
config: {
|
|
36
|
+
// Use the generated ESLint config for lint root project as well
|
|
37
|
+
rootDir: fileURLToPath(new URL('..', import.meta.url)),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
i18n: {
|
|
42
|
+
defaultLocale: 'fr',
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
unocss: {
|
|
46
|
+
nuxtLayers: true,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
unpress: {
|
|
50
|
+
// autoMountIfDevMode: false,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_45_2)">
|
|
3
|
+
<path d="M240 175L175 240" stroke="white" stroke-width="24" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M227 104L104 227" stroke="white" stroke-width="24" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<rect x="10" y="10" width="280" height="280" rx="40" stroke="white" stroke-width="20"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_45_2">
|
|
9
|
+
<rect width="300" height="300" fill="white"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_36_19)">
|
|
3
|
+
<path d="M240 175L175 240" stroke="black" stroke-width="24" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M227 104L104 227" stroke="black" stroke-width="24" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<rect x="10" y="10" width="280" height="280" rx="40" stroke="black" stroke-width="20"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_36_19">
|
|
9
|
+
<rect width="300" height="300" fill="white"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { mergeConfigs } from '@unocss/core'
|
|
2
|
+
import config from './.nuxt/uno.config.mjs'
|
|
3
|
+
|
|
4
|
+
export default mergeConfigs([config, {
|
|
5
|
+
// your overrides
|
|
6
|
+
// presets: [
|
|
7
|
+
// presetShadcn({
|
|
8
|
+
// color: {
|
|
9
|
+
// base: 'green',
|
|
10
|
+
// // light: {
|
|
11
|
+
// // primary: '10 10% 100%',
|
|
12
|
+
// // },
|
|
13
|
+
// },
|
|
14
|
+
// }),
|
|
15
|
+
// ],
|
|
16
|
+
}])
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Nuxt Layer Starter
|
|
2
|
+
|
|
3
|
+
Fork of [shadcn-docs-nuxt](https://github.com/shadcn/shadcn-docs-nuxt) at v0.8.13
|
|
4
|
+
`git diff --name-status 54b80e2e96bbc7249170150fb72e20078629a170`
|
|
5
|
+
|
|
6
|
+
## Build your website using this layer
|
|
7
|
+
|
|
8
|
+
- Create a new Nuxt project
|
|
9
|
+
```bash
|
|
10
|
+
npx create-nuxt-app <project-name>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- Install the layer
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @unpress/nuxt-layer-shadcn-unocss
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Extend the layer in your nuxt.config.ts
|
|
19
|
+
```ts
|
|
20
|
+
defineNuxtConfig({
|
|
21
|
+
extends: '@unpress/nuxt-layer-shadcn-unocss'
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
Make sure to install the dependencies:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Working on your layer
|
|
34
|
+
|
|
35
|
+
Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
|
|
36
|
+
|
|
37
|
+
The `.playground` directory should help you on trying your layer during development.
|
|
38
|
+
|
|
39
|
+
Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself.
|
|
40
|
+
|
|
41
|
+
## Distributing your layer
|
|
42
|
+
|
|
43
|
+
Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
|
|
44
|
+
|
|
45
|
+
To do so, you only have to check if `files` in `package.json` are valid, then run:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm publish --access public
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Once done, your users will only have to run:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install --save your-layer
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then add the dependency to their `extends` in `nuxt.config`:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
defineNuxtConfig({
|
|
61
|
+
extends: 'your-layer'
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Development Server
|
|
66
|
+
|
|
67
|
+
Start the development server on http://localhost:3000
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm dev
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Production
|
|
74
|
+
|
|
75
|
+
Build the application for production:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pnpm build
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or statically generate it with:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pnpm generate
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Locally preview production build:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pnpm preview
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
package/app.vue
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLoadingIndicator
|
|
3
|
+
color="repeating-linear-gradient(to right, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.25) 100%)"
|
|
4
|
+
class="z-100"
|
|
5
|
+
/>
|
|
6
|
+
<NuxtRouteAnnouncer />
|
|
7
|
+
|
|
8
|
+
<ViewModeSwitcher class="!top-[calc(var(--header-height)+var(--banner-height)+0.75rem)] [&>div]:shadow-xl [&>div]:border [&_span]:w-0 [&_span]:ml--2 [&_span]:hover:ml-0 [&_span]:transition-all">
|
|
9
|
+
<template #footer>
|
|
10
|
+
<div class="border-t my-0.5 mx-1" />
|
|
11
|
+
<div class="pb-0.5">
|
|
12
|
+
<nuxt-link
|
|
13
|
+
to="/admin"
|
|
14
|
+
class="flex items-center gap-2 py-1 transition hover:opacity-100 px-2 opacity-50 hover:bg-blue-500/10"
|
|
15
|
+
:class="$route.path.startsWith('/admin') && 'text-primary opacity-100'"
|
|
16
|
+
>
|
|
17
|
+
<div class="i-lucide-book" />
|
|
18
|
+
<span class="of-hidden">
|
|
19
|
+
{{ 'Docs' }}
|
|
20
|
+
</span>
|
|
21
|
+
</nuxt-link>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
</ViewModeSwitcher>
|
|
25
|
+
|
|
26
|
+
<div class="app-default-layout grid grid-cols-1 min-h-dvh">
|
|
27
|
+
<LayoutHeader />
|
|
28
|
+
|
|
29
|
+
<NuxtPage />
|
|
30
|
+
|
|
31
|
+
<UiToaster />
|
|
32
|
+
<LayoutFooter />
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
const config = useConfig()
|
|
38
|
+
const { themeClass, radius } = useThemes()
|
|
39
|
+
|
|
40
|
+
useSeoMeta({
|
|
41
|
+
description: config.value.site.description,
|
|
42
|
+
ogDescription: config.value.site.description,
|
|
43
|
+
ogImage: config.value.site.ogImage,
|
|
44
|
+
twitterCard: 'summary_large_image',
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
useHead({
|
|
48
|
+
bodyAttrs: {
|
|
49
|
+
class: themeClass.value,
|
|
50
|
+
style: `--radius: ${radius.value}rem;--header-height: ${config.value.header.height};--banner-height: 0px;`,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped>
|
|
56
|
+
.app-default-layout {
|
|
57
|
+
grid-template-rows: auto 1fr auto;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
body.is-a11y {
|
|
2
|
+
--foreground: 0 0% 0% !important;
|
|
3
|
+
--muted-foreground: 240 3.8% 16.1% !important;
|
|
4
|
+
/* --background: 0 0% 100% !important;
|
|
5
|
+
--card: 0 0% 100% !important;
|
|
6
|
+
--card-foreground: 240 10% 3.9% !important;
|
|
7
|
+
--popover: 0 0% 100% !important;
|
|
8
|
+
--popover-foreground: 240 10% 3.9% !important;
|
|
9
|
+
--primary: 240 5.9% 10% !important;
|
|
10
|
+
--primary-foreground: 0 0% 98% !important;
|
|
11
|
+
--secondary: 240 4.8% 95.9% !important;
|
|
12
|
+
--secondary-foreground: 240 5.9% 10% !important;
|
|
13
|
+
--muted: 240 4.8% 95.9% !important;
|
|
14
|
+
--accent: 240 4.8% 95.9% !important;
|
|
15
|
+
--accent-foreground: 240 5.9% 10% !important;
|
|
16
|
+
--destructive: 0 84.2% 60.2% !important;
|
|
17
|
+
--destructive-foreground: 0 0% 98% !important; */
|
|
18
|
+
--border: 240 5.9% 70% !important;
|
|
19
|
+
--input: 240 5.9% 30% !important;
|
|
20
|
+
/* --ring: 240 5.9% 10% !important;
|
|
21
|
+
--radius: 0.5rem !important; */
|
|
22
|
+
|
|
23
|
+
[class^="a11y"], [class*=" a11y"] {
|
|
24
|
+
color: var(--foreground) !important;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dark body.is-a11y {
|
|
29
|
+
--background: 240 10% 3.9% !important;
|
|
30
|
+
--foreground: 0 0% 100% !important;
|
|
31
|
+
--muted-foreground: 240 5% 84.9% !important;
|
|
32
|
+
/*--card: 240 10% 3.9% !important;
|
|
33
|
+
--card-foreground: 0 0% 98% !important;
|
|
34
|
+
--popover: 240 10% 3.9% !important;
|
|
35
|
+
--popover-foreground: 0 0% 98% !important;
|
|
36
|
+
--primary: 0 0% 98% !important;
|
|
37
|
+
--primary-foreground: 240 5.9% 10% !important;
|
|
38
|
+
--secondary: 240 3.7% 15.9% !important;
|
|
39
|
+
--secondary-foreground: 0 0% 98% !important;
|
|
40
|
+
--muted: 240 3.7% 15.9% !important;
|
|
41
|
+
--accent: 240 3.7% 15.9% !important;
|
|
42
|
+
--accent-foreground: 0 0% 98% !important;
|
|
43
|
+
--destructive: 0 62.8% 30.6% !important;
|
|
44
|
+
--destructive-foreground: 0 0% 98% !important; */
|
|
45
|
+
--border: 240 3.7% 30.9% !important;
|
|
46
|
+
--input: 240 3.7% 60.9% !important;
|
|
47
|
+
/* --ring: 240 4.9% 83.9% !important; */
|
|
48
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.EDITOR_CONTENT {
|
|
2
|
+
--mdc-editor-border-color: 220 13% 86%;
|
|
3
|
+
--mdc-editor-border-style: dashed;
|
|
4
|
+
--mdc-editor-border-width: 2px;
|
|
5
|
+
overflow: visible !important;
|
|
6
|
+
|
|
7
|
+
&:focus-visible {
|
|
8
|
+
outline: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
& > p:not(:has(span)):not(:first-child) {
|
|
12
|
+
margin-top: 1.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& h2.prose-h2:first-child {
|
|
16
|
+
margin-top: 2.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& h3.prose-h3:first-child {
|
|
20
|
+
margin-top: 2rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& h4.prose-h4:first-child {
|
|
24
|
+
margin-top: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& h5.prose-h5:first-child {
|
|
28
|
+
margin-top: 1.5rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
& h6.prose-h6:first-child {
|
|
32
|
+
margin-top: 1.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& code {
|
|
36
|
+
font-size: 0.875rem;
|
|
37
|
+
line-height: 1.25rem;
|
|
38
|
+
position: relative;
|
|
39
|
+
border-radius: 0.25rem;
|
|
40
|
+
padding: 0.2rem 0.3rem;
|
|
41
|
+
|
|
42
|
+
font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
|
|
43
|
+
|
|
44
|
+
--un-bg-opacity: 1;
|
|
45
|
+
background-color: hsl(var(--muted) / var(--un-bg-opacity)) /* hsl(var(--muted)) */;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& > div {
|
|
49
|
+
&:has(.LANGUAGE_WRAPPER) {
|
|
50
|
+
margin-top: 1.5rem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& p a {
|
|
55
|
+
text-underline-offset: 4px;
|
|
56
|
+
text-decoration-line: underline;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
& .prosemirror-flat-list {
|
|
61
|
+
padding-top: 0.5rem;
|
|
62
|
+
margin-left: 1.5rem;
|
|
63
|
+
|
|
64
|
+
&:first-child,
|
|
65
|
+
:not(&) + & {
|
|
66
|
+
padding-top: 1.5rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* CodeGroupEditor */
|
|
71
|
+
& .\[\&\:not\(\:first-child\)\]\:mt-5 {
|
|
72
|
+
margin-top: 1.25rem;
|
|
73
|
+
}
|
|
74
|
+
& div[data-node-view-root="true"]:first-child > div > .\[\&\:not\(\:first-child\)\]\:mt-5 {
|
|
75
|
+
margin-top: 0rem;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.animate-scroll-fade-in-up {
|
|
80
|
+
animation: fade-in-up linear;
|
|
81
|
+
animation-timeline: view();
|
|
82
|
+
animation-range: 0 25dvh;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.docs-content:not(.EDITOR_CONTENT) > * {
|
|
86
|
+
--una-enter-translate-y: 5dvh;
|
|
87
|
+
--una-enter-opacity: 0.5;
|
|
88
|
+
animation: una-in linear;
|
|
89
|
+
animation-timeline: view();
|
|
90
|
+
animation-range: 0 25dvh;
|
|
91
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const isA11yMode = ref(false)
|
|
3
|
+
|
|
4
|
+
function toggleA11yMode() {
|
|
5
|
+
document.body.classList.toggle('is-a11y')
|
|
6
|
+
isA11yMode.value = !isA11yMode.value
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<UiButton
|
|
12
|
+
variant="ghost"
|
|
13
|
+
size="icon"
|
|
14
|
+
:class="{ 'border-2 border-primary': isA11yMode }"
|
|
15
|
+
@click="toggleA11yMode()"
|
|
16
|
+
>
|
|
17
|
+
<NuxtIcon
|
|
18
|
+
name="lucide:glasses"
|
|
19
|
+
size="16"
|
|
20
|
+
/>
|
|
21
|
+
<span class="sr-only">Toggle accessibility</span>
|
|
22
|
+
</UiButton>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiButton
|
|
3
|
+
variant="ghost"
|
|
4
|
+
size="icon"
|
|
5
|
+
@click="toggleDark"
|
|
6
|
+
>
|
|
7
|
+
<NuxtIcon
|
|
8
|
+
name="lucide:sun"
|
|
9
|
+
class="rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
|
|
10
|
+
size="18"
|
|
11
|
+
/>
|
|
12
|
+
<NuxtIcon
|
|
13
|
+
name="lucide:moon"
|
|
14
|
+
class="absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
|
|
15
|
+
size="18"
|
|
16
|
+
/>
|
|
17
|
+
<span class="sr-only">Toggle dark mode</span>
|
|
18
|
+
</UiButton>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const colorMode = useColorMode()
|
|
23
|
+
function toggleDark() {
|
|
24
|
+
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="to"
|
|
4
|
+
|
|
5
|
+
class="absolute right-3 top-3 flex z-1 p-1 transition bg-background/50 rounded"
|
|
6
|
+
:class="{
|
|
7
|
+
'group-hover/card:translate-x-1 group-hover/card:translate-y--1': _external,
|
|
8
|
+
'group-hover/card:translate-x-1': !_external,
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<NuxtIcon
|
|
12
|
+
:name="_external ? 'lucide:arrow-up-right' : 'lucide:arrow-right'"
|
|
13
|
+
:size="size"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup lang="ts">
|
|
19
|
+
const {
|
|
20
|
+
to,
|
|
21
|
+
target,
|
|
22
|
+
external = undefined,
|
|
23
|
+
size = 20,
|
|
24
|
+
} = defineProps<{
|
|
25
|
+
to?: string
|
|
26
|
+
target?: Target
|
|
27
|
+
external?: boolean
|
|
28
|
+
size?: number
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const _external = computed(() => external ?? (target === '_blank' || to?.startsWith('http')))
|
|
32
|
+
</script>
|