Skip to content

Commit

Permalink
style: Improve image grid layout classes
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfyre committed Mar 6, 2024
1 parent 2c35775 commit fb47fd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/templ/components/image.templ
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ templ ImageBase(i Image) {
<source media="(max-width: 768px)" srcset={ i.Thumb }/>
<source media="(min-width: 769px)" srcset={ i.Thumb }/>
<source media="(min-width: 1024px)" srcset={ i.Thumb }/>
<img src={ i.Image } alt={ i.Title } loading="lazy" alt="{ i.Title } - { i.Technique }"/>
<img src={ i.Image } alt={ i.Title } loading="lazy" alt={ i.Title + " - " + i.Technique }/>
</picture>
<figcaption>{ i.Title } - { i.Technique } </figcaption>
</figure>
Expand Down Expand Up @@ -73,7 +73,7 @@ templ ImageCard(i Image, hasLearnMore bool) {
templ ImageGridComponent(i ImageGrid, hasLearnMore bool) {
<div class="columns is-multiline is-mobile works-listing" data-viewer>
for _, img := range i {
<div class="column is-one-third-tablet is-one-quarter-desktop">
<div class="column is-full-mobile is-one-third-tablet is-one-quarter-desktop">
@ImageCard(img, hasLearnMore)
</div>
}
Expand Down
3 changes: 3 additions & 0 deletions esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ let result = await esbuild.build({
"my-*",
"mx-*",
"mb-0",
"is-one-third-tablet",
"is-one-quarter-desktop",
"is-full-mobile",
],
content: [
"assets/templ/**/*.templ",
Expand Down

0 comments on commit fb47fd8

Please sign in to comment.