removed midnight border, added back hour number

This commit is contained in:
Paul Fournier 2023-10-30 01:03:05 +01:00
parent fbc3051af6
commit c1fa1a4a5f
2 changed files with 6 additions and 36 deletions

View file

@ -30,7 +30,7 @@
width: 100%; width: 100%;
height: calc(100% + 30px); height: calc(100% + 30px);
padding: 0; padding: 0;
border-bottom: 2px solid rgba(71, 19, 43, 0.25); border-bottom: 0px solid rgba(71, 19, 43, 0.25);
z-index: 10; z-index: 10;
} }
@ -58,8 +58,8 @@
#cal-container .cal-time-slot-hour { #cal-container .cal-time-slot-hour {
padding: 0 0 0 calc(100% - 0.9rem + 7px); padding: 0 0 0 calc(100% - 0.9rem + 7px);
background-color: none; /* rgba(255, 223, 165, 0.08); */ background-color: none; /* rgba(255, 223, 165, 0.08); */
border-bottom: 2px solid rgba(71, 19, 43, 0.25); border-bottom: 0px solid rgba(71, 19, 43, 0.25);
font-size: 0.9rem; font-size: 1rem;
} }
#cal-container .cal-time-slot-hour:nth-child(even) { #cal-container .cal-time-slot-hour:nth-child(even) {
@ -71,21 +71,6 @@
border-right: 0; border-right: 0;
} }
#cal-container .cal-time-slot-hour.cal-last-hour {
padding: 0;
color: transparent;
}
#cal-container .cal-time-slot.cal-last-hour,
#cal-container .cal-time-slot-hour.cal-last-hour {
border-right: 1px solid rgba(71, 19, 43, 0.25);
}
#cal-container .cal-time-slot.cal-first-hour,
#cal-container .cal-time-slot-hour.cal-first-hour {
border-left: 1px solid rgba(71, 19, 43, 0.25);
}
/* Events */ /* Events */
#cal-container .cal-event-container { #cal-container .cal-event-container {

View file

@ -236,14 +236,9 @@ class Calendar {
createTimeSlots () { createTimeSlots () {
// Populate the container hour by hour // Populate the container hour by hour
let self = this; let self = this;
function getHourStringToDisplay (index, hour) { function getHourStringToDisplay (hour) {
if (index === self.nbHoursToDisplay - 1
|| hour === 23) {
return "";
}
if (hour >= 10) { if (hour >= 10) {
return hour + 1; return (hour + 1) % 24;
} }
else { else {
return " " + (hour + 1); return " " + (hour + 1);
@ -262,7 +257,7 @@ class Calendar {
"grid-row-start" : "1", "grid-row-start" : "1",
"grid-row-end" : "1" "grid-row-end" : "1"
}) })
.html(getHourStringToDisplay(i, hour)) .html(getHourStringToDisplay(hour))
.prependTo(this.timeSlotsContainerNode); .prependTo(this.timeSlotsContainerNode);
// Time slot block // Time slot block
@ -275,16 +270,6 @@ class Calendar {
"grid-row-end" : "2" "grid-row-end" : "2"
}) })
.appendTo(this.timeSlotsContainerNode); .appendTo(this.timeSlotsContainerNode);
if (hour === 23) {
timeSlotHourNode.addClass("cal-last-hour");
timeSlotBlockNode.addClass("cal-last-hour");
}
if (hour === 0) {
timeSlotHourNode.addClass("cal-first-hour");
timeSlotBlockNode.addClass("cal-first-hour");
}
} }
} }