fix mobile layout: switch to flex-start on small screens

Pages used align-items: center with min-height: 100vh, which clips
content at the top on mobile when it exceeds the viewport height.
Override to flex-start at <=600px so content scrolls normally.
Also tightened nav gap/font-size on mobile to reduce wrapping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 18:32:47 +02:00
parent 7f800a9056
commit b08bc7b33d
9 changed files with 38 additions and 1 deletions
+2 -1
View File
@@ -99,7 +99,8 @@ function isActive(href: string, current: string): boolean {
}
.nav-inner {
font-size: 0.8rem;
font-size: 0.75rem;
gap: 4px;
}
}
</style>
+8
View File
@@ -118,6 +118,14 @@ import BaseLayout from "../layouts/BaseLayout.astro";
}
@media (max-width: 600px) {
.not-found-page {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
.error-code {
font-size: 3rem;
}
+4
View File
@@ -413,6 +413,10 @@ import BaseLayout from "../layouts/BaseLayout.astro";
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -797,6 +797,10 @@ const readingTime = getReadingTime(post.body);
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -276,6 +276,10 @@ const previewPosts = posts.map((post) => ({
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -351,6 +351,10 @@ const previewPosts = posts.map((post) => ({
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -448,6 +448,10 @@ if (now < new Date(now.getFullYear(), 6, 8)) age--;
/* Responsive */
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -286,6 +286,10 @@ function getPrimaryLink(project: Project): string | undefined {
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}
+4
View File
@@ -538,6 +538,10 @@ import BaseLayout from "../layouts/BaseLayout.astro";
}
@media (max-width: 600px) {
.main {
align-items: flex-start;
}
.container {
padding: var(--space-md);
}