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

View File

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