From 598cb49b61c2efd719f49255566b2836fcdb7bb3 Mon Sep 17 00:00:00 2001 From: ordinarthur Date: Fri, 27 Feb 2026 18:36:09 +0100 Subject: [PATCH] modify responsive --- nginx.conf | 17 +++++++++++------ public/main.js | 3 ++- public/sitemap.xml | 2 +- public/style.css | 14 ++++++-------- src/pages/collection/[slug].astro | 2 +- src/pages/success.astro | 13 +++++++++++++ 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/nginx.conf b/nginx.conf index 36f0d70..b4d737d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,7 +2,7 @@ server { listen 80; server_name rebours.studio; - root /var/www/rebours/dist; + root /var/www/html/rebours/dist; index index.html; # HTML : jamais caché @@ -10,14 +10,19 @@ server { add_header Cache-Control "no-store"; } - # CSS / JS avec hash Astro : cache long immutable - location ~* \.(css|js)$ { + # Fichiers Astro avec hash dans _astro/ : cache long immutable + location ~* ^/_astro/ { add_header Cache-Control "public, max-age=31536000, immutable"; } - # Assets (images, fonts) : cache long - location ~* \.(jpg|jpeg|png|gif|webp|svg|woff2|woff|ttf)$ { - add_header Cache-Control "public, max-age=31536000, immutable"; + # CSS / JS sans hash (style.css, main.js) : revalidation à chaque visite + location ~* \.(css|js)$ { + add_header Cache-Control "no-cache"; + } + + # Assets (images, fonts) : cache 7 jours + location ~* \.(jpg|jpeg|png|gif|webp|svg|woff2|woff|ttf|ico)$ { + add_header Cache-Control "public, max-age=604800"; } location / { diff --git a/public/main.js b/public/main.js index bdc167d..f2178f6 100644 --- a/public/main.js +++ b/public/main.js @@ -63,7 +63,7 @@ document.addEventListener('DOMContentLoaded', () => { // ---- INTERACTIVE GRID ---- const gridContainer = document.getElementById('interactive-grid'); - const CELL = 60; + const CELL = window.innerWidth <= 600 ? 38 : 60; const COLORS = [ 'rgba(232,168,0,0.45)', 'rgba(232,168,0,0.32)', @@ -73,6 +73,7 @@ document.addEventListener('DOMContentLoaded', () => { function buildGrid() { if (!gridContainer) return; gridContainer.innerHTML = ''; + const CELL = window.innerWidth <= 600 ? 38 : 60; const cols = Math.ceil(window.innerWidth / CELL); const rows = Math.ceil(window.innerHeight / CELL); gridContainer.style.display = 'grid'; diff --git a/public/sitemap.xml b/public/sitemap.xml index 2c28572..1f598f8 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -7,7 +7,7 @@ 1.0 - https://rebours.studio/collection/lumiere-orbitale/ + https://rebours.studio/collection/solar-altar/ 2026-02-27 monthly 0.9 diff --git a/public/style.css b/public/style.css index b0b3af1..3a44a8b 100644 --- a/public/style.css +++ b/public/style.css @@ -595,24 +595,22 @@ hr { border: none; border-top: var(--border); margin: 0; } /* ---- RESPONSIVE ---- */ @media (max-width: 900px) { .hero, .newsletter { grid-template-columns: 1fr; } - .hero-left { border-right: none; border-bottom: var(--border); min-height: 70vw; padding: 3rem var(--pad); } + .hero-left { border-right: none; border-bottom: var(--border); min-height: 70vw; padding: 3rem var(--pad); order: -1; } .hero-right { height: 55vw; } .nl-left { border-right: none; border-bottom: var(--border); } .product-grid { grid-template-columns: 1fr 1fr; } .panel-inner { grid-template-columns: 1fr; } .panel-img-col { height: 50vw; } .panel-info-col { overflow-y: auto; } - } @media (max-width: 600px) { - .product-grid { grid-template-columns: 1fr; } + .product-grid { grid-template-columns: 1fr; margin: 0 1rem; border-left: none; } + .product-card { border-left: 2px solid #111; } .header-nav { gap: 1rem; } - .hero-left { min-height: 85vw; } + .hero { height: auto; } + .hero-left { min-height: unset; padding: 2rem var(--pad); order: -1; } + .hero-right { height: 60vw; } .cursor-dot, .cursor-outline { display: none; } body { cursor: auto; } } -@media (max-width: 600px) { - .product-grid { grid-template-columns: 1fr; } - .header-nav { gap: 1rem; } -} diff --git a/src/pages/collection/[slug].astro b/src/pages/collection/[slug].astro index e12d20a..0a1faa5 100644 --- a/src/pages/collection/[slug].astro +++ b/src/pages/collection/[slug].astro @@ -4,7 +4,7 @@ import Base from '../../layouts/Base.astro'; export function getStaticPaths() { const PRODUCTS = [ { - slug: 'lumiere-orbitale', + slug: 'solar-altar', name: 'Solar_Altar', title: 'REBOURS — Solar Altar | Collection 001', description: 'Lampe de table unique. Béton texturé coulé à la main + dôme céramique laqué. Pièce unique fabriquée à Paris.', diff --git a/src/pages/success.astro b/src/pages/success.astro index 33aad23..e4775b6 100644 --- a/src/pages/success.astro +++ b/src/pages/success.astro @@ -82,6 +82,19 @@ import Base from '../layouts/Base.astro'; } a.back:hover { background: var(--clr-black); color: var(--clr-white); } #loading { color: #888; font-size: 0.78rem; } + + @media (max-width: 600px) { + main { grid-template-columns: 1fr; } + .left { + padding: 2rem 1.5rem; + min-height: 55vw; + border-right: none; + border-bottom: var(--border); + } + h1 { font-size: clamp(2rem, 12vw, 3rem); } + .right { padding: 2rem 1.5rem; justify-content: flex-start; } + a.back { align-self: stretch; text-align: center; } + }