Responsive UI
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
.calendarGrid {
|
.calendarGrid {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 3%;
|
||||||
grid-template-columns: auto auto auto auto auto auto auto;
|
grid-template-columns: auto auto auto auto auto auto auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 0.6rem;
|
||||||
|
max-width: 35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monthNavigation {
|
.monthNavigation {
|
||||||
@@ -30,10 +33,10 @@
|
|||||||
|
|
||||||
.calendarCell {
|
.calendarCell {
|
||||||
border: 2px solid #ccc;
|
border: 2px solid #ccc;
|
||||||
padding: 0.5rem;
|
padding: 2%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 3rem;
|
height: 100%;
|
||||||
width: 3rem;
|
aspect-ratio: 1;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,13 +56,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.firstWeekPaddingCell {
|
|
||||||
height: 3rem;
|
|
||||||
width: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.statusText {
|
.statusText {
|
||||||
font-size: 0.8rem;
|
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function Calendar() {
|
|||||||
const generateFirstWeekPadding = (month: number) => {
|
const generateFirstWeekPadding = (month: number) => {
|
||||||
const firstDay = new Date(new Date().getFullYear(), month, 1).getDay();
|
const firstDay = new Date(new Date().getFullYear(), month, 1).getDay();
|
||||||
const padding = Array.from({ length: firstDay === 0 ? 6 : firstDay - 1 }, (_, index) => (
|
const padding = Array.from({ length: firstDay === 0 ? 6 : firstDay - 1 }, (_, index) => (
|
||||||
<div key={index} className={`${styles.firstWeekPaddingCell}`}>
|
<div key={index}>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 64px;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user