Problem/Motivation

On Mobile view Blog post is not proper aligned when image is there in blog.

Before fixing issue
before

After fixing issue

Issue fork rivet-3465127

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • rivet-3465127 Comparechanges, plain diff MR !7
  • 1.0.x Comparecompare

Comments

alok_singh created an issue. See original summary.

alok_singh’s picture

StatusFileSize
new205.49 KB

After Fixing the issue

after

rajan kumar@2026’s picture

Status: Active » Needs review
bhaveshdas’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new66.1 KB

Hi, I have tested MR !7 in Drupal 10
Mobile view Blog post its proper aligned when image is there in blog.
I moved it to RTBC.

Thankyou !!

jwilson3 made their first commit to this issue’s fork.

jwilson3’s picture

Status: Reviewed & tested by the community » Needs work

Needs work.

  • DONE: Needs a rebase on latest 1.0.x.
  • DONE: The gitlab integration needs to be split out, it is unrelated to the scope of this issue. It also doesn't use the standard Drupal Gitlab CI Template. This is in progress here #3466431: Add support for Gitlab CI.
  • It's obvious you didn't run npm install; npm run build to build the CSS because the source map file wasn't regenerated.
jwilson3’s picture

StatusFileSize
new138.03 KB

After reviewing the code change more closely this needs an alternate approach because the upstream Rivet library suffers from the same problem at small screen sizes:

https://rivet.iu.edu/components/card/?example=horizontal-card

I don't see this getting "fixed" in the upstream, therefore, there are a few approaches we can take:

  • Use a square image style, to match the intended use of Rivet Horizontal Card.
  • Use a utility class in the template to fix the card layout on mobile. For example, rvt-card rvt-card--horizontal [ rvt-flex-column rvt-flex-row-sm-up ] (codepen).
  • Build a custom rvt-c-card implementation to properly scope the change, following best practices for extending Rivet.
jwilson3’s picture

Title: On Mobile view Blog post is not proper aligned when image is there in blog. » Rivet Card (Horizontal) - fix image layout for post teasers
jwilson3’s picture

Assigned: Unassigned » jwilson3
jwilson3’s picture

Issue summary: View changes
StatusFileSize
new183.83 KB

Rebased again and tested locally. Looks good.

jwilson3’s picture

jwilson3’s picture

Status: Needs work » Fixed

Thanks for your help!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.