crimethinc / website

Ruby on Rails app that powers crimethinc.com
https://crimethinc.com
Creative Commons Zero v1.0 Universal
103 stars 31 forks source link

Regression: click area on story cards #518

Closed veganstraightedge closed 6 years ago

veganstraightedge commented 7 years ago

https://github.com/crimethinc/website/commit/525782272c80004994ab1a26de6c1521b6d0e357

Something in this commit made only the text clickable instead of the background image area too.

Can you see about restoring the click area?

gesa commented 7 years ago

in that case, i think we should revert. i'm not sure I know what you want here—there are several anchors in each article. i'll have to take a look with fresh eyes after reverting.

veganstraightedge commented 7 years ago

I’m ok with leaving it as is. I love the squares. Maybe I should reframe this issue as a feature not a regression.

gesa commented 6 years ago

it would be best-best if this could all be one anchor tag, but idk how to do that here: https://github.com/crimethinc/website/blob/9b26f4a07b458e5cbcfa29ea02b9e2785f1d99a6/app/views/articles/_titles.html.erb#L4-L17

gesa commented 6 years ago

(as in, the following)

<a><h1>Title text</h1><h2>Subtitle text</h2></a>
gesa commented 6 years ago

I stand by what I said but also 4973304 is a fix that gives square story cards on small viewports (320px-480px, most phones in portrait) that are a link throughout. Do me a favor and check it out before I push it; tonight I discovered I had introduced a MASSIVE bug the last time I solved this problem so I'm super glad I knee-jerk reverted it.

veganstraightedge commented 6 years ago

Are block level <a> tags well supported these days in modern browsers?

If so, we can move the link_to_if to wrap around the h1 and h2 tags. I can pair with you on it if you want.

veganstraightedge commented 6 years ago

re: 4973304. It worked great for the square cards, but yeah it moved the categories to weird places, it made the admin bars background seemingly clickable to the latest article and it produced a massive amount of whitespace on the right of the site.