temp: adatta il sito sia per telefoni (schwermi verticaluiu piccoli) che per tablet che per desktop

This commit is contained in:
2026-08-25 16:29:25 +02:00
parent abeabb3a44
commit d52e62fe7d
6 changed files with 141 additions and 39 deletions
+7 -1
View File
@@ -99,10 +99,16 @@ useHead({
max-width: 46rem;
/* The gap below the header lives here, not on the cover: an article without
a cover image would otherwise have its body butting against the byline. */
margin: 0 auto 3rem;
margin: 0 auto 2rem;
text-align: center;
}
@media (min-width: 48rem) {
.article-header {
margin-bottom: 3rem;
}
}
.article-header nav a {
text-decoration: none;
}
+16 -9
View File
@@ -40,21 +40,20 @@ useSeoMeta({
<p v-else-if="!featured">{{ $t('list.empty') }}</p>
<template v-else>
<article class="featured">
<article class="featured" :class="{ 'has-cover': featuredCover }">
<NuxtLinkLocale
v-if="featuredCover"
class="featured-cover"
:to="`/blog/${featured.slug}`"
tabindex="-1"
aria-hidden="true"
>
<img
v-if="featuredCover"
:src="featuredCover"
:alt="featured.cover?.alternativeText ?? ''"
:width="featured.cover?.width ?? undefined"
:height="featured.cover?.height ?? undefined"
>
<span v-else class="placeholder" />
</NuxtLinkLocale>
<div class="featured-text">
@@ -97,25 +96,33 @@ useSeoMeta({
<style scoped>
.featured {
display: grid;
gap: 2.5rem;
gap: 1.5rem;
align-items: center;
grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
.featured {
/* Stacked on phones and portrait tablets — a side-by-side split below this
width leaves both the image and the headline too cramped to read. The split
also needs a cover to sit in it, or one column would just be empty. */
@media (min-width: 64rem) {
.featured.has-cover {
grid-template-columns: 1.35fr 1fr;
gap: 3.5rem;
}
}
/* Without a cover the headline is the whole lead, so it gets the full width
but stays inside a readable measure. */
.featured:not(.has-cover) .featured-text {
max-width: 46rem;
}
.featured-cover {
display: block;
overflow: hidden;
}
.featured-cover img,
.placeholder {
.featured-cover img {
width: 100%;
aspect-ratio: 3 / 2;
object-fit: cover;
@@ -156,7 +163,7 @@ useSeoMeta({
}
.more {
margin-top: 4rem;
margin-top: var(--gap-section);
text-align: center;
font-size: 0.75rem;
font-weight: 600;