]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix #1570
authorJeremy Thomas <bbxdesign@gmail.com>
Tue, 13 Feb 2018 11:15:12 +0000 (11:15 +0000)
committerJeremy Thomas <bbxdesign@gmail.com>
Tue, 13 Feb 2018 11:15:12 +0000 (11:15 +0000)
docs/_javascript/main.js
docs/lib/main.js
docs/lib/navbar.js

index 9a05f1fd81d5fa12829a3cea412e75f0cef5a20a..df05457c251d2a5a8c3538e38cb3e590752cb6bc 100644 (file)
@@ -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
 
index 739427b7975e7864f93e9dd33521be91c6fcfb73..172dcd17b452aa08ea078fb48802525df0701e8f 100644 (file)
@@ -111,7 +111,7 @@ document.addEventListener('DOMContentLoaded', function () {
 
       var $parent = $el.parentNode;
       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);
       } 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
 
index bd3404d854df8c4509908d1f87f8471f4bf57e84..dd33795ef94e372e7ce1fe6fd693c01cd8f416cb 100644 (file)
@@ -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');
     }