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
49
js/custom.js
49
js/custom.js
|
@ -1,24 +1,24 @@
|
||||||
$(function() {
|
$(function () {
|
||||||
$('.aj-nav').click(function(e) {
|
$('.aj-nav').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).parent().siblings().find('ul').slideUp();
|
$(this).parent().siblings().find('ul').slideUp();
|
||||||
$(this).next().slideToggle();
|
$(this).next().slideToggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bootstrap Table Class
|
// Bootstrap Table Class
|
||||||
$('table').addClass('table');
|
$('table').addClass('table');
|
||||||
|
|
||||||
// Responsive menu spinner
|
// Responsive menu spinner
|
||||||
$('#menu-spinner-button').click(function() {
|
$('#menu-spinner-button').click(function () {
|
||||||
$('#sub-nav-collapse').slideToggle();
|
$('#sub-nav-collapse').slideToggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Catch browser resize
|
// Catch browser resize
|
||||||
$(window).resize(function() {
|
$(window).resize(function () {
|
||||||
// Remove transition inline style on large screens
|
// Remove transition inline style on large screens
|
||||||
if ($(window).width() >= 768)
|
if ($(window).width() >= 768)
|
||||||
$('#sub-nav-collapse').removeAttr('style');
|
$('#sub-nav-collapse').removeAttr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//Fix GitHub Ribbon overlapping Scrollbar
|
//Fix GitHub Ribbon overlapping Scrollbar
|
||||||
|
@ -30,23 +30,18 @@ function toggleCodeBlocks() {
|
||||||
t = (t + 1) % 3;
|
t = (t + 1) % 3;
|
||||||
localStorage.setItem("toggleCodeStats", t);
|
localStorage.setItem("toggleCodeStats", t);
|
||||||
var a = $('.content-page article');
|
var a = $('.content-page article');
|
||||||
var b = a.children();
|
var c = a.children().filter('pre');
|
||||||
var c = b.filter('pre');
|
|
||||||
var d = $('.right-column');
|
var d = $('.right-column');
|
||||||
if (d.hasClass('float-view')) {
|
if (d.hasClass('float-view')) {
|
||||||
d.removeClass('float-view');
|
d.removeClass('float-view');
|
||||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Hide Code Blocks";
|
$('#toggleCodeBlockBtn')[0].innerHTML = "Hide Code Blocks";
|
||||||
} else {
|
} else {
|
||||||
if (a.hasClass('hideCode')) {
|
if (c.hasClass('hidden')) {
|
||||||
d.addClass('float-view');
|
d.addClass('float-view');
|
||||||
a.removeClass('hideCode');
|
c.removeClass('hidden');
|
||||||
b.removeClass('hideCode2');
|
|
||||||
c.removeClass('hideCode3');
|
|
||||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks Inline";
|
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks Inline";
|
||||||
} else {
|
} else {
|
||||||
a.addClass('hideCode');
|
c.addClass('hidden');
|
||||||
b.addClass('hideCode2');
|
|
||||||
c.addClass('hideCode3');
|
|
||||||
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks";
|
$('#toggleCodeBlockBtn')[0].innerHTML = "Show Code Blocks";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,10 +217,6 @@ pre {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideCode:before {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
table {
|
||||||
float: left;
|
float: left;
|
||||||
clear: left;
|
clear: left;
|
||||||
|
@ -262,11 +258,6 @@ pre {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideCode2 {
|
|
||||||
width: 900px !important;
|
|
||||||
width: calc(100% - 130px) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul, ol {
|
ul, ol {
|
||||||
li {
|
li {
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
|
@ -282,10 +273,6 @@ pre {
|
||||||
margin: 0px 0px 10px 0px;
|
margin: 0px 0px 10px 0px;
|
||||||
padding: 0px 0px 0px 10px;
|
padding: 0px 0px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
hideCode3 {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue