8
8
9
9
<template >
10
10
<v-app style =" overflow : hidden " >
11
- <v-app-bar class =" liquid-glass-app-bar" >
11
+ <v-app-bar class =" liquid-glass-app-bar" @mousemove = " handleAppBarMouseMove " @mouseleave = " handleAppBarMouseLeave " >
12
12
<v-app-bar-nav-icon v-if =" $vuetify.display.mobile" @click.stop =" drawer = !drawer" ></v-app-bar-nav-icon >
13
13
<div class =" d-flex align-center" v-else >
14
14
<span class =" app-bar-item" @click =" $router.push({ name: 'Hi' }).catch(() => { })"
88
88
<router-view />
89
89
</v-main >
90
90
91
- <v-footer class =" liquid-glass-footer" padless >
91
+ <v-footer class =" liquid-glass-footer" padless @mousemove = " handleFooterMouseMove " @mouseleave = " handleFooterMouseLeave " >
92
92
<div tile class =" text-white text-center" >
93
93
<p class =" text-white pt-0 text-xs" >
94
94
Made with
@@ -119,6 +119,10 @@ export default {
119
119
icons: [" mdi-github" , " mdi-linkedin" ,],
120
120
drawer: false ,
121
121
group: null ,
122
+ appBarMouseX: 0 ,
123
+ appBarMouseY: 0 ,
124
+ footerMouseX: 0 ,
125
+ footerMouseY: 0 ,
122
126
}),
123
127
watch: {
124
128
group () {
@@ -128,6 +132,24 @@ export default {
128
132
methods: {
129
133
changeLanguage () {
130
134
this .$i18n .locale = this .$i18n .locale == " en" ? " zh" : " en" ;
135
+ },
136
+ handleAppBarMouseMove (event ) {
137
+ const rect = event .currentTarget .getBoundingClientRect ();
138
+ this .appBarMouseX = event .clientX - rect .left ;
139
+ this .appBarMouseY = event .clientY - rect .top ;
140
+ },
141
+ handleAppBarMouseLeave () {
142
+ this .appBarMouseX = 0 ;
143
+ this .appBarMouseY = 0 ;
144
+ },
145
+ handleFooterMouseMove (event ) {
146
+ const rect = event .currentTarget .getBoundingClientRect ();
147
+ this .footerMouseX = event .clientX - rect .left ;
148
+ this .footerMouseY = event .clientY - rect .top ;
149
+ },
150
+ handleFooterMouseLeave () {
151
+ this .footerMouseX = 0 ;
152
+ this .footerMouseY = 0 ;
131
153
}
132
154
},
133
155
components: { vueIcon, eroducate }
@@ -153,16 +175,24 @@ export default {
153
175
content : ' ' ;
154
176
position : absolute ;
155
177
top : 0 ;
156
- left : -100% ;
157
- width : 100% ;
158
- height : 100% ;
159
- background : linear-gradient (
160
- 90deg ,
161
- transparent ,
162
- rgba (255 , 255 , 255 , 0.08 ),
163
- transparent
178
+ left : 0 ;
179
+ right : 0 ;
180
+ bottom : 0 ;
181
+ background : radial-gradient (
182
+ circle at v-bind(appBarMouseX + ' px' ) v-bind(appBarMouseY + ' px' ),
183
+ rgba (255, 255, 255, 0.15) 0%,
184
+ rgba (255, 255, 255, 0.08) 30%,
185
+ rgba (255, 255, 255, 0.03) 60%,
186
+ transparent 80%
164
187
);
188
+ opacity : 0 ;
189
+ transition : opacity 0.3s ease ;
165
190
z-index : 1 ;
191
+ pointer-events : none ;
192
+ }
193
+
194
+ .liquid-glass-app-bar :hover ::before {
195
+ opacity : 1 ;
166
196
}
167
197
168
198
.liquid-glass-app-bar ::after {
@@ -199,16 +229,24 @@ export default {
199
229
content : ' ' ;
200
230
position : absolute ;
201
231
top : 0 ;
202
- left : -100% ;
203
- width : 100% ;
204
- height : 100% ;
205
- background : linear-gradient (
206
- 90deg ,
207
- transparent ,
208
- rgba (255 , 255 , 255 , 0.08 ),
209
- transparent
232
+ left : 0 ;
233
+ right : 0 ;
234
+ bottom : 0 ;
235
+ background : radial-gradient (
236
+ circle at v-bind(footerMouseX + ' px' ) v-bind(footerMouseY + ' px' ),
237
+ rgba (255, 255, 255, 0.15) 0%,
238
+ rgba (255, 255, 255, 0.08) 30%,
239
+ rgba (255, 255, 255, 0.03) 60%,
240
+ transparent 80%
210
241
);
242
+ opacity : 0 ;
243
+ transition : opacity 0.3s ease ;
211
244
z-index : 1 ;
245
+ pointer-events : none ;
246
+ }
247
+
248
+ .liquid-glass-footer :hover ::before {
249
+ opacity : 1 ;
212
250
}
213
251
214
252
.liquid-glass-footer ::after {
0 commit comments