From: Jeremy Thomas Date: Tue, 13 Feb 2018 11:15:12 +0000 (+0000) Subject: Fix #1570 X-Git-Tag: 0.7.0~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25631eedb406197dec0f232b3765070ebdd4d665;p=thirdparty%2Fbulma.git Fix #1570 --- diff --git a/docs/_javascript/main.js b/docs/_javascript/main.js index 9a05f1fd8..df05457c2 100644 --- a/docs/_javascript/main.js +++ b/docs/_javascript/main.js @@ -152,11 +152,13 @@ document.addEventListener('DOMContentLoaded', () => { }); } - new Clipboard('.bd-copy', { - target: function(trigger) { - return trigger.previousSibling; - } - }); + setTimeout(() => { + new Clipboard('.bd-copy', { + target: trigger => { + return trigger.previousElementSibling.firstElementChild; + } + }); + }, 100); // Functions diff --git a/docs/lib/main.js b/docs/lib/main.js index 739427b79..172dcd17b 100644 --- a/docs/lib/main.js +++ b/docs/lib/main.js @@ -111,7 +111,7 @@ document.addEventListener('DOMContentLoaded', function () { var $parent = $el.parentNode; if ($parent && $parent.classList.contains('bd-is-more')) { - var showEl = ''; + var showEl = ''; $el.insertAdjacentHTML('beforeend', showEl); } else if ($el.firstElementChild.scrollHeight > 480 && $el.firstElementChild.clientHeight <= 480) { $el.insertAdjacentHTML('beforeend', expandEl); @@ -154,11 +154,13 @@ document.addEventListener('DOMContentLoaded', function () { }); } - new Clipboard('.bd-copy', { - target: function target(trigger) { - return trigger.previousSibling; - } - }); + setTimeout(function () { + new Clipboard('.bd-copy', { + target: function target(trigger) { + return trigger.previousElementSibling.firstElementChild; + } + }); + }, 100); // Functions diff --git a/docs/lib/navbar.js b/docs/lib/navbar.js index bd3404d85..dd33795ef 100644 --- a/docs/lib/navbar.js +++ b/docs/lib/navbar.js @@ -14,12 +14,12 @@ document.addEventListener('DOMContentLoaded', function () { if (fixedBottom) { 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'); navbarBottomEl.classList.remove('is-hidden'); } else { fixBottomEl.className = 'button is-link'; - fixBottomElIcon.className = 'fa fa-square-o'; + fixBottomElIcon.className = 'far fa-square'; rootEl.classList.remove('has-navbar-fixed-bottom'); navbarBottomEl.classList.add('is-hidden'); }