Skip to content

Commit 6358c38

Browse files
committed
Adapt styling
1 parent 774a8f6 commit 6358c38

File tree

3 files changed

+36
-33
lines changed

3 files changed

+36
-33
lines changed

src/App.vue

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
11
<template>
2-
<Lightbox
2+
<Lightbox
33
class="lb-demo"
44
:thumbnail="thumbnail"
55
:images="images"
6-
>
6+
>
77
<LightboxDefaultLoader slot="loader" />
88
<div slot="content" slot-scope="{ url }">
9-
<iframe
10-
v-if="url.includes('youtube') || url.includes('youtu.be')"
11-
:src="url"
12-
frameborder="0"
13-
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14-
allowfullscreen
15-
style="width: 100%; height: 90vh;"
16-
/>
17-
<img v-else :src="url">
9+
<iframe
10+
v-if="url.includes('youtube') || url.includes('youtu.be')"
11+
:src="url"
12+
frameborder="0"
13+
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14+
allowfullscreen
15+
style="width: 100%; height: 90vh;"
16+
/>
17+
<img v-else :src="url">
1818
</div>
19-
</Lightbox>
19+
</Lightbox>
2020
</template>
2121

2222
<script>
23-
import Lightbox, { LightboxDefaultLoader } from './Components/Lightbox.vue'
23+
import Lightbox, { LightboxDefaultLoader } from './Components/Lightbox.vue'
2424
25-
export default {
26-
components: { Lightbox, LightboxDefaultLoader, },
25+
export default {
26+
components: {
27+
Lightbox,
28+
LightboxDefaultLoader,
29+
},
2730
data() {
28-
return {
29-
thumbnail: "http://placekitten.com/g/100/100",
30-
images: [
31-
"http://placekitten.com/g/200/300",
32-
"http://placekitten.com/g/600/400",
33-
"https://bit.ly/2r8tNLH",
34-
"https://www.youtube.com/watch?v=Z4j5rJQMdOU",
35-
]
36-
}
31+
return {
32+
thumbnail: "http://placekitten.com/g/100/100",
33+
images: [
34+
"http://placekitten.com/g/200/300",
35+
"http://placekitten.com/g/600/400",
36+
"https://bit.ly/2r8tNLH",
37+
"https://www.youtube.com/watch?v=Z4j5rJQMdOU",
38+
]
39+
}
3740
}
38-
}
41+
}
3942
</script>
4043

41-
<style>
42-
.lb-demo {
44+
<style scoped>
45+
.lb-demo {
4346
height: 100px;
4447
width: 100px;
45-
}
46-
</style>
48+
}
49+
</style>

src/Components/Lightbox.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
<script>
4848
import Vue from 'vue'
49-
5049
import LightboxDefaultLoader from './LightboxDefaultLoader.vue'
5150
export { LightboxDefaultLoader }
5251
@@ -67,7 +66,9 @@
6766
default: false,
6867
},
6968
},
70-
components: { LightboxDefaultLoader, },
69+
components: {
70+
LightboxDefaultLoader,
71+
},
7172
data() {
7273
return {
7374
visible: this.value,

src/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import Vue from 'vue'
22
import App from './App.vue'
33

4-
54
new Vue({
65
el: '#app',
76
render: (h) => h(App),
8-
})
7+
})

0 commit comments

Comments
 (0)