This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree 1 file changed +37
-29
lines changed
1 file changed +37
-29
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" container" >
3
- <div >
4
- <logo />
5
- <h1 class =" title" >
6
- with-nuxt
7
- </h1 >
8
- <h2 class =" subtitle" >
9
- Example project with Nuxt.js and vue-transition-ay11
10
- </h2 >
11
- <div class =" links" >
12
- <a
13
- href =" https://nuxtjs.org/"
14
- target =" _blank"
15
- class =" button--green"
16
- >
17
- Documentation
18
- </a >
19
- <a
20
- href =" https://github.com/nuxt/nuxt.js"
21
- target =" _blank"
22
- class =" button--grey"
23
- >
24
- GitHub
25
- </a >
3
+ <TransitionA11y appear name =" fade" >
4
+ <div v-if =" loaded" >
5
+ <logo />
6
+ <h1 class =" title" >with-nuxt</h1 >
7
+ <h2 class =" subtitle" >Example project with Nuxt.js and vue-transition-ay11</h2 >
8
+ <div class =" links" >
9
+ <a href =" https://nuxtjs.org/" target =" _blank" class =" button--green" >Documentation</a >
10
+ <a href =" https://github.com/nuxt/nuxt.js" target =" _blank" class =" button--grey" >GitHub</a >
11
+ </div >
26
12
</div >
27
- </div >
13
+ </TransitionA11y >
28
14
</div >
29
15
</template >
30
16
31
17
<script >
32
- import Logo from ' ~/components/Logo.vue'
33
- import Transition from ' vue-transition-a11y'
18
+ import Logo from ' ~/components/Logo.vue' ;
19
+ import Transition from ' vue-transition-a11y' ;
34
20
35
21
export default {
22
+ data () {
23
+ return {
24
+ loaded: false ,
25
+ };
26
+ },
27
+
36
28
components: {
37
- Logo
38
- }
39
- }
29
+ Logo,
30
+ TransitionA11y: Transition,
31
+ },
32
+
33
+ mounted () {
34
+ this .loaded = true ;
35
+ },
36
+ };
40
37
</script >
41
38
42
39
<style >
43
40
.container {
44
41
margin : 0 auto ;
45
42
min-height : 100vh ;
46
43
display : flex ;
44
+ flex-direction : column ;
47
45
justify-content : center ;
48
46
align-items : center ;
49
47
text-align : center ;
@@ -70,4 +68,14 @@ export default {
70
68
.links {
71
69
padding-top : 15px ;
72
70
}
71
+
72
+ .fade-enter-active ,
73
+ .fade-leave-active {
74
+ transition : opacity 5s ;
75
+ opacity : 1 ;
76
+ }
77
+ .fade-enter ,
78
+ .fade-leave-to {
79
+ opacity : 0 ;
80
+ }
73
81
</style >
You can’t perform that action at this time.
0 commit comments