Skip to content

Commit

Permalink
TMS-947: Fix related articles images (#32)
Browse files Browse the repository at this point in the history
* TMS-947: Fix related articles images

* Update changelog
  • Loading branch information
eebbi authored Sep 25, 2023
1 parent 525c12c commit fd6ed29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.1.3] - 2023-09-25
- TMS-947: Fix related articles images on single article page

## [1.1.2] - 2023-05-24
- TMS-952: Add background to dynamic-event single page hero title

Expand Down
22 changes: 15 additions & 7 deletions partials/views/single/single-related.dust
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@
{#related.posts}
<div class="column is-6 is-3-widescreen">
<div class="related-posts__item mb-4 mb-0-tablet">
{?image_id}
<div class="image is-4by3">
<a href="{permalink}" aria-hidden="true" tabindex="-1">
{@image id=image_id size="large" class="objectfit-image" /}
</a>
</div>
{/image_id}
{?api_image_url}
<div class="image is-4by3">
<a href="{permalink|url}" aria-hidden="true" tabindex="-1">
<img src="{api_image_url|url}" class="objectfit-image" loading="lazy" alt=""/>
</a>
</div>
{:else}
{?image_id}
<div class="image is-4by3">
<a href="{permalink|url}" aria-hidden="true" tabindex="-1">
{@image id=image_id size="large" class="objectfit-image" /}
</a>
</div>
{/image_id}
{/api_image_url}

{?post_title}
<h3 class="h4 mt-5 mb-5">
Expand Down

0 comments on commit fd6ed29

Please sign in to comment.