1
0

fix(projects): do not hide 6th project on project overview

(cherry picked from commit b52d6dbf59f48a86cbcfad2a24c7fce9e3575639)
This commit is contained in:
kolaente 2024-09-11 18:20:57 +02:00
parent 40105ee4ce
commit 8f5273600a
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,8 @@
<template>
<ul class="project-grid">
<ul
class="project-grid"
:class="{ 'show-even-number-of-projects': showEvenNumberOfProjects }"
>
<li
v-for="(item, index) in filteredProjects"
:key="`project_${item.id}_${index}`"
@ -19,11 +22,13 @@ import ProjectCard from './ProjectCard.vue'
const props = withDefaults(defineProps<{
projects: IProject[],
showArchived?: boolean,
itemLimit?: boolean
itemLimit?: boolean,
showEvenNumberOfProjects?: boolean,
}>(), {
projects: () => [],
showArchived: false,
itemLimit: false,
showEvenNumberOfProjects: false,
})
const filteredProjects = computed(() => {
@ -58,9 +63,13 @@ const filteredProjects = computed(() => {
@media screen and (min-width: $widescreen) {
--project-grid-columns: 5;
}
.project-grid-item:nth-child(6) {
display: none;
&.show-even-number-of-projects {
@media screen and (min-width: $widescreen) {
.project-grid-item:nth-child(5) {
display: none;
}
}
}
}

View File

@ -42,6 +42,7 @@
<ProjectCardGrid
v-cy="'projectCardGrid'"
:projects="projectHistory"
:show-even-number-of-projects="true"
/>
</div>
<ShowTasks