From ab3a31367aa0aaac1d325c4d3db5037385323608 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Tue, 27 Feb 2024 10:09:52 +0100 Subject: [PATCH] feat(site): adds virtual scrolling to icons grid and categories (#1911) * Add virtual scrolling icons page * improve scrolling * Small fixes in the routing * Cleanup * Fix routing issue * Remove log * Cleanup * Cleanup * Show search results in sidebar * Improve alphabetical list * Add whitespace * Extract logic into a composable and fix icon selection * Formatting --- .../theme/components/icons/CategoryList.vue | 15 ++- .../components/icons/CategoryListItem.vue | 42 +++--- .../theme/components/icons/IconGrid.vue | 3 +- .../theme/components/icons/IconsCategory.vue | 69 +++++----- .../icons/IconsCategoryOverview.vue | 118 +++++++++++++---- .../theme/components/icons/IconsOverview.vue | 125 +++++++++--------- .../theme/components/icons/NoResults.vue | 51 ++++--- .../theme/composables/useActiveAnchor.ts | 14 +- .../theme/composables/useCategoryView.ts | 19 ++- .../theme/composables/useScrollToCategory.ts | 52 ++++++++ .../.vitepress/theme/composables/useSearch.ts | 12 +- docs/.vitepress/theme/style.css | 4 + docs/.vitepress/theme/utils/chunkArray.ts | 9 ++ 13 files changed, 364 insertions(+), 169 deletions(-) create mode 100644 docs/.vitepress/theme/composables/useScrollToCategory.ts create mode 100644 docs/.vitepress/theme/utils/chunkArray.ts diff --git a/docs/.vitepress/theme/components/icons/CategoryList.vue b/docs/.vitepress/theme/components/icons/CategoryList.vue index 6e645ab5e..56dc570cf 100644 --- a/docs/.vitepress/theme/components/icons/CategoryList.vue +++ b/docs/.vitepress/theme/components/icons/CategoryList.vue @@ -1,13 +1,15 @@