From b0e825cb5759585b0628bec6b9909bff96afa2b3 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Tue, 16 Jan 2024 16:22:09 +0100 Subject: [PATCH] Site improvements and update site dependencies (#1805) * try to speed up build times * Update deps * Update site deps and fix search issue * Small improvements * fix imports * Remove unused var --- CONTRIBUTING.md | 6 +- docs/.vitepress/sidebar.ts | 8 - .../theme/components/base/Badge.vue | 6 +- .../theme/components/base/ButtonMenu.vue | 12 +- .../theme/components/base/CodeGroup.vue | 2 +- .../theme/components/base/FakeInput.vue | 2 +- .../components/icons/CategoryListItem.vue | 1 - .../theme/components/icons/CopyCodeButton.vue | 2 +- .../components/icons/IconDetailOverlay.vue | 2 +- .../theme/components/icons/IconGrid.vue | 7 +- .../theme/components/icons/IconItem.vue | 6 +- .../icons/IconsCategoryOverview.vue | 1 - .../theme/composables/useSearchInput.ts | 13 +- docs/guide/packages/lucide-react.md | 3 +- docs/license.md | 1 + docs/nitro.config.ts | 2 +- docs/package.json | 27 +- pnpm-lock.yaml | 640 ++++++++++++------ 18 files changed, 468 insertions(+), 273 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3732e39a..90d5a685d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,8 +72,8 @@ pnpm install # Install dependencies, including the workspace packages To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/enhttps://lucide.dev/docs/workspaces). -The configured directory for workspaces is the [packages](./packages) directory, located in the root directory. There you will find all the current packages from lucide. -There are more workspaces defined, see [`pnpm-workspace.yaml`](./pnpm-workspace.yaml). +The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide. +There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml). > Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing. @@ -153,7 +153,7 @@ lucide ### Docs -The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory. +The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory. ### Guides diff --git a/docs/.vitepress/sidebar.ts b/docs/.vitepress/sidebar.ts index d7eec57a5..762427aa9 100644 --- a/docs/.vitepress/sidebar.ts +++ b/docs/.vitepress/sidebar.ts @@ -74,10 +74,6 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { }, { text: 'Lucide Vue', - link: '/guide/packages/lucide-vue' - }, - { - text: 'Lucide Vue Next (Vue 3)', link: '/guide/packages/lucide-vue-next' }, { @@ -100,10 +96,6 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { text: 'Lucide Static', link: '/guide/packages/lucide-static' }, - { - text: 'Lucide Flutter', - link: '/guide/packages/lucide-flutter' - }, ] }, { diff --git a/docs/.vitepress/theme/components/base/Badge.vue b/docs/.vitepress/theme/components/base/Badge.vue index 2bf52174e..aabe58c56 100644 --- a/docs/.vitepress/theme/components/base/Badge.vue +++ b/docs/.vitepress/theme/components/base/Badge.vue @@ -9,8 +9,6 @@ const props = defineProps<{ }>() const component = computed(() => props.href ? 'a' : 'div') - - diff --git a/docs/.vitepress/theme/components/base/ButtonMenu.vue b/docs/.vitepress/theme/components/base/ButtonMenu.vue index 506195d6c..6580c8fdb 100644 --- a/docs/.vitepress/theme/components/base/ButtonMenu.vue +++ b/docs/.vitepress/theme/components/base/ButtonMenu.vue @@ -94,8 +94,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) .menu { position: relative; } -.menu-items { - --menu-offset: 44px; +ul.menu-items { position: absolute; display: flex; flex-direction: column; @@ -103,7 +102,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) padding: 12px; min-width: 128px; border: 1px solid var(--vp-c-divider); - background-color: var(--vp-c-bg); + background-color: var(--vp-c-bg-elv); box-shadow: var(--vp-shadow-3); transition: background-color 0.5s; max-height: calc(100vh - var(--vp-nav-height)); @@ -124,11 +123,12 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) color: var(--vp-c-text-1); white-space: nowrap; transition: background-color .25s,color .25s; + list-style: none; } .menu-item:hover { color: var(--vp-c-brand); - background-color: var(--vp-c-bg-elv-mute); + background-color: var(--vp-c-default-soft); } .menu-item:active { @@ -170,11 +170,11 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) } .menu-items.bottom { - top: var(--menu-offset); + top: 32px; } .menu-items.top { - bottom: var(--menu-offset); + bottom: 48px; } .arrow-up-button.top::before { diff --git a/docs/.vitepress/theme/components/base/CodeGroup.vue b/docs/.vitepress/theme/components/base/CodeGroup.vue index d5b6d62b6..498b27053 100644 --- a/docs/.vitepress/theme/components/base/CodeGroup.vue +++ b/docs/.vitepress/theme/components/base/CodeGroup.vue @@ -1,5 +1,5 @@