bowman2001 / perplex

A Hugo theme to publish technical content (docs, news, blog, articles)
https://perplex.desider.at
Apache License 2.0
27 stars 11 forks source link

Links in summaries cause cards to be misplaced #154

Closed danielfdickinson closed 7 months ago

danielfdickinson commented 7 months ago

I noticed that after updating to v0.19.0 that links in summaries[1] cause e.g. the blog page to have those cards out of place.

[1]: E.g.

…
toc: true
---

When I have links in summaries on [Princes and Madmen](https://www.princesandmadmen.ca)
the list page cards 'jump' out of place.
{.p-first}
<!--more-->

I have worked around this using a frontmatter summary that doesn't have the link.

bowman2001 commented 7 months ago

Yes, unfortunately, I did forget that links inside of links are impossible. It's obvious when you think about it, but I was in a hurry when I changed the whole card frame into a link. Now, an additional link inside a card breaks the HTML structure.

There are two ways out of this:

  1. Avoid links for text in cards.

  2. Remove the link for the card frame and link the appropriate elements on the card to the posting (image, heading, and button).

For small cards showing the description value as small text, I will implement option 1.

For bigger ones with a button I will implement option 2.