Skip to content

Commit

Permalink
docs: add CommandMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Nov 1, 2024
1 parent 60874c2 commit 781ee12
Show file tree
Hide file tree
Showing 7 changed files with 353 additions and 18 deletions.
40 changes: 23 additions & 17 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,29 @@ const __dirname = path.dirname(__filename)
export default defineConfig({
site: siteConfig.url,
trailingSlash: 'never',
integrations: [mdx(), angular(), tailwind({
applyBaseStyles: false,
}), sitemap({
serialize(item) {
if (item.url === siteConfig.url) {
item.changefreq = 'daily'
item.lastmod = new Date()
item.priority = 1
}
else {
item.changefreq = 'daily'
item.lastmod = new Date()
item.priority = 0.9
}
return item
},
}), alpinejs()],
integrations: [
mdx(),
angular(),
tailwind({
applyBaseStyles: false,
}),
sitemap({
serialize(item) {
if (item.url === siteConfig.url) {
item.changefreq = 'daily'
item.lastmod = new Date()
item.priority = 1
}
else {
item.changefreq = 'daily'
item.lastmod = new Date()
item.priority = 0.9
}
return item
},
}),
alpinejs({ entrypoint: '/src/entrypoints/alpine' }),
],
markdown: {
syntaxHighlight: false,
remarkPlugins: [codeImport],
Expand Down
2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@alpinejs/focus": "^3.14.3",
"@analogjs/astro-angular": "^1.9.0",
"@angular/animations": "^18.2.9",
"@angular/cdk": "^18.2.10",
Expand Down Expand Up @@ -57,6 +58,7 @@
"@angular/platform-browser-dynamic": "^18.2.9",
"@angular/platform-server": "^18.2.9",
"@shikijs/transformers": "^1.20.0",
"@types/alpinejs__focus": "^3.13.4",
"@types/lodash.template": "^4.5.3",
"lodash.template": "^4.5.0",
"mdast-util-toc": "^7.1.0",
Expand Down
287 changes: 287 additions & 0 deletions docs/src/components/CommandMenu.astro

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { buttonVariants } from '@/registry/new-york/ui/button'
import Navbar from './Navbar.astro'
import MobileNavbar from './MobileNavbar.astro'
import CommandMenu from './CommandMenu.astro'
const { pathname } = Astro.url
---
Expand All @@ -16,7 +17,7 @@ const { pathname } = Astro.url
<MobileNavbar pathname={pathname} />
<div class="flex flex-1 items-center justify-end space-x-2">
<div class="w-full flex-1 md:w-auto md:flex-none">
<!-- <CommandMenu /> -->
<CommandMenu />
</div>
<div class="flex items-center">
<a
Expand Down
Empty file.
6 changes: 6 additions & 0 deletions docs/src/entrypoints/alpine.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import focus from '@alpinejs/focus'
import type { Alpine } from 'alpinejs'

export default (Alpine: Alpine): void => {
Alpine.plugin(focus)
}
33 changes: 33 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 781ee12

Please sign in to comment.