-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
73 lines (68 loc) · 1.96 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
<div>
<v-app :theme="appStore.getTheme">
<v-app-bar
color="transparent"
density="compact"
>
<v-app-bar-title>PomoPomo</v-app-bar-title>
<template v-slot:append>
<v-btn icon="mdi-image-outline" color="white" @click="changeBackgroundImage()"></v-btn>
<v-btn icon="mdi-theme-light-dark" @click="toggleTheme()"></v-btn>
</template>
</v-app-bar>
<v-main>
<v-parallax
:src="urlImagesBackground[slide]"
>
<NuxtPage />
</v-parallax>
</v-main>
</v-app>
</div>
</template>
<script lang="ts">
import { useAppStore } from './stores/app';
export default defineComponent({
setup(){
const appStore = useAppStore()
const toggleTheme = () => appStore.toggleTheme()
return {
appStore,
toggleTheme,
}
},
data(){
return{
slide: 0,
urlImagesBackground: [
'https://imagizer.imageshack.com/img924/8762/nhjx3N.jpg',
'https://imagizer.imageshack.com/img924/5550/iv0jIu.jpg',
'https://imagizer.imageshack.com/img922/6634/MOLjK4.jpg',
'https://imagizer.imageshack.com/img923/2985/HO5K60.jpg',
'https://imagizer.imageshack.com/img922/4539/vFrJeD.jpg',
'https://imagizer.imageshack.com/img924/5075/H85zsz.jpg',
'https://imagizer.imageshack.com/img922/5739/Y3MQ4x.png',
'https://imagizer.imageshack.com/img924/4107/Lklj1A.jpg',
'https://imagizer.imageshack.com/img923/4915/PJA5rB.jpg',
'https://imagizer.imageshack.com/img922/9854/4jaca1.jpg',
'https://imagizer.imageshack.com/img923/7378/HP8dxZ.jpg',
'https://imagizer.imageshack.com/img924/6736/kFk9X3.jpg',
]
}
},
methods: {
changeBackgroundImage(){
this.slide = this.slide + 1
if(!this.urlImagesBackground[this.slide]){
this.slide = 0
}
}
}
})
</script>
<style lang="scss">
.v-img__img {
opacity: 0.5 !important;
}
</style>