-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat: new extended cards #809
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for hugo-hextra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi, thanks for this. On first glance it looks good! I’ll take a closer look at the implementation details later, and organize the CSS part.
I agree, this is the ideal approach. In fact, we can refactor the previous card to be composed with these partials.
Exactly. This feels like a solid example. Nicely done! |
8790ec5 to
518cbc0
Compare
2c08040 to
5501e07
Compare
5501e07 to
2832179
Compare
imfing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a small suggestion to the button styling, the PR implementation looks good overall.
I can imagine some users might mix other shortcodes or Markdown into the new extended card component, so in the future it might be worth adding some note to the docs clarifying how different cases are handled.
Co-authored-by: Xin <[email protected]>
|
As explained inside the PR description:
Also, could you provide feedback about the prefix? |
ah apologies missed that, I'm leaning towards |
The PR creates new shortcodes to create extended cards.
The extended cards are cards, but users can customize the placement of the title, the image, add buttons, etc.
It allows users to create any shortcode they want to extend the cards.
Each commit is a small step, so you can follow the changes.
Technically, with my approach, the shortcodes are just "interfaces" for partials: they are just here to link the user configuration to the partials.
This design is more flexible and closer to a component design.
The existing card shortcodes and partials are untouched and work as before.
The doc is missing because we need to agree together about the approach before writing it.
For now, I just created a draft page to showcase the new extended cards:
I used the prefix
experimental/, but this must be changed.I have some proposals for the prefix:
extended/,custom/,advanced/,hx/.Maybe the CSS is a bit messy, but the render is right (maybe some padding needs to be adjusted)
Note: I mainly copied existing CSS classes from partials into the CSS file.
Fixes #797