Skip to content

Commit

Permalink
Merge pull request #9 from abhi12299/lightbox
Browse files Browse the repository at this point in the history
lightgallery added
  • Loading branch information
abhi12299 authored Jan 9, 2021
2 parents 97a1a14 + 8da431e commit 7740924
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion components/SingleBlogPost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<!-- Part 3 content -->
<div class="col-lg-8 offset-lg-2 bottom-border">
<div v-html="blogPostbody" class="entry-content" />
<div id="entry-content" v-html="blogPostbody" class="entry-content" />
<div class="entry-share-div">
<h5>Share :</h5>
<ul class="social-text light list-inline">
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions plugins/lightgallery-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Vue from 'vue'
import lightgallery from 'lightgallery.js'
import 'lightgallery.js/dist/css/lightgallery.min.css'

Vue.use(lightgallery)
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7740924

Please sign in to comment.