Skip to content

Commit

Permalink
fix(portfolio): respect ratio for images
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
bigbrozer committed May 25, 2023
1 parent 964391b commit 1cb1822
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions partials/portfolio.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
{{! Show pictures from posts tagged with "portfolio" }}
<div
class="uk-grid-small uk-child-width-1-3@m"
uk-grid uk-height-match="img"
uk-lightbox="animation: slide">
{{#each posts}}
{{#unless isHidden}}
{{#checkIf template '==' "portfolio"}}
<div uk-scrollspy="cls: uk-animation-fade">
<a class="uk-inline" href="{{featuredImage.urlMd}}" data-caption="{{title}}">
<img src="{{featuredImage.urlMd}}" height="300" alt="">
</a>
</div>
{{/checkIf}}
{{/unless}}
{{/each}}
class="uk-grid-small uk-child-width-1-3@m"
uk-grid
uk-height-match="img"
uk-lightbox="animation: slide"
>
{{#each posts}}
{{#unless isHidden}}
{{#checkIf template "==" "portfolio"}}
<div uk-scrollspy="cls: uk-animation-fade">
<a
class="uk-inline"
href="{{featuredImage.urlMd}}"
data-caption="{{title}}"
>
<img
class="uk-object-cover"
src="{{featuredImage.urlMd}}"
height="300"
alt=""
style="aspect-ratio: 1 / 1"
/>
</a>
</div>
{{/checkIf}}
{{/unless}}
{{/each}}
</div>

0 comments on commit 1cb1822

Please sign in to comment.