Add 'Today' button to calendar header for quick navigation to current month
- Add go_to_today callback that navigates to first day of current month - Position Today button between month title and next month arrow - Center month/year title using absolute positioning - Group Today button and next arrow in header-right container with 0.5rem gap - Style Today button with pill shape, semi-transparent background, and hover effects - Add responsive styling for mobile screens with smaller text and padding - Maintain clean, balanced header layout on all screen sizes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
33
styles.css
33
styles.css
@@ -405,6 +405,15 @@ body {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
@@ -427,6 +436,25 @@ body {
|
||||
background: rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
.today-button {
|
||||
background: rgba(255,255,255,0.2);
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.today-button:hover {
|
||||
background: rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
.calendar-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
@@ -765,6 +793,11 @@ body {
|
||||
height: 35px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.today-button {
|
||||
font-size: 0.8rem;
|
||||
padding: 0.4rem 0.8rem;
|
||||
}
|
||||
|
||||
.weekday-header {
|
||||
padding: 0.5rem;
|
||||
|
||||
Reference in New Issue
Block a user