Closed joshdarby closed 4 years ago
I don't have a better idea of how to make sure we get the right image, short of patching https://github.com/INN/largo/issues/1769 in Largo. Here's the code that outputs that image: https://github.com/INN/largo/blob/1744bbc7ae99f501129d158c3b585cddf6b5409e/inc/widgets/largo-related-posts.php#L50-L65
With this we can center the smaller images:
ul.related li > a:first-child {
text-align: center;
}
.widget.largo-related-posts ul.related li .wp-post-image {
margin: 0 auto;
width: unset;
}
But on mobile it looks even weirder to have the little centered images:
On small viewports, should we change to a vertical list of posts with left-aligned thumbnails?
@MirandaEcho @kaylima Any input on this? Are smaller, centered images ok here?
@MirandaEcho @kaylima Any input on this? Are smaller, centered images ok here?
@joshdarby - for mobile or desktop? On mobile, how much longer would it be to do the left-aligned ones? I agree the centered small looks a bit goofy on mobile. What was the original mobile design for it?
The small-viewport styles are a matter of commenting out styles added in this PR. Should be solvable by moving the added layout styles within a media query.
for mobile or desktop?
@MirandaEcho For desktop, and then the left aligned on mobile. Like @benlk said, the left aligned for mobile shouldn't take very long. We could even left align it on desktop, too, if you think that looks better than the small, centered image.
Original mobile designs had a center full width (on mobile) image, so that's fine.
Original mobile designs had a center full width (on mobile) image, so that's fine.
@MirandaEcho Just to be clear, here's what these proposed changes would look like.
Desktop (note image is not full width of story container):
Mobile:
@MirandaEcho raising a flag: the byline name and title aren't easily readable. we may want to get ahead of this before client review
@MirandaEcho said she's fine with the smaller, centered image on desktop and left aligned on mobile.
https://github.com/INN/umbrella-sfpublicpress/pull/57/commits/0bd6bfbb71fd4c528393226ebb29a7de1b61bcdd implements the center aligned images on both desktop and mobile. We can't left align the image on mobile because that would require removing display: flex
from the parent li
, which we need in order keep the correct order of elements for each post.
Desktop:
Mobile:
Can we use the align-self
property to change where the image is positioned within the flex container?
Changes
This pull request makes the following changes:
Desktop:
Mobile:
Why
For #31
Testing/Questions
Features that this PR affects:
Questions that need to be answered before merging:
width: 100%;
since the actual 120x120 thumbnail is being pulled in. @benlk do you have a good idea for how we can grab a larger image size here since there's no widget option for it?Steps to test this PR:
#