Merge branch 'ppoffice:master' into patch-1
commit
f853488105
|
@ -13,7 +13,7 @@ figure.highlight
|
||||||
&.folded
|
&.folded
|
||||||
.highlight-body
|
.highlight-body
|
||||||
height: 0
|
height: 0
|
||||||
|
|
||||||
.copy
|
.copy
|
||||||
opacity: .7
|
opacity: .7
|
||||||
|
|
||||||
|
@ -90,6 +90,10 @@ figure.highlight
|
||||||
min-width: inherit
|
min-width: inherit
|
||||||
border-radius: inherit
|
border-radius: inherit
|
||||||
|
|
||||||
|
figure.highlight.foldable
|
||||||
|
div.level-left
|
||||||
|
cursor: pointer // clicking the codeblock filename can toggle folding
|
||||||
|
|
||||||
/* ---------------------------------
|
/* ---------------------------------
|
||||||
* Fix Gist Snippet
|
* Fix Gist Snippet
|
||||||
* --------------------------------- */
|
* --------------------------------- */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hexo-theme-icarus",
|
"name": "hexo-theme-icarus",
|
||||||
"version": "5.0.0-rc.1",
|
"version": "5.0.1",
|
||||||
"author": "ppoffice <ppoffice@users.noreply.github.com>",
|
"author": "ppoffice <ppoffice@users.noreply.github.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A simple, delicate, and modern theme for Hexo",
|
"description": "A simple, delicate, and modern theme for Hexo",
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
"bulma-stylus": "0.8.0",
|
"bulma-stylus": "0.8.0",
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge": "^4.2.2",
|
||||||
"hexo": "^6.0.0",
|
"hexo": "^6.0.0",
|
||||||
"hexo-component-inferno": "^1.1.0",
|
"hexo-component-inferno": "^1.2.0",
|
||||||
"hexo-log": "^3.0.0",
|
"hexo-log": "^3.0.0",
|
||||||
"hexo-pagination": "^2.0.0",
|
"hexo-pagination": "^2.0.0",
|
||||||
"hexo-renderer-inferno": "^0.1.3",
|
"hexo-renderer-inferno": "^0.1.3",
|
||||||
|
|
|
@ -98,6 +98,8 @@
|
||||||
|
|
||||||
if (fold) {
|
if (fold) {
|
||||||
$('figure.highlight').each(function() {
|
$('figure.highlight').each(function() {
|
||||||
|
$(this).addClass('foldable'); // add 'foldable' class as long as fold is enabled
|
||||||
|
|
||||||
if ($(this).find('figcaption').find('span').length > 0) {
|
if ($(this).find('figcaption').find('span').length > 0) {
|
||||||
const span = $(this).find('figcaption').find('span');
|
const span = $(this).find('figcaption').find('span');
|
||||||
if (span[0].innerText.indexOf('>folded') > -1) {
|
if (span[0].innerText.indexOf('>folded') > -1) {
|
||||||
|
@ -111,7 +113,7 @@
|
||||||
toggleFold(this, fold === 'folded');
|
toggleFold(this, fold === 'folded');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('figure.highlight figcaption .fold').click(function() {
|
$('figure.highlight figcaption .level-left').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'));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue