feat(design): container e tipografia fluidos, cabecalho de secao em duas colunas e grade de projetos automatica
- tokens --shell, --fs-section-title e --fs-lead: iguais ao desenho atual ate ~1440px e crescem em telas grandes - .ds-section-header vira container; acima de 880px o titulo fica a esquerda e a descricao a direita (aninhamento nativo + container query) - .ds-grid-fluid: 2 colunas em notebook e 3 em tela grande, sem breakpoint (usada em Projects) - Hero acompanha a largura util em telas grandes Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
229280d519
commit
d8b59b03f2
3 files changed
+50
-4
No files matched your search
@@ -35,7 +35,7 @@ export default function Hero() {
|
||||
duration: shouldReduceMotion ? 0 : 0.45,
|
||||
ease: "easeOut",
|
||||
}}
|
||||
className="mx-auto grid w-full max-w-[1400px] grid-cols-1 items-center gap-sp-8 px-sp-6 pt-[calc(var(--site-header-height)+32px)] pb-sp-10 lg:grid-cols-[minmax(0,53fr)_minmax(0,47fr)] lg:gap-sp-8 lg:px-sp-12 lg:pb-sp-16"
|
||||
className="mx-auto grid w-full max-w-[max(1400px,var(--shell))] grid-cols-1 items-center gap-sp-8 px-sp-6 pt-[calc(var(--site-header-height)+32px)] pb-sp-10 lg:grid-cols-[minmax(0,53fr)_minmax(0,47fr)] lg:gap-sp-8 lg:px-sp-12 lg:pb-sp-16"
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<p className="mb-sp-5 text-[14px] leading-[1.5] text-[rgba(244,242,237,.72)]">
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function Projects({
|
||||
dark
|
||||
disableChildrenAnimation
|
||||
>
|
||||
<div className="ds-grid-2">
|
||||
<div className="ds-grid-fluid">
|
||||
{projects.map((project) => {
|
||||
const caseStudy = caseStudies.find(
|
||||
(entry) => entry.id === project.id,
|
||||
|
||||
+48
-2
@@ -48,6 +48,10 @@
|
||||
--r-lg: 16px;
|
||||
--r-full: 999px;
|
||||
--site-header-height: 60px;
|
||||
/* Escala fluida: igual ao desenho original até ~1440px e cresce nas telas grandes. */
|
||||
--shell: clamp(1240px, 76vw, 1760px);
|
||||
--fs-section-title: min(max(clamp(24px, 4vw, 44px), 3.05vw), 68px);
|
||||
--fs-lead: min(max(15px, 1.05vw), 19px);
|
||||
--font-display: var(--font-space-grotesk), sans-serif;
|
||||
--font-hero: var(--font-monument-extended), sans-serif;
|
||||
--font-mono: var(--font-geist-mono), monospace;
|
||||
@@ -248,7 +252,7 @@ textarea {
|
||||
.ds-section-shell,
|
||||
.ds-loading,
|
||||
.ds-error {
|
||||
width: min(1240px, 100%);
|
||||
width: min(var(--shell), 100%);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -258,10 +262,45 @@ textarea {
|
||||
align-items: flex-start;
|
||||
gap: var(--sp-6);
|
||||
margin-bottom: var(--sp-10);
|
||||
/* o cabeçalho mede a si mesmo: a mesma regra serve para qualquer largura de tela */
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
.ds-section-meta {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
max-width: 760px;
|
||||
|
||||
/* Largo: título à esquerda, descrição à direita, alinhados pela base (some a faixa vazia ao lado do título). */
|
||||
@container (min-width: 880px) {
|
||||
max-width: none;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
|
||||
grid-template-areas:
|
||||
"eyebrow eyebrow"
|
||||
"title lead"
|
||||
"line line";
|
||||
column-gap: var(--sp-10);
|
||||
align-items: end;
|
||||
|
||||
> .ds-eyebrow {
|
||||
grid-area: eyebrow;
|
||||
}
|
||||
|
||||
> .ds-section-title {
|
||||
grid-area: title;
|
||||
}
|
||||
|
||||
> .ds-section-description {
|
||||
grid-area: lead;
|
||||
max-width: 62ch;
|
||||
font-size: var(--fs-lead);
|
||||
}
|
||||
|
||||
> .ds-draw-line {
|
||||
grid-area: line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ds-eyebrow,
|
||||
@@ -278,7 +317,7 @@ textarea {
|
||||
|
||||
.ds-section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(24px, 4vw, 44px);
|
||||
font-size: var(--fs-section-title);
|
||||
line-height: 1.02;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.035em;
|
||||
@@ -301,6 +340,13 @@ textarea {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
/* Colunas automáticas: sem breakpoint. Cabem 2 até ~1360px de largura útil e 3 acima disso. */
|
||||
.ds-grid-fluid {
|
||||
display: grid;
|
||||
gap: var(--sp-6);
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
|
||||
}
|
||||
|
||||
.ds-grid-4 {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user