Created
April 3, 2019 13:00
-
-
Save harrybeckwith/5e50900285a043d30c92df2f93799a6e to your computer and use it in GitHub Desktop.
app.vue file for full working version
This file contains 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> | |
<section> | |
<h2>Light box</h2> | |
<LightBox | |
:thumbnails="lightbox.images.thumbnails" | |
:largeImages="lightbox.images.large" | |
:thumbnailsPath="lightbox.thumbnailsPath" | |
:largePath="lightbox.largePath" | |
:captions="lightbox.captions" | |
class="lightBox" | |
/> | |
<hr> | |
</section> | |
</template> | |
<script> | |
import LightBox from "@/components/LightBox.vue"; | |
export default { | |
name: "app", | |
data() { | |
return { | |
lightbox: { | |
images: { | |
thumbnails: ["1.jpg", "2.jpg", "3.jpg"], | |
large: ["1.jpg", "2.jpg", "3.jpg"] | |
}, | |
captions: ["caption 1", "caption 2", "caption 3"], | |
thumbnailsPath: "/img/sea/thumbnails/", | |
largePath: "/img/sea/large/" | |
} | |
}; | |
}, | |
components: { | |
LightBox | |
} | |
}; | |
</script> | |
<style lang ="scss"> | |
.light-box { | |
&__thumbnail { | |
margin: 20px; | |
width: 200px; | |
} | |
} | |
img { | |
max-width: 100%; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment