Merge branch 'ppoffice:master' into patch-1

This commit is contained in:
Nofated 2022-07-21 18:31:40 +08:00 committed by GitHub
commit f853488105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -90,6 +90,10 @@ figure.highlight
min-width: inherit
border-radius: inherit
figure.highlight.foldable
div.level-left
cursor: pointer // clicking the codeblock filename can toggle folding
/* ---------------------------------
* Fix Gist Snippet
* --------------------------------- */

View File

@ -1,6 +1,6 @@
{
"name": "hexo-theme-icarus",
"version": "5.0.0-rc.1",
"version": "5.0.1",
"author": "ppoffice <ppoffice@users.noreply.github.com>",
"license": "MIT",
"description": "A simple, delicate, and modern theme for Hexo",
@ -30,7 +30,7 @@
"bulma-stylus": "0.8.0",
"deepmerge": "^4.2.2",
"hexo": "^6.0.0",
"hexo-component-inferno": "^1.1.0",
"hexo-component-inferno": "^1.2.0",
"hexo-log": "^3.0.0",
"hexo-pagination": "^2.0.0",
"hexo-renderer-inferno": "^0.1.3",

View File

@ -98,6 +98,8 @@
if (fold) {
$('figure.highlight').each(function() {
$(this).addClass('foldable'); // add 'foldable' class as long as fold is enabled
if ($(this).find('figcaption').find('span').length > 0) {
const span = $(this).find('figcaption').find('span');
if (span[0].innerText.indexOf('>folded') > -1) {
@ -111,7 +113,7 @@
toggleFold(this, fold === 'folded');
});
$('figure.highlight figcaption .fold').click(function() {
$('figure.highlight figcaption .level-left').click(function() {
const $code = $(this).closest('figure.highlight');
toggleFold($code.eq(0), !$code.hasClass('folded'));
});