Last active
April 2, 2019 16:43
-
-
Save harrybeckwith/d3e36356606667d6094cc56a2d346e1e to your computer and use it in GitHub Desktop.
lightbox basics template inside lightbox.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <img | |
| @click="lightboxEffect(index)" | |
| v-for="(thumbnail, index) in thumbnails" | |
| :key="thumbnail" | |
| :src="thumbnailsPath + thumbnail" | |
| class="light-box__thumbnail" | |
| > | |
| <div @click.stop="bg = !bg" class="light-box__bg" v-if="bg"></div> | |
| <div v-if="bg" class="light-box__container"> | |
| <div @click="prev" class="light-box__prev light-box__btn"></div> | |
| <div :key="currentImage"> | |
| <img :src="largePath + [currentImage + 1] +'.jpg'" class="light-box__container__img"> | |
| </div> | |
| <div @click="next" class="light-box__next light-box__btn"></div> | |
| </div> | |
| </div> | |
| </template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment