Skip to content

Commit

Permalink
Avoid narrowing innovation show page photo captions when image reques…
Browse files Browse the repository at this point in the history
…ts fail (#725)

Co-authored-by: Camille Villa <[email protected]>
  • Loading branch information
camillevilla and camillevilla authored Oct 19, 2023
1 parent 3e51520 commit 989a8c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/assets/javascripts/practice_page.es6
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@
$('.practice-editor-impact-photo').each(function () {
$(this).parent().show();
if ($(window).width() > 1023) {
$(this).next().width(`${$(this).width()}`);
if ($(this).width() > 450){ // avoid narrow columns when image requests break
$(this).next().width(`${$(this).width()}`);
} else {
$(this).next().width(450); // minimum 450px captions for narrow images
}
}
})
})
Expand Down

0 comments on commit 989a8c4

Please sign in to comment.