From 441bff90175b3ab77452ce7b89470aced3fddb0f Mon Sep 17 00:00:00 2001 From: Daniel Klein Date: Tue, 3 Sep 2024 17:13:23 +0200 Subject: [PATCH] feat(explorer): redesign grid header according to v2 design --- components/CategorySelectBox.vue | 20 +++-- components/Project/ProjectGrid.vue | 122 +++++++++++++++++++++++++++++ components/SearchBox.vue | 9 ++- composables/useData.ts | 2 +- layouts/default.vue | 101 +++++++++++------------- unocss.config.collections.ts | 2 + 6 files changed, 187 insertions(+), 69 deletions(-) diff --git a/components/CategorySelectBox.vue b/components/CategorySelectBox.vue index 8a6f0e8..5779506 100644 --- a/components/CategorySelectBox.vue +++ b/components/CategorySelectBox.vue @@ -5,6 +5,7 @@ const props = defineProps<{ options: InputOption[] modelValue: string count?: number + titleShowCount?: boolean }>() const emits = defineEmits(['update:modelValue', 'selected']) @@ -23,15 +24,18 @@ function onOptionSelected(value: string) { v-model="selectedValue" as="div" > -
+
- {{ isOptionSelected?.label }} ({{ isOptionSelected?.count }}) + {{ isOptionSelected?.label }} ({{ isOptionSelected?.count }}) @@ -42,7 +46,7 @@ function onOptionSelected(value: string) { leave-to-class="opacity-0" >
  • {{ option.label }} - ({{ option.count }}) + ({{ option.count }})
  • diff --git a/components/Project/ProjectGrid.vue b/components/Project/ProjectGrid.vue index 2d007ee..23f271a 100644 --- a/components/Project/ProjectGrid.vue +++ b/components/Project/ProjectGrid.vue @@ -11,6 +11,16 @@ const displayedProjects = computed(() => props.projects.slice(0, displayCount.va function showMoreProjects() { displayCount.value += 50 } + +const cardTitles = ref< { label: string, togglable?: boolean, toggled?: boolean }[]>([ + { label: 'Usecase' }, + { label: 'Openess', togglable: true }, + { label: 'Technology', togglable: true }, + { label: 'Privacy', togglable: true }, + { label: 'Ecosystem' }, + { label: 'Links' }, + { label: 'W3PN Score', togglable: true }, +])