diff --git a/components/SingleBlogPost.vue b/components/SingleBlogPost.vue
index b082bde..de25f77 100644
--- a/components/SingleBlogPost.vue
+++ b/components/SingleBlogPost.vue
@@ -25,7 +25,7 @@
-
+
Share :
@@ -153,6 +153,9 @@ export default {
},
mounted() {
window.addEventListener('scroll', this.trackProgress)
+ window.lightGallery(document.getElementById('entry-content'), {
+ selector: 'img'
+ })
this.nativeShare = !!navigator.share
const { enableComments } = this.$props
if (!enableComments) return
diff --git a/nuxt.config.js b/nuxt.config.js
index 3487357..0ef241f 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -38,7 +38,8 @@ module.exports = {
{ src: '~/plugins/toastr-init', mode: 'client' },
{ src: '~/plugins/aos', mode: 'client' },
{ src: '~/plugins/removePreloader', mode: 'client' },
- { src: '~/plugins/lazysizes-client.js', mode: 'client' }
+ { src: '~/plugins/lazysizes-client.js', mode: 'client' },
+ { src: '~/plugins/lightgallery-client.js', mode: 'client' }
],
/*
** Nuxt.js dev-modules
diff --git a/package.json b/package.json
index a9e72a4..a2bca2f 100644
--- a/package.json
+++ b/package.json
@@ -38,6 +38,7 @@
"js-cookie": "^2.2.1",
"jsonwebtoken": "^8.5.1",
"lazysizes": "^5.2.2",
+ "lightgallery.js": "^1.4.0",
"mongoose": "^5.8.10",
"multer": "^1.4.2",
"nuxt": "^2.0.0",
diff --git a/plugins/lightgallery-client.js b/plugins/lightgallery-client.js
new file mode 100644
index 0000000..b617bd4
--- /dev/null
+++ b/plugins/lightgallery-client.js
@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import lightgallery from 'lightgallery.js'
+import 'lightgallery.js/dist/css/lightgallery.min.css'
+
+Vue.use(lightgallery)
diff --git a/yarn.lock b/yarn.lock
index 6c2a3c7..7ec1152 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6980,6 +6980,11 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
+lightgallery.js@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/lightgallery.js/-/lightgallery.js-1.4.0.tgz#f4b43b01b2acce43bd7e6d8dbcf1d5541cd2fb03"
+ integrity sha512-TK7auNMSz0sPjotq/VtKH/fe8GPkVRlmFf8F3zVsbFccLJL4r3U1VON+IggyE8Wy04QwbFQxTIIMqL7blibGSA==
+
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"