Skip to content

Commit

Permalink
Some CSS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dearroy committed Jun 29, 2024
1 parent 5eee379 commit 1ba72f4
Show file tree
Hide file tree
Showing 56 changed files with 11,091 additions and 1,351 deletions.
72 changes: 27 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,41 @@
![Hero](https://github.com/ZTL-UwU/shadcn-docs-nuxt/assets/49156174/b317288d-092d-4656-af5e-54034351daca)
# HeyForm Help Center

# shadcn-docs-nuxt
## Setup

[![built with nuxt][nuxt-src]][nuxt-href]
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
Make sure to install the dependencies:

Beautifully designed _Nuxt Content_ template built with _shadcn-vue_. **Customizable. Compatible. Open Source.**
```bash
# yarn
yarn install

- [Documentation / Demo](https://shadcn-docs.nuxt.dev/)
# npm
npm install

## Quick Start
# pnpm
pnpm install

1. Create a project with the [starter template](https://github.com/ZTL-UwU/shadcn-docs-nuxt-starter)
# bun
bun install
```

```bash
npx nuxi@latest init -t github:ZTL-UwU/shadcn-docs-nuxt-starter
```
## Development Server

2. Install dependencies
Start the development server on http://localhost:3000

```bash
npm install
```
```bash
npm run dev
```

3. Start dev server
## Production

```bash
npm run dev
```
Build the application for production:

## Contributing
```bash
npm run build
```

1. Clone this repository
2. Install dependencies `bun install`.
3. Use `bun run dev` to start dev server.
Locally preview production build:

## Credits

- [Nuxt Content](https://content.nuxt.com/): Content made easy for Vue Developers.
- [shadcn-ui](https://ui.shadcn.com/): For the beautiful component & docs design.
- [shadcn-vue](https://www.shadcn-vue.com/): For the vue port of shadcn-ui & some docs component source.
- [Docus](https://docus.dev/): For the inspiration & some docs component source.
- [Nuxt UI Pro Docs](https://docs-template.nuxt.dev/): For the inspiration.

## License

MIT

[npm-version-src]: https://img.shields.io/npm/v/shadcn-docs-nuxt?style=flat&colorA=18181b&colorB=18181b
[npm-version-href]: https://npmjs.com/package/shadcn-docs-nuxt
[npm-downloads-src]: https://img.shields.io/npm/dm/shadcn-docs-nuxt?style=flat&colorA=18181b&colorB=18181b
[npm-downloads-href]: https://npmjs.com/package/shadcn-docs-nuxt
[license-src]: https://img.shields.io/github/license/ZTL-UwU/shadcn-docs-nuxt.svg?style=flat&colorA=18181b&colorB=18181b
[license-href]: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/LICENSE
[nuxt-src]: https://img.shields.io/badge/Built%20With%20Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com/
```bash
npm run preview
```
129 changes: 19 additions & 110 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,66 +1,26 @@
export default defineAppConfig({
shadcnDocs: {
site: {
name: 'shadcn-docs',
description: 'Beautifully designed Nuxt Content template built with shadcn-vue. Customizable. Compatible. Open Source.',
ogImage: '/hero.png',
name: 'HeyForm Help Center',
description: 'Get the most out of HeyForm with our detailed help center guides and practices.',
},
theme: {
customizable: true,
color: 'zinc',
customizable: false,
color: 'Blue',
radius: 0.5,
},
header: {
title: 'shadcn-docs',
title: 'HeyForm Help Center',
showTitle: true,
darkModeToggle: true,
logo: {
light: '/logo.svg',
dark: '/logo-dark.svg',
},
darkModeToggle: true,
nav: [{
title: 'Docs',
links: [{
title: 'Getting Started',
to: '/getting-started',
description: 'Start building your document with shadcn-docs-nuxt',
}, {
title: 'API',
to: '/api',
description: 'Discover the configurations and exposed APIs.',
target: '_self',
}],
}, {
title: 'Credits',
links: [{
title: 'shadcn-ui',
to: 'https://ui.shadcn.com/',
description: 'For the beautiful component design & docs design',
target: '_blank',
}, {
title: 'shadcn-vue',
to: 'https://www.shadcn-vue.com/',
description: 'For the vue port of shadcn-ui & some docs component source',
target: '_blank',
}, {
title: 'Docus',
to: 'https://docus.dev/',
description: 'For inspiration & some docs component source',
target: '_blank',
}, {
title: 'Nuxt Content',
to: 'https://content.nuxt.com/',
description: 'Content made easy for Vue Developers',
target: '_blank',
}],
}, {
title: 'Use This Template',
to: '/getting-started/installation',
target: '_self',
}],
nav: [],
links: [{
icon: 'lucide:github',
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
to: 'https://github.com/heyform/docs',
target: '_blank',
}],
},
Expand All @@ -71,84 +31,33 @@ export default defineAppConfig({
main: {
breadCrumb: true,
showTitle: true,
codeCopyToast: true,
codeIcon: {
'package.json': 'vscode-icons:file-type-node',
'tsconfig.json': 'vscode-icons:file-type-tsconfig',
'.npmrc': 'vscode-icons:file-type-npm',
'.editorconfig': 'vscode-icons:file-type-editorconfig',
'.eslintrc': 'vscode-icons:file-type-eslint',
'.eslintrc.cjs': 'vscode-icons:file-type-eslint',
'.eslintignore': 'vscode-icons:file-type-eslint',
'eslint.config.js': 'vscode-icons:file-type-eslint',
'eslint.config.mjs': 'vscode-icons:file-type-eslint',
'eslint.config.cjs': 'vscode-icons:file-type-eslint',
'.gitignore': 'vscode-icons:file-type-git',
'yarn.lock': 'vscode-icons:file-type-yarn',
'.env': 'vscode-icons:file-type-dotenv',
'.env.example': 'vscode-icons:file-type-dotenv',
'.vscode/settings.json': 'vscode-icons:file-type-vscode',
'nuxt': 'vscode-icons:file-type-nuxt',
'.nuxtrc': 'vscode-icons:file-type-nuxt',
'.nuxtignore': 'vscode-icons:file-type-nuxt',
'nuxt.config.js': 'vscode-icons:file-type-nuxt',
'nuxt.config.ts': 'vscode-icons:file-type-nuxt',
'nuxt.schema.ts': 'vscode-icons:file-type-nuxt',
'tailwind.config.js': 'vscode-icons:file-type-tailwind',
'tailwind.config.ts': 'vscode-icons:file-type-tailwind',
'vue': 'vscode-icons:file-type-vue',
'ts': 'vscode-icons:file-type-typescript',
'tsx': 'vscode-icons:file-type-typescript',
'mjs': 'vscode-icons:file-type-js',
'cjs': 'vscode-icons:file-type-js',
'js': 'vscode-icons:file-type-js',
'jsx': 'vscode-icons:file-type-js',
'md': 'vscode-icons:file-type-markdown',
'mdc': 'vscode-icons:file-type-markdown',
'py': 'vscode-icons:file-type-python',
'npm': 'vscode-icons:file-type-npm',
'pnpm': 'vscode-icons:file-type-pnpm',
'npx': 'vscode-icons:file-type-npm',
'yarn': 'vscode-icons:file-type-yarn',
'bun': 'vscode-icons:file-type-bun',
'yml': 'vscode-icons:file-type-yaml',
'json': 'vscode-icons:file-type-json',
'terminal': 'lucide:terminal',
},
},
footer: {
credits: 'Copyright © 2024',
links: [
{
title: 'shadcn-vue',
to: 'https://www.shadcn-vue.com/',
target: '_blank',
},
{
icon: 'lucide:github',
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
target: '_blank',
},
],
credits: 'Copyright HeyForm © 2024',
links: [{
icon: 'lucide:github',
to: 'https://github.com/heyform/docs',
target: '_blank',
}],
},
toc: {
enable: true,
title: 'On This Page',
links: [{
title: 'Star on GitHub',
icon: 'lucide:star',
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
to: 'https://github.com/heyform/heyform',
target: '_blank',
}, {
title: 'Create Issues',
icon: 'lucide:circle-dot',
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt/issues',
to: 'https://github.com/heyform/heyform/issues',
target: '_blank',
}],
},
search: {
enable: true,
inAside: false,
},
},
});
}
}
});
6 changes: 5 additions & 1 deletion assets/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ html.dark {
--input: 214.3 31.8% 91.4%;

--primary: 221.2 83.2% 53.3%;
--primary-foreground: 210 40% 98%;
--primary-foreground: 0 0% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
Expand Down Expand Up @@ -773,3 +773,7 @@ html.dark {

--ring: 263.4 70% 50.4%;
}

img {
@apply rounded-lg shadow-md;
}
5 changes: 2 additions & 3 deletions components/content/Card.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="[&:not(:first-child)]:mt-5 group-has-[div]:mt-0">
<div class="[&:not(:first-child)]:mt-5 group-has-[div]:mt-4">
<NuxtLink :to="to" :target="target">
<UiCard class="transition-all relative" :class="[to && 'hover:bg-muted']">
<UiCardHeader v-if="icon || title || $slots.title || description || $slots.description">
<Icon v-if="icon" class="mb-2" :name="icon" size="24" />
<Icon v-if="icon" class="my-4" :name="icon" size="32" />
<UiCardTitle v-if="title || $slots.title">
<ContentSlot :use="$slots.title" unwrap="p" />
{{ title }}
Expand All @@ -21,7 +21,6 @@
<ContentSlot :use="$slots.footer" unwrap="p" />
{{ footer }}
</UiCardFooter>
<Icon v-if="to" name="lucide:arrow-up-right" class="absolute right-4 top-4" />
</UiCard>
</NuxtLink>
</div>
Expand Down
6 changes: 3 additions & 3 deletions components/content/ProseCodeInline.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<code class="relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono inline-code">
<slot />
</code>
<code class="relative rounded-sm bg-muted px-1.5 py-1 font-mono inline-code">
<slot />
</code>
</template>

<style scoped>
Expand Down
8 changes: 3 additions & 5 deletions components/content/ProseH2.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<h2 :id="id" class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors [&:not(:first-child)]:mt-10">
<NuxtLink
v-if="id && generate"
:href="`#${id}`"
>
<h2 :id="id"
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors [&:not(:first-child)]:mt-16">
<NuxtLink v-if="id && generate" :href="`#${id}`">
<slot />
</NuxtLink>
<slot v-else />
Expand Down
34 changes: 7 additions & 27 deletions components/layout/AsideTreeItem.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,21 @@
<template>
<li
class="rounded-md transition-all underline-offset-4 [&:not(:first-child)]:pt-3"
:class="[level > 0 && 'pl-4']"
>
<li class="rounded-md transition-all underline-offset-4 [&:not(:first-child)]:pt-3" :class="[level > 0 && 'pl-4']">
<UiCollapsible v-if="link.children" v-model:open="isOpen">
<UiCollapsibleTrigger class="w-full text-left">
<div class="w-full flex gap-1">
<Icon
v-if="link.icon"
:name="link.icon"
class="self-center mr-1"
size="15"
/>
<Icon v-if="link.icon" :name="link.icon" class="self-center mr-1" size="15" />
{{ link.title }}
<Icon
:name="isOpen ? 'lucide:chevrons-down-up' : 'lucide:chevrons-up-down'"
size="12"
class="ml-auto self-center"
/>
<Icon :name="isOpen ? 'lucide:chevrons-down-up' : 'lucide:chevrons-up-down'" size="12"
class="ml-auto self-center" />
</div>
</UiCollapsibleTrigger>
<UiCollapsibleContent>
<LayoutAsideTree :links="link.children" :level="level + 1" />
</UiCollapsibleContent>
</UiCollapsible>
<NuxtLink
v-else
:to="link._path"
class="w-full flex hover:underline text-muted-foreground gap-1"
:class="[isActive && 'font-medium text-primary']"
>
<Icon
v-if="link.icon"
:name="link.icon"
class="self-center mr-1"
size="15"
/>
<NuxtLink v-else :to="link._path" class="w-full flex hover:underline text-muted-foreground gap-1"
:class="[isActive && 'font-medium text-primary']">
<Icon v-if="link.icon" :name="link.icon" class="self-center mr-1" size="15" />
{{ link.title }}
</NuxtLink>
</li>
Expand Down
11 changes: 2 additions & 9 deletions components/layout/PrevNextButton.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
<template>
<NuxtLink
v-if="prevNext && prevNext._path"
:to="prevNext._path"
class="basis-1/3"
>
<NuxtLink v-if="prevNext && prevNext._path" :to="prevNext._path" class="basis-1/3">
<div class="border p-4 rounded-lg hover:bg-muted/50 transition-all space-y-2 mb-4">
<div class="flex flex-row gap-3">
<div v-if="side === 'left'" class="flex h-6 w-6 min-w-6">
<Icon name="lucide:arrow-left" size="20" class="self-center mx-auto" />
</div>
<span class="self-center space-y-2">
<div class="text-lg font-semibold">
<div class="font-semibold">
{{ prevNext.title }}
</div>
<div v-if="prevNext.description" class="text-sm text-muted-foreground">
{{ prevNext.description }}
</div>
</span>
<div v-if="side === 'right'" class="flex h-6 w-6 min-w-6 ml-auto">
<Icon name="lucide:arrow-right" size="20" class="self-center mx-auto" />
Expand Down
Loading

0 comments on commit 1ba72f4

Please sign in to comment.