Fixes "Hide Code" Engine & Style
This commit is contained in:
parent
69af0ec703
commit
c8f21efd4a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
13
js/custom.js
13
js/custom.js
|
@ -30,23 +30,18 @@ function toggleCodeBlocks() {
|
|||
t = (t + 1) % 3;
|
||||
localStorage.setItem("toggleCodeStats", t);
|
||||
var a = $('.content-page article');
|
||||
var b = a.children();
|
||||
var c = b.filter('pre');
|
||||
var c = a.children().filter('pre');
|
||||
var d = $('.right-column');
|
||||
if (d.hasClass('float-view')) {
|
||||
d.removeClass('float-view');
|
||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Hide Code Blocks";
|
||||
} else {
|
||||
if (a.hasClass('hideCode')) {
|
||||
if (c.hasClass('hidden')) {
|
||||
d.addClass('float-view');
|
||||
a.removeClass('hideCode');
|
||||
b.removeClass('hideCode2');
|
||||
c.removeClass('hideCode3');
|
||||
c.removeClass('hidden');
|
||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks Inline";
|
||||
} else {
|
||||
a.addClass('hideCode');
|
||||
b.addClass('hideCode2');
|
||||
c.addClass('hideCode3');
|
||||
c.addClass('hidden');
|
||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,10 +217,6 @@ pre {
|
|||
}
|
||||
}
|
||||
|
||||
.hideCode:before {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
table {
|
||||
float: left;
|
||||
clear: left;
|
||||
|
@ -262,11 +258,6 @@ pre {
|
|||
}
|
||||
}
|
||||
|
||||
.hideCode2 {
|
||||
width: 900px !important;
|
||||
width: calc(100% - 130px) !important;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
li {
|
||||
margin-left: 30px;
|
||||
|
@ -282,10 +273,6 @@ pre {
|
|||
margin: 0px 0px 10px 0px;
|
||||
padding: 0px 0px 0px 10px;
|
||||
}
|
||||
|
||||
hideCode3 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue