responsive layout fixes for mobile and desktop

- style.css: shrink nav-link padding, wrap nav-links on mobile,
  reduce container margin, responsive modal
- goals.css: stack goal cards vertically on small screens
- tasks.css: fix scroll-view height for mobile (50-55vh),
  side-panel width uses percentage (85%), add small-screen
  breakpoint at 480px
- notes.css: stack filters vertically on mobile, remove
  min-width constraints
This commit is contained in:
Yuyao Huang 2026-05-09 10:51:09 +08:00
parent 3dbe7f9c17
commit 91169f117b
4 changed files with 89 additions and 4 deletions

View File

@ -128,3 +128,23 @@
.empty-state h3 { .empty-state h3 {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
@media (max-width: 640px) {
.goals-header {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
}
.goal-card {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
padding: 1rem;
}
.goal-actions {
justify-content: flex-end;
flex-wrap: wrap;
}
}

View File

@ -254,4 +254,18 @@
flex-direction: column; flex-direction: column;
gap: 0; gap: 0;
} }
.notes-filters {
flex-direction: column;
align-items: stretch;
}
.filter-group select {
min-width: 0;
width: 100%;
}
.search-group {
min-width: 0;
}
} }

View File

@ -29,15 +29,18 @@ body {
.nav-links { .nav-links {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 1rem; gap: 0.5rem;
flex-wrap: wrap;
justify-content: flex-end;
} }
.nav-link { .nav-link {
color: white; color: white;
text-decoration: none; text-decoration: none;
padding: 0.5rem 1rem; padding: 0.4rem 0.6rem;
border-radius: 4px; border-radius: 4px;
transition: background-color 0.2s; transition: background-color 0.2s;
white-space: nowrap;
} }
.nav-link:hover { .nav-link:hover {
@ -251,3 +254,32 @@ body {
gap: 1rem; gap: 1rem;
margin-top: 1rem; margin-top: 1rem;
} }
@media (max-width: 640px) {
.navbar {
padding: 0.5rem 0.75rem;
flex-wrap: wrap;
gap: 0.25rem;
}
.nav-brand {
font-size: 1.15rem;
}
.container {
margin: 0.75rem auto;
}
.modal-content {
margin: 0.5rem;
padding: 1rem;
}
.modal-actions {
flex-wrap: wrap;
}
.modal-actions .btn-danger {
width: 100%;
}
}

View File

@ -202,8 +202,9 @@
.side-panel { .side-panel {
position: fixed; position: fixed;
top: 0; top: 0;
right: -400px; right: -100%;
width: 400px; width: 85%;
max-width: 400px;
height: 100%; height: 100%;
background: white; background: white;
box-shadow: -2px 0 8px rgba(0,0,0,0.1); box-shadow: -2px 0 8px rgba(0,0,0,0.1);
@ -216,6 +217,24 @@
.side-panel.active { .side-panel.active {
right: 0; right: 0;
} }
.scroll-view {
height: 55vh;
}
}
@media (max-width: 480px) {
.scroll-view {
height: 50vh;
}
.tasks-list {
padding: 30vh 1rem;
}
.goal-selector-container select {
min-width: 140px;
}
} }
@media (orientation: landscape) and (min-width: 1024px) { @media (orientation: landscape) and (min-width: 1024px) {