Fixes "Hide Code" Engine & Style

This commit is contained in:
LeoColomb 2014-02-16 23:06:28 +01:00
parent 69af0ec703
commit c8f21efd4a
6 changed files with 26 additions and 44 deletions

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

View File

@ -1,5 +1,5 @@
$(function() {
$('.aj-nav').click(function(e) {
$(function () {
$('.aj-nav').click(function (e) {
e.preventDefault();
$(this).parent().siblings().find('ul').slideUp();
$(this).next().slideToggle();
@ -9,12 +9,12 @@ $(function() {
$('table').addClass('table');
// Responsive menu spinner
$('#menu-spinner-button').click(function() {
$('#menu-spinner-button').click(function () {
$('#sub-nav-collapse').slideToggle();
});
// Catch browser resize
$(window).resize(function() {
$(window).resize(function () {
// Remove transition inline style on large screens
if ($(window).width() >= 768)
$('#sub-nav-collapse').removeAttr('style');
@ -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";
}
}

View File

@ -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;
}
}
}
}