File tree 7 files changed +710
-585
lines changed
7 files changed +710
-585
lines changed Original file line number Diff line number Diff line change @@ -6576,6 +6576,10 @@ table {
6576
6576
src: url("/css/font/Futura_PT.otf") format("opentype");
6577
6577
}
6578
6578
6579
+ html {
6580
+ scroll-behavior: smooth;
6581
+ }
6582
+
6579
6583
a {
6580
6584
color: #22292f;
6581
6585
text-decoration: none;
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -81,13 +81,22 @@ export default new VueRouter({
81
81
routes,
82
82
linkActiveClass : 'is-active' ,
83
83
linkExactActiveClass : 'is-exact-active' ,
84
- scrollBehavior ( to ) {
85
- if ( to . hash ) return { selector : to . hash } ; // 如果有指定hash的話滾動到hash的位置
84
+ scrollBehavior ( to , from , savedPosition ) {
85
+ if ( savedPosition ) return savedPosition ;
86
+
87
+ // Vue router transition issue while using anchor, need to use promise to async execute and delay after transition render finish.
88
+ if ( to . hash ) {
89
+ return new Promise ( ( resolve ) => {
90
+ setTimeout ( ( ) => {
91
+ resolve ( { selector : to . hash } ) ; // 如果有指定hash的話滾動到hash的位置
92
+ } , 600 ) ;
93
+ } ) ;
94
+ }
86
95
87
96
return new Promise ( ( resolve ) => {
88
97
setTimeout ( ( ) => {
89
- resolve ( { x : 0 , y : 0 } )
90
- } , 500 )
98
+ resolve ( { x : 0 , y : 0 } ) ; // scroll to (0, 0)
99
+ } , 500 ) ;
91
100
} )
92
101
}
93
102
} ) ;
Original file line number Diff line number Diff line change 65
65
data-aos =" zoom-in-up"
66
66
>
67
67
<ul class =" flex lg:flex-row flex-col justify-center items-center py-4" >
68
+
68
69
<li class =" tw-thumbnail lg:w-1/3 w-full p-4" >
69
- <a href =" /" class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8" >
70
+ <router-link tag =" a"
71
+ :to =" {path: '/salon', hash: '#js-milano'}"
72
+ class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8"
73
+ >
70
74
<figure class =" w-2/5 sm:w-1/2 md:w-1/3 lg:w-full" >
71
75
<img src =" /store/MILANO.jpg" alt =" MILANO" >
72
76
</figure >
82
86
83
87
<p class =" xl:text-sm text-xs relative sm:pl-8" >サロン紹介 & ご予約</p >
84
88
</div >
85
- </a >
89
+ </router-link >
86
90
</li >
87
91
88
92
<li class =" tw-thumbnail lg:w-1/3 w-full p-4" >
89
- <a href =" /" class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8" >
93
+ <router-link tag =" a"
94
+ :to =" {path: '/salon', hash: '#js-la-rochelle'}"
95
+ class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8"
96
+ >
90
97
<figure class =" w-2/5 sm:w-1/2 md:w-1/3 lg:w-full" >
91
98
<img src =" /store/La_Rochelle.jpg" alt =" La Rochelle" >
92
99
</figure >
102
109
103
110
<p class =" xl:text-sm text-xs relative sm:pl-8" >サロン紹介 & ご予約</p >
104
111
</div >
105
- </a >
112
+ </router-link >
106
113
</li >
107
114
108
115
<li class =" tw-thumbnail lg:w-1/3 w-full p-4" >
109
- <a href =" /" class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8" >
116
+ <router-link tag =" a"
117
+ :to =" {path: '/salon', hash: '#js-lisbon'}"
118
+ class =" flex lg:flex-col justify-center relative sm:pt-0 pt-8"
119
+ >
110
120
<figure class =" w-2/5 sm:w-1/2 md:w-1/3 lg:w-full" >
111
121
<img src =" /store/LISBON.jpg" alt =" LISBON" >
112
122
</figure >
122
132
123
133
<p class =" xl:text-sm text-xs relative sm:pl-8" >サロン紹介 & ご予約</p >
124
134
</div >
125
- </a >
135
+ </router-link >
126
136
</li >
127
137
</ul >
128
138
</li >
Original file line number Diff line number Diff line change 12
12
</hero-bg >
13
13
14
14
<!-- sec 01 -->
15
- <section class =" mb-24 relative" >
15
+ <section class =" mb-24 relative" id = " js-milano " >
16
16
<div class =" max-w-1000 mx-auto p-4" >
17
17
<div class =" flex flex-col md:flex-row" >
18
18
<div
59
59
</section >
60
60
61
61
<!-- sec 02 -->
62
- <section class =" mb-24 relative" >
62
+ <section class =" mb-24 relative" id = " js-la-rochelle " >
63
63
<div class =" max-w-1000 mx-auto p-4" >
64
64
<div class =" flex flex-col md:flex-row" >
65
65
<div class =" lg:w-1/2 w-full bg-white p-16 pt-8 border border-gold mb-16 md:my-16 md:mx-8 relative" >
105
105
</section >
106
106
107
107
<!-- sec 03 -->
108
- <section class =" mb-24 relative" >
108
+ <section class =" mb-24 relative" id = " js-lisbon " >
109
109
<div class =" max-w-1000 mx-auto p-4" >
110
110
<div class =" flex flex-col md:flex-row" >
111
111
<div class =" lg:w-1/2 w-full bg-white p-16 pt-8 border border-blue-lighter mb-16 md:my-16 md:mx-8 relative tw-flex-end" >
Original file line number Diff line number Diff line change 14
14
src : url (" /css/font/Futura_PT.otf" ) format (" opentype" );
15
15
}
16
16
17
+ html {
18
+ scroll-behavior : smooth ;
19
+ }
20
+
17
21
a {
18
22
@apply text-black no-underline ;
19
23
}
You can’t perform that action at this time.
0 commit comments