Make calendar work reasonably on mobile

This commit is contained in:
2022-12-11 00:44:14 +00:00
parent 6e8779c81b
commit 951227e68b

View File

@@ -23,12 +23,13 @@
<style> <style>
.week { .week {
display:grid; display:grid;
grid-template-columns: repeat(7, 1fr); grid-template-columns: repeat(7, minmax(0, 1fr));
grid-auto-flow: dense; grid-auto-flow: dense;
grid-gap: 2px 10px; grid-gap: 2px 10px;
border: 1px solid black; border: 1px solid black;
height: 8em; height: 8em;
align-content: start; align-content: start;
max-width: 100%;
} }
.day { .day {
@@ -50,6 +51,7 @@
background-color: #CCC; background-color: #CCC;
font-size: 0.8em !important; font-size: 0.8em !important;
white-space: nowrap; white-space: nowrap;
overflow: hidden;
} }
.event-end { .event-end {
@@ -62,6 +64,15 @@
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
} }
.week-day {
font-size: 0.8em;
}
@media (max-width: 767.98px) {
.event {
padding: 2px;
}
}
[data-span="1"] { grid-column-end: span 1; } [data-span="1"] { grid-column-end: span 1; }
[data-span="2"] { grid-column-end: span 2; } [data-span="2"] { grid-column-end: span 2; }