Skip to content

Commit

Permalink
chore: update navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 9, 2025
1 parent 56333c9 commit 48aabff
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/.vuepress/composables/useNavbarRepo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { NavbarItem } from '@vuepress/theme-default/client'
import { useNavbarRepo as _useNavbarRepo } from '@vuepress/theme-default/client'
import { computed, type ComputedRef } from 'vue'

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarRepo.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers

export const useNavbarRepo = (): ComputedRef<NavbarItem[]> => {
const navbarRepo = _useNavbarRepo()

return computed(() => [
{
...navbarRepo.value[0],
icon: 'github',
},
])
}
16 changes: 16 additions & 0 deletions docs/.vuepress/composables/useNavbarSelectLanguage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {
useNavbarSelectLanguage as _useNavbarSelectLanguage,
type NavbarItem,

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'NavbarItem' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'NavbarItem' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'NavbarItem' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'NavbarItem' of the import declaration should be sorted alphabetically

Check failure on line 3 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers
} from '@vuepress/theme-default/client'
import { computed, type ComputedRef } from 'vue'

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / build-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Member 'ComputedRef' of the import declaration should be sorted alphabetically

Check failure on line 5 in docs/.vuepress/composables/useNavbarSelectLanguage.ts

View workflow job for this annotation

GitHub Actions / bundle-check

Prefer using a top-level type-only import instead of inline type specifiers

export const useNavbarSelectLanguage = (): ComputedRef<NavbarItem[]> => {
const navbarSelectLanguage = _useNavbarSelectLanguage()

return computed(() => [
{
...navbarSelectLanguage.value[0],
icon: 'languages',
},
])
}
8 changes: 8 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ export default defineUserConfig({
__dirname,
'./components/VPSidebarItem.vue',
),
'@theme/useNavbarRepo': path.resolve(
__dirname,
'./composables/useNavbarRepo.ts',
),
'@theme/useNavbarSelectLanguage': path.resolve(
__dirname,
'./composables/useNavbarSelectLanguage.ts',
),
'@theme/resolveAutoLink': path.resolve(
__dirname,
'./utils/resolveAutoLink.ts',
Expand Down

0 comments on commit 48aabff

Please sign in to comment.