Browse Source

:sparkles: add copy-code-button plugin

nick 7 years ago
parent
commit
b94ef139ca
2 changed files with 8 additions and 1 deletions
  1. 2 1
      book.json
  2. 6 0
      styles/website.css

+ 2 - 1
book.json

@@ -26,7 +26,8 @@
         "search",
         "search-pro",
         "disqus",
-        "page-footer-ex"
+        "page-footer-ex",
+        "copy-code-button"
     ],
     "pluginsConfig": {
         "page-footer-ex": {

+ 6 - 0
styles/website.css

@@ -16,3 +16,9 @@ li.chapter {
 .book-body {
     font-size: 1.5rem !important;
 }
+.copy-code-button {
+    display: none;
+}
+pre:hover > .copy-code-button {
+    display: block;
+}