Skip to content

Commit

Permalink
adiciona contagem de shows
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieluizramos committed Mar 29, 2024
1 parent a6cfd22 commit b3d7cc2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@ html(lang="pt-BR")
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}
let count = concerts.count || 0;
count += currentHighlights.length + rest.length
return {
...concerts,
[name]: rest,
highlights,
count,
}
}, {})
h4.subtitle.subdivision
span Destaques ⭐️
Expand All @@ -87,6 +94,9 @@ html(lang="pt-BR")

+archive(concerts.archived)

.count
p.text.count Já são !{concerts.count} eventos cobertos e seguimos contando

hr
div.section.ebook
.wrapper
Expand Down
4 changes: 4 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
.text {
line-height: 1.7;
}
.count {
font-size: var(--font-size-smaller);
margin-top: var(--spacing-double);
}
.text:not(:last-child),
.section .title {
margin-bottom: var(--spacing-default);
Expand Down

0 comments on commit b3d7cc2

Please sign in to comment.