Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support more than 4 media attachments with 3 columns grid #2802

Merged
merged 2 commits into from
Apr 14, 2024

Conversation

shuuji3
Copy link
Member

@shuuji3 shuuji3 commented Apr 12, 2024

fix #2502
fix #2796

This PR fixes the broken grid layout for more than 4 attachments. In that case, the number of the grid columns switches from 2 to 3 to reduce the height of the post and show more overview of the gallery.

Screenshot

Example posts in #2796: https://pixelfed.social/p/Lacalle/684124192137313050

Screenshot from 2024-04-12 21-55-37

Copy link

stackblitz bot commented Apr 12, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit f2e5e6e
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/66195031720dce000873da6a
😎 Deploy Preview https://deploy-preview-2802--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit f2e5e6e
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/661950310c41ca0008ae1c9a

@userquin
Copy link
Member

userquin commented Apr 12, 2024

Why not just using vue css vars?

.status-media-container {
  --grid-cols: v-bind(gridColumnNumber);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 1), 1fr);
}

@shuuji3
Copy link
Member Author

shuuji3 commented Apr 12, 2024

Oh, I didn't know that feature. That also worked perfectly. Updated!

@patak-dev patak-dev added this pull request to the merge queue Apr 14, 2024
Merged via the queue into main with commit c1f8e3e Apr 14, 2024
15 checks passed
@patak-dev patak-dev deleted the shuuji3/feat/grid-3 branch April 14, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants