From 74e5077652a5a9d3b68bef68661ddf711c9156c0 Mon Sep 17 00:00:00 2001 From: gabrieluizramos Date: Fri, 22 Mar 2024 10:46:11 -0300 Subject: [PATCH] cria destaques nas fotos de show --- src/config/photos/concert.json | 13 +++++++++---- src/config/photos/nature.json | 4 ++-- .../nature/{macro => natureza}/photo-1.webp | 0 .../nature/{macro => natureza}/photo-2.webp | 0 .../nature/{macro => natureza}/photo-3.webp | 0 .../nature/{macro => natureza}/photo-4.webp | 0 .../nature/{macro => natureza}/photo-5.webp | 0 .../nature/{macro => natureza}/photo-6.webp | 0 .../nature/{macro => natureza}/photo-7.webp | 0 src/index.pug | 16 ++++++++++++++-- src/style.css | 3 ++- 11 files changed, 27 insertions(+), 9 deletions(-) rename src/images/nature/{macro => natureza}/photo-1.webp (100%) rename src/images/nature/{macro => natureza}/photo-2.webp (100%) rename src/images/nature/{macro => natureza}/photo-3.webp (100%) rename src/images/nature/{macro => natureza}/photo-4.webp (100%) rename src/images/nature/{macro => natureza}/photo-5.webp (100%) rename src/images/nature/{macro => natureza}/photo-6.webp (100%) rename src/images/nature/{macro => natureza}/photo-7.webp (100%) diff --git a/src/config/photos/concert.json b/src/config/photos/concert.json index d1ba9f9..7ae031f 100644 --- a/src/config/photos/concert.json +++ b/src/config/photos/concert.json @@ -2,6 +2,7 @@ "recent": [ { "title": "Radwimps", + "highlighted": true, "path": "images/concert/6-dreamers-entertainment/3-radwimps", "count": 10, "details": { @@ -44,6 +45,7 @@ }, { "title": "Bambam", + "highlighted": true, "path": "images/concert/7-gig-music/1-bambam", "count": 17, "details": { @@ -118,9 +120,12 @@ "article": "/eventos/comeback-kid-sao-paulo/" } } - }, + } + ], + "archived": [ { "title": "The Ghost Inside", + "highlighted": true, "path": "images/concert/6-dreamers-entertainment/2-the-ghost-inside", "count": 35, "details": { @@ -180,6 +185,7 @@ }, { "title": "Underoath", + "highlighted": true, "path": "images/concert/6-dreamers-entertainment/1-underoath", "count": 33, "details": { @@ -216,9 +222,7 @@ ] } } - } - ], - "archived": [ + }, { "title": "Titãs", "path": "images/concert/5-boomerang-music/4-titas", @@ -286,6 +290,7 @@ }, { "title": "Alter Bridge", + "highlighted": true, "path": "images/concert/2-igor-miranda/8-alter-bridge", "count": 5, "details": { diff --git a/src/config/photos/nature.json b/src/config/photos/nature.json index 09c054f..e6cbdce 100644 --- a/src/config/photos/nature.json +++ b/src/config/photos/nature.json @@ -5,8 +5,8 @@ "count": 9 }, { - "title": "Macro", - "path": "images/nature/macro", + "title": "Natureza", + "path": "images/nature/natureza", "count": 7 } ] \ No newline at end of file diff --git a/src/images/nature/macro/photo-1.webp b/src/images/nature/natureza/photo-1.webp similarity index 100% rename from src/images/nature/macro/photo-1.webp rename to src/images/nature/natureza/photo-1.webp diff --git a/src/images/nature/macro/photo-2.webp b/src/images/nature/natureza/photo-2.webp similarity index 100% rename from src/images/nature/macro/photo-2.webp rename to src/images/nature/natureza/photo-2.webp diff --git a/src/images/nature/macro/photo-3.webp b/src/images/nature/natureza/photo-3.webp similarity index 100% rename from src/images/nature/macro/photo-3.webp rename to src/images/nature/natureza/photo-3.webp diff --git a/src/images/nature/macro/photo-4.webp b/src/images/nature/natureza/photo-4.webp similarity index 100% rename from src/images/nature/macro/photo-4.webp rename to src/images/nature/natureza/photo-4.webp diff --git a/src/images/nature/macro/photo-5.webp b/src/images/nature/natureza/photo-5.webp similarity index 100% rename from src/images/nature/macro/photo-5.webp rename to src/images/nature/natureza/photo-5.webp diff --git a/src/images/nature/macro/photo-6.webp b/src/images/nature/natureza/photo-6.webp similarity index 100% rename from src/images/nature/macro/photo-6.webp rename to src/images/nature/natureza/photo-6.webp diff --git a/src/images/nature/macro/photo-7.webp b/src/images/nature/natureza/photo-7.webp similarity index 100% rename from src/images/nature/macro/photo-7.webp rename to src/images/nature/natureza/photo-7.webp diff --git a/src/index.pug b/src/index.pug index 28000ab..124f67c 100644 --- a/src/index.pug +++ b/src/index.pug @@ -67,11 +67,23 @@ html(lang="pt-BR") section.section.music .wrapper h3.title 🎙 Shows + - + const concerts = Object.entries(concert).reduce((concerts, [name, values]) => { + const rest = values.filter(c => !c.highlighted); + const currentHighlights = values.filter(c => c.highlighted); + let highlights = concerts.highlights ? [...concerts.highlights, ...currentHighlights] : currentHighlights; + + return { ...concerts, [name]: rest, highlights} + }, {}) + h4.subtitle.subdivision + span Destaques ⭐️ + +gallery(concerts.highlights) + h4.subtitle.subdivision span Recentes - +gallery(locals.concert.recent) + +gallery(concerts.recent, true) - +archive(locals.concert.archived) + +archive(concerts.archived) hr div.section.ebook diff --git a/src/style.css b/src/style.css index 0a0eca5..f984c01 100644 --- a/src/style.css +++ b/src/style.css @@ -190,7 +190,8 @@ content: attr(data-emoji) !important; } -.accordion.archive { +.accordion.archive, +.accordion + .subtitle.subdivision { margin-top: var(--spacing-double); }