diff --git a/components/Card.vue b/components/Card.vue index 55dcd65..1d18c5c 100644 --- a/components/Card.vue +++ b/components/Card.vue @@ -40,18 +40,16 @@ const projectItems: { label: string | string[], type: string, rating?: ProjectRa h="48px lg:64px" :class="switcher ? '' : 'lg:max-w-full! lg:w-full '" > - - - +
- - + {{ (projectItem.label as string[] || []).join(', ') }} +

-
- {{ project.percentage }} % -
- + + + + +
+
+
-
- + + +
+ + + +
+ {{ project.percentage }} % +
+ +
+ diff --git a/components/CategorySelectBox.vue b/components/CategorySelectBox.vue index f7fa559..b329a42 100644 --- a/components/CategorySelectBox.vue +++ b/components/CategorySelectBox.vue @@ -2,6 +2,7 @@ import type { InputOption } from '~/types' const props = defineProps<{ + name: string options: InputOption[] modelValue: string | number count?: number @@ -26,6 +27,7 @@ function onOptionSelected(value: string | number) { >
diff --git a/components/Project/ProjectGrid.vue b/components/Project/ProjectGrid.vue index 09c325c..e1e5f77 100644 --- a/components/Project/ProjectGrid.vue +++ b/components/Project/ProjectGrid.vue @@ -4,33 +4,8 @@ import type { ProjectShallow } from '~/types' const props = defineProps<{ projects: { title: string, projects: ProjectShallow[] }[] }>() -const { switcher, filter } = storeToRefs(useData()) const totalProjectsCount = props.projects.map(g => g.projects.length).reduce((a, b) => a + b, 0) - -function onChangeSort(sortKey: string) { - if (filter.value.sortby === sortKey) { - if (filter.value.sortDirection === 'desc' && filter.value.sortby !== 'score') { - filter.value.sortby = 'score' - filter.value.sortDirection = 'desc' - return - } - filter.value.sortDirection = filter.value.sortDirection === 'asc' ? 'desc' : 'asc' - return - } - filter.value.sortby = sortKey - filter.value.sortDirection = sortKey === 'score' ? 'desc' : 'asc' -} - -const cardTitles = ref< { label: string, sortKey: string, togglable?: boolean }[]>([ - { label: 'Usecase', sortKey: 'usecase' }, - { label: 'Openess', sortKey: 'openess', togglable: true }, - { label: 'Technology', sortKey: 'technology', togglable: true }, - { label: 'Privacy', sortKey: 'privacy', togglable: true }, - { label: 'Ecosystem', sortKey: 'ecosystem' }, - { label: 'Links', sortKey: 'links' }, - { label: 'W3PN Score', sortKey: 'score', togglable: true }, -])