diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 50ddb9b..c7c3958 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -9,6 +9,7 @@
+
diff --git a/package.json b/package.json
index a891234..1175367 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
},
"dependencies": {
"bootstrap": "4.0.0-beta.2",
+ "clipboard": "1.7.1",
"font-awesome": "4.7.0",
"jquery": "3.2.1",
"lg-thumbnail": "1.1.0",
diff --git a/static/src/js/index.js b/static/src/js/index.js
index c6ea6ef..b20dc9c 100644
--- a/static/src/js/index.js
+++ b/static/src/js/index.js
@@ -3,10 +3,12 @@
require('./jquery-global');
require('bootstrap');
+
require('lightgallery/dist/js/lightgallery');
require('lg-thumbnail/dist/lg-thumbnail');
require('plyr').setup();
+var Clipboard = require('clipboard');
$('.image').each(function () { // setup div-image hybrids
@@ -49,3 +51,14 @@ $('.navbar-brand').on('click', function (event) {
}
event.preventDefault();
});
+
+var clipboard = new Clipboard('a');
+clipboard.on('success', function (e) {
+ var ele = $(e.trigger);
+ ele.find('i').attr('class', 'fa fa-check');
+ ele.attr('title', 'Copied!');
+});
+
+$('[data-clipboard-text]').on('click', function (event) {
+ event.preventDefault();
+});