ppoffice / hexo-theme-icarus

A simple, delicate, and modern theme for the static site generator Hexo.
https://ppoffice.github.io/hexo-theme-icarus/
MIT License
6.28k stars 1.54k forks source link

Make codeblock fold/unfold use a larger clickable area #1072

Closed ppwwyyxx closed 2 years ago

ppwwyyxx commented 2 years ago

Before this change, for codeblocks with folding enabled, users have to click the small arrow to toggle fold/unfold: 2022-05-07_14-09

I find it very difficult to click since it's too small.

After this PR, clicking anywhere in the div below would toggle fold/unfold: 2022-05-07_15-38

The hyperlink and copy button on the right is unaffected.

Also changed the cursor style to pointer, for this div.

When folding is disabled, the cursor style stays unchanged - this is a use case of https://github.com/ppoffice/hexo-theme-icarus/pull/1071

This is only my personal opinion, so feel free to dismiss it, and I can keep it in my own customization.

ppoffice commented 2 years ago

@ppwwyyxx Will the hyperlink in the header section and the copy code button still work? image

ppwwyyxx commented 2 years ago

Thanks for your feedback. In order to keep hyperlink and copy button working, I changed the toggle area to be the filename only. I updated the PR description.