Grid cards with entire card body as a clickable link #8468
Replies: 2 comments · 2 replies
-
This issue seems relevant: #6269 |
Beta Was this translation helpful? Give feedback.
-
There are likely a number of ways to accomplish what you want. The problem with just wrapping these blocks with anchors is that nested anchors make a mess, and browsers likely won't render everything like you expect. Python Markdown There is this extension (https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/html/) which works generally better in these situations.
Granted, I still wouldn't use sublinks as they'll be overridden by the div link, but it will render well. Again, there are likely other approaches as well. I imagine there may be changes in the future foundational work that may make this easier or more intuitive, but I have no idea, as it isn't available yet: #8461 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all 👋
I'm trying to update the grid card, complex example from the docs, but making the entire hovering card body into a clickable link. I'm trying to replicate the square grid cards at https://cuelang.org/docs/#how-to-use-this-documentation (not yet built using MkDocs!), where there's formatting inside each card and clicking on any part of the card follows its link.
No mixture of
<div class="grid cards" markdown>
<a href="#" class="card" style="display: block;">
... or similar seems to make this work. I can cause all the text inside a card to be a link, but that doesn't result in the card's whitespace being clickable.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions