Merge branch 'master' of github.com:azerupi/mdBook

This commit is contained in:
Mathieu David 2017-06-18 19:21:08 +02:00
commit 49336e0698
5 changed files with 13 additions and 4 deletions

View File

@ -137,6 +137,7 @@ table thead td {
right: 0; right: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
outline: 0;
padding-right: 15px; padding-right: 15px;
overflow-y: auto; overflow-y: auto;
} }
@ -408,6 +409,7 @@ table thead td {
} }
.light pre > .buttons { .light pre > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;
color: #364149; color: #364149;
@ -527,6 +529,7 @@ table thead td {
} }
.coal pre > .buttons { .coal pre > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;
color: #a1adb8; color: #a1adb8;
@ -646,6 +649,7 @@ table thead td {
} }
.navy pre > .buttons { .navy pre > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;
color: #c8c9db; color: #c8c9db;
@ -765,6 +769,7 @@ table thead td {
} }
.rust pre > .buttons { .rust pre > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;
color: #c8c9db; color: #c8c9db;
@ -884,6 +889,7 @@ table thead td {
} }
.ayu pre > .buttons { .ayu pre > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;
color: #c8c9db; color: #c8c9db;

View File

@ -52,8 +52,9 @@ $( document ).ready(function() {
// Interesting DOM Elements // Interesting DOM Elements
var sidebar = $("#sidebar"); var sidebar = $("#sidebar");
var page_wrapper = $("#page-wrapper");
var content = $("#content"); // Help keyboard navigation by always focusing on page content
$(".page").focus();
// Toggle sidebar // Toggle sidebar
$("#sidebar-toggle").click(sidebarToggle); $("#sidebar-toggle").click(sidebarToggle);
@ -201,7 +202,7 @@ $( document ).ready(function() {
var clipboardSnippets = new Clipboard('.clip-button', { var clipboardSnippets = new Clipboard('.clip-button', {
text: function(trigger) { text: function(trigger) {
hideTooltip(trigger); hideTooltip(trigger);
return trigger.parentElement.parentElement.textContent; return $(trigger).parents(".playpen").find("code.language-rust.hljs")[0].textContent;
} }
}); });
clipboardSnippets.on('success', function(e) { clipboardSnippets.on('success', function(e) {

View File

@ -76,7 +76,7 @@
<div id="page-wrapper" class="page-wrapper"> <div id="page-wrapper" class="page-wrapper">
<div class="page"> <div class="page" tabindex="-1">
<div id="menu-bar" class="menu-bar"> <div id="menu-bar" class="menu-bar">
<div class="left-buttons"> <div class="left-buttons">
<i id="sidebar-toggle" class="fa fa-bars"></i> <i id="sidebar-toggle" class="fa fa-bars"></i>

View File

@ -35,6 +35,7 @@
right: 0 right: 0
left: 0 left: 0
bottom: 0 bottom: 0
outline: 0
padding-right: 15px padding-right: 15px
overflow-y: auto overflow-y: auto

View File

@ -117,6 +117,7 @@
& > .buttons { & > .buttons {
position: absolute; position: absolute;
z-index: 100;
right: 5px; right: 5px;
top: 5px; top: 5px;