[FIX] expandable code in compiled rippled-apis page; linebreaks in pre>code

This commit is contained in:
mDuo13
2014-09-11 11:58:13 -07:00
parent c9474d8269
commit 7c8d0396a6
3 changed files with 10 additions and 2 deletions

View File

@@ -54,6 +54,10 @@ body .content-root {
margin-top: -50px; margin-top: -50px;
} }
.content pre code {
white-space: pre;
}
.menubar { .menubar {
padding-top: 10px; padding-top: 10px;
} }

View File

@@ -1,6 +1,8 @@
$(document).on('flatdoc:ready', function() { function make_code_expandable() {
$('code').dblclick(function(eo) { $('code').dblclick(function(eo) {
$(eo.target).toggleClass('expanded'); $(eo.target).toggleClass('expanded');
}); });
$('code').attr('title', 'Double-click to expand/collapse'); $('code').attr('title', 'Double-click to expand/collapse');
}); }
$(document).on('flatdoc:ready', make_code_expandable);

View File

@@ -77,8 +77,10 @@ mixpanel.init("132d42885e094171f34467fc54da6fab");
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$(".multicode").minitabs() $(".multicode").minitabs()
make_code_expandable();
}); });
</script> </script>
<!--end alt code for compiled page -->
<link type="text/css" rel="stylesheet" href="css/mod.css"> <link type="text/css" rel="stylesheet" href="css/mod.css">
<script src="js/expandcode.js"></script> <script src="js/expandcode.js"></script>
<script src="js/fixsidebarscroll.js"></script> <script src="js/fixsidebarscroll.js"></script>