Feature Request: Cards of different sizes #612
blue-belle
started this conversation in
Ideas
Replies: 1 comment
-
|
Sorry, I chose a very poor image to describe this idea -- I know that setting a higher column number will divide the space more leading to bigger cards, what I should have mocked up is a layout where there are three cards in each row but the middle row's cards are still smaller than the top row, bottom row's cards are smaller than middle row |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I quite like a layout that has cards of various sizes, as shown in the image below.
I've done a first-pass of this concept by adding
<div class="cards-{{ $size }}...and{{- $size := .size | default "large" -}}to/layouts/partials/shortcodesand{{- $size := .Get "size" | default "large" -}}tolayouts/shortcodesand then rules for.cards-mediumto mycustom.css.This way I can call the cards partial with
size=mediumorsize=smallset and have smaller cards.The way I'm currently shrinking the cards is by modifying the css-grid-layout from
grid-template-columns: repeat(auto-fill, minmax(max(10px, calc((100% - 1rem * 2) / var(--hextra-cards-grid-cols))), 1fr));to
grid-template-columns: repeat(auto-fill, minmax(max(10px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));(change '2' to '4')
The only thing I don't like is that the cards are not inherently centered, although I'm sure I can fix that eventually.
Wondering if there's any appetite to add this to the theme at large.
Beta Was this translation helpful? Give feedback.
All reactions