14
14
<button
15
15
class =" item item--type-less"
16
16
to =" /settings/account"
17
+ aria-label =" Help"
18
+ data-balloon =" Help"
19
+ data-balloon-pos =" down"
17
20
aria-controls =" help"
18
21
:aria-expanded =" (visible === 'help').toString()"
19
22
>
20
23
<font-awesome-icon
21
- title =" Help"
22
24
class =" nav-icon"
23
25
icon =" question-circle"
24
26
fixed-width
25
27
/>
26
28
</button >
27
- <div
28
- ref =" dropdown-help"
29
- id =" help"
30
- :class ="
31
- `dropdown${visible === 'help' ? ' dropdown--state-visible' : ''}`
32
- "
33
- >
34
- <nuxt-link class =" item" to =" /settings" >Feedback</nuxt-link >
35
- <nuxt-link class =" item" to =" /settings/account"
36
- >Help Center</nuxt-link
29
+ <transition name =" dropdown-fade" >
30
+ <div
31
+ v-show =" visible === 'help'"
32
+ id =" help"
33
+ ref =" dropdown-help"
34
+ class =" dropdown"
37
35
>
38
- <button class =" item" >Accessibility</button >
39
- </div >
36
+ <nuxt-link class =" item" to =" /settings" >Feedback</nuxt-link >
37
+ <nuxt-link class =" item" to =" /settings/account"
38
+ >Help Center</nuxt-link
39
+ >
40
+ <button class =" item" >Accessibility</button >
41
+ </div >
42
+ </transition >
40
43
</span >
41
44
<span >
42
45
<button
43
46
class =" item item--type-less item--type-last"
44
47
to =" /settings/notifications"
48
+ aria-label =" Notifications"
49
+ data-balloon =" Notifications"
50
+ data-balloon-pos =" down"
45
51
aria-controls =" notifications"
46
52
:aria-expanded =" (visible === 'notifications').toString()"
47
53
>
48
- <font-awesome-icon
49
- title =" Notifications"
50
- class =" nav-icon"
51
- icon =" bell"
52
- fixed-width
53
- />
54
+ <font-awesome-icon class =" nav-icon" icon =" bell" fixed-width />
54
55
</button >
55
- <div
56
- ref =" dropdown-notifications"
57
- id =" notifications"
58
- :class ="
59
- `dropdown${
60
- visible === 'notifications' ? ' dropdown--state-visible' : ''
61
- }`
62
- "
63
- style =" width : 350px "
64
- >
65
- <Notifications />
66
- </div >
56
+ <transition name =" dropdown-fade" >
57
+ <div
58
+ v-show =" visible === 'notifications'"
59
+ id =" notifications"
60
+ ref =" dropdown-notifications"
61
+ class =" dropdown"
62
+ style =" width : 350px "
63
+ >
64
+ <Notifications />
65
+ </div >
66
+ </transition >
67
67
</span >
68
68
<span >
69
69
<button
75
75
<img alt =" " :src =" user.profilePicture" />
76
76
{{ user.nickname }}
77
77
</button >
78
- <div
79
- ref =" dropdown-account"
80
- id =" account"
81
- :class ="
82
- `dropdown${
83
- visible === 'account' ? ' dropdown--state-visible' : ''
84
- }`
85
- "
86
- >
87
- <nuxt-link class =" item" to =" /settings/account" >Settings</nuxt-link >
88
- <nuxt-link class =" item" to =" /settings/organizations"
89
- >Organizations</nuxt-link
78
+ <transition name =" dropdown-fade" >
79
+ <div
80
+ v-show =" visible === 'account'"
81
+ id =" account"
82
+ ref =" dropdown-account"
83
+ class =" dropdown"
90
84
>
91
- <button class =" item" @click =" logout" >Logout</button >
92
- </div >
85
+ <nuxt-link class =" item" to =" /settings/account"
86
+ >Settings</nuxt-link
87
+ >
88
+ <nuxt-link class =" item" to =" /settings/organizations"
89
+ >Organizations</nuxt-link
90
+ >
91
+ <button class =" item" @click =" logout" >Logout</button >
92
+ </div >
93
+ </transition >
93
94
</span >
94
95
</nav >
95
96
<nav v-else >
@@ -233,7 +234,7 @@ nav .button {
233
234
z-index : 1 ;
234
235
}
235
236
}
236
- .dropdown--state-visible {
237
+ .dropdown {
237
238
display : block ;
238
239
}
239
240
.dropdown .item {
@@ -257,4 +258,16 @@ nav .item.item--type-user {
257
258
opacity : 0.7 ;
258
259
transform : scale (1.1 );
259
260
}
261
+ nav .item.item--type-less :hover {
262
+ opacity : 1 ;
263
+ }
264
+ .dropdown-fade-enter-active ,
265
+ .dropdown-fade-leave-active {
266
+ transition : opacity 0.2s , margin-top 0.45s ;
267
+ }
268
+ .dropdown-fade-enter ,
269
+ .dropdown-fade-leave-to {
270
+ opacity : 0 ;
271
+ margin-top : -0.5rem ;
272
+ }
260
273
</style >
0 commit comments