Changed calendar layout for buttons

This commit is contained in:
Alexis
2025-04-23 16:21:51 +02:00
parent 048413286f
commit 707d4374ef
5 changed files with 29 additions and 9 deletions

View File

@@ -149,8 +149,6 @@ const eventsNotDisplayed: ComputedRef<number> = computed<number>(() => eventsFo
</template>
<style lang="scss" scoped>
// .tile are the direct children of the grid
// We need to get, between each element, a 1px solid line to separate them, for columns and rows
.tile {
border-right-width: 1px;
border-bottom-width: 1px;

View File

@@ -6,6 +6,9 @@ const { currentDate, decrementViewMonth, incrementViewMonth } = useCalendar()
const { currentMonthData } = storeToRefs(useCalendar())
function handleWheel(e: WheelEvent) {
// Prevent scrolling
e.preventDefault()
const isMovingUp = e.deltaY < 0
if (isMovingUp) {
moveCalendarLeft()
@@ -24,7 +27,7 @@ const moveCalendarRight = useThrottleFn(() => {
</script>
<template>
<div class="grid grid-cols-10" @wheel="handleWheel">
<div class="grid grid-cols-5 md:grid-cols-7 lg:grid-cols-10" @wheel="handleWheel">
<template v-if="currentMonthData">
<CalendarStateMonthlyDayTile
v-for="day in currentMonthData?.days"