make codeblock folding has a larger clickable area

pull/1072/head
Yuxin Wu 2022-05-07 14:07:26 -07:00
parent 30efe838c5
commit 9f25b62e8c
2 changed files with 10 additions and 2 deletions

View File

@ -90,6 +90,14 @@ figure.highlight
min-width: inherit min-width: inherit
border-radius: inherit border-radius: inherit
figure.highlight.folded
figcaption
cursor: pointer
figure.highlight.unfolded
figcaption
cursor: pointer
/* --------------------------------- /* ---------------------------------
* Fix Gist Snippet * Fix Gist Snippet
* --------------------------------- */ * --------------------------------- */

View File

@ -111,7 +111,7 @@
toggleFold(this, fold === 'folded'); toggleFold(this, fold === 'folded');
}); });
$('figure.highlight figcaption .fold').click(function() { $('figure.highlight figcaption').click(function() {
const $code = $(this).closest('figure.highlight'); const $code = $(this).closest('figure.highlight');
toggleFold($code.eq(0), !$code.hasClass('folded')); toggleFold($code.eq(0), !$code.hasClass('folded'));
}); });