This commit is contained in:
Jeremy Thomas
2018-02-13 11:15:12 +00:00
parent 868bc4168b
commit 25631eedb4
3 changed files with 17 additions and 13 deletions

View File

@@ -152,11 +152,13 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
} }
new Clipboard('.bd-copy', { setTimeout(() => {
target: function(trigger) { new Clipboard('.bd-copy', {
return trigger.previousSibling; target: trigger => {
} return trigger.previousElementSibling.firstElementChild;
}); }
});
}, 100);
// Functions // Functions

View File

@@ -111,7 +111,7 @@ document.addEventListener('DOMContentLoaded', function () {
var $parent = $el.parentNode; var $parent = $el.parentNode;
if ($parent && $parent.classList.contains('bd-is-more')) { if ($parent && $parent.classList.contains('bd-is-more')) {
var showEl = '<button class="bd-show"><div><span class="icon"><i class="fa fa-code"></i></span> <strong>Show code</strong></div></button>'; var showEl = '<button class="bd-show"><div><span class="icon"><i class="fas fa-code"></i></span> <strong>Show code</strong></div></button>';
$el.insertAdjacentHTML('beforeend', showEl); $el.insertAdjacentHTML('beforeend', showEl);
} else if ($el.firstElementChild.scrollHeight > 480 && $el.firstElementChild.clientHeight <= 480) { } else if ($el.firstElementChild.scrollHeight > 480 && $el.firstElementChild.clientHeight <= 480) {
$el.insertAdjacentHTML('beforeend', expandEl); $el.insertAdjacentHTML('beforeend', expandEl);
@@ -154,11 +154,13 @@ document.addEventListener('DOMContentLoaded', function () {
}); });
} }
new Clipboard('.bd-copy', { setTimeout(function () {
target: function target(trigger) { new Clipboard('.bd-copy', {
return trigger.previousSibling; target: function target(trigger) {
} return trigger.previousElementSibling.firstElementChild;
}); }
});
}, 100);
// Functions // Functions

View File

@@ -14,12 +14,12 @@ document.addEventListener('DOMContentLoaded', function () {
if (fixedBottom) { if (fixedBottom) {
fixBottomEl.className = 'button is-success'; fixBottomEl.className = 'button is-success';
fixBottomElIcon.className = 'fa fa-check-square-o'; fixBottomElIcon.className = 'far fa-check-square';
rootEl.classList.add('has-navbar-fixed-bottom'); rootEl.classList.add('has-navbar-fixed-bottom');
navbarBottomEl.classList.remove('is-hidden'); navbarBottomEl.classList.remove('is-hidden');
} else { } else {
fixBottomEl.className = 'button is-link'; fixBottomEl.className = 'button is-link';
fixBottomElIcon.className = 'fa fa-square-o'; fixBottomElIcon.className = 'far fa-square';
rootEl.classList.remove('has-navbar-fixed-bottom'); rootEl.classList.remove('has-navbar-fixed-bottom');
navbarBottomEl.classList.add('is-hidden'); navbarBottomEl.classList.add('is-hidden');
} }