11<template >
22 <!-- TODO: Extract overlay to a separate component -->
3- <div
4- v-if =" showOverlay"
5- class =" mobile-navigation-overlay"
6- >
7- <ButtonPlain
8- class =" close-button"
9- @click =" showOverlay = false"
10- >
11- <!-- eslint-disable-line vue-i18n/no-raw-text-->
12- ✕ ;
13- </ButtonPlain >
14- <Navigation mobile />
15- <FooterSection />
16- </div >
17- <SearchFeed
18- v-else-if =" isTipsRoute && showSearchFeed"
19- class =" mobile-navigation-sticky"
20- @close =" showSearchFeed = false"
21- />
22- <div
23- v-else
24- class =" mobile-navigation-sticky mobile-navigation"
25- >
26- <RouterLink
27- class =" logo"
28- to =" /"
29- >
30- <img src =" ../../assets/headerLogo.svg" >
31- </RouterLink >
32-
33- <div class =" separator" />
34-
35- <a
36- v-if =" !useSdkWallet && isTipsRoute"
37- :href =" tipDeepLink"
38- >
39- <IconWallet />
40- </a >
41- <ButtonPlain
42- v-if =" isTipsRoute"
43- @click =" showSearchFeed = true"
44- >
45- <IconSearch />
46- </ButtonPlain >
47- <ButtonPlain @click =" showOverlay = true" >
48- <IconMobileMenu />
49- </ButtonPlain >
3+ <div class =" mobile-navigation-sticky mobile-navigation" >
4+ <Transition name =" slide" >
5+ <Modal
6+ v-if =" showOverlay"
7+ @close =" showOverlay = false"
8+ >
9+ <div class =" mobile-navigation-overlay" >
10+ <ButtonPlain
11+ class =" close-button"
12+ @click =" showOverlay = false"
13+ >
14+ <!-- eslint-disable-line vue-i18n/no-raw-text-->
15+ ✕ ;
16+ </ButtonPlain >
17+ <Navigation mobile />
18+ <FooterSection />
19+ </div >
20+ </Modal >
21+ </Transition >
22+ <SearchFeed
23+ v-if =" isTipsRoute && showSearchFeed"
24+ class =" mobile-navigation-sticky"
25+ @close =" showSearchFeed = false"
26+ />
27+ <template v-else >
28+ <RouterLink
29+ class =" logo"
30+ to =" /"
31+ >
32+ <img src =" ../../assets/headerLogo.svg" >
33+ </RouterLink >
34+
35+ <div class =" separator" />
36+
37+ <a
38+ v-if =" !useSdkWallet && isTipsRoute"
39+ :href =" tipDeepLink"
40+ >
41+ <IconWallet />
42+ </a >
43+ <ButtonPlain
44+ v-if =" isTipsRoute"
45+ @click =" showSearchFeed = true"
46+ >
47+ <IconSearch />
48+ </ButtonPlain >
49+ <ButtonPlain @click =" showOverlay = true" >
50+ <IconMobileMenu />
51+ </ButtonPlain >
52+ </template >
5053 </div >
5154</template >
5255
@@ -60,6 +63,7 @@ import IconWallet from '../../assets/iconWallet.svg?icon-component';
6063import IconSearch from ' ../../assets/iconSearch.svg?icon-component' ;
6164import IconMobileMenu from ' ../../assets/iconMobileMenu.svg?icon-component' ;
6265import ButtonPlain from ' ../ButtonPlain.vue' ;
66+ import Modal from ' ../Modal.vue' ;
6367
6468export default {
6569 components: {
@@ -70,6 +74,7 @@ export default {
7074 IconSearch,
7175 IconMobileMenu,
7276 ButtonPlain,
77+ Modal,
7378 },
7479 data : () => ({
7580 showOverlay: false ,
@@ -101,9 +106,9 @@ export default {
101106 color : $light_font_color ;
102107 position : fixed ;
103108 top : 0 ;
104- left : 0 ;
105109 right : 0 ;
106110 bottom : 0 ;
111+ left : 50% ;
107112 padding : 1rem ;
108113
109114 .close-button {
@@ -117,8 +122,8 @@ export default {
117122}
118123
119124.mobile-navigation {
120- padding-right : 0.6 rem ;
121- padding-left : 1 rem ;
125+ padding-right : 8 px ;
126+ padding-left : 8 px ;
122127 display : flex ;
123128 align-items : center ;
124129
@@ -159,4 +164,33 @@ export default {
159164 width : 100% ;
160165 }
161166}
167+
168+ ::v-deep .not-bootstrap-modal {
169+ .overlay {
170+ background-color : rgba ($background_color , 0.6 );
171+ }
172+
173+ & .slide-enter-active ,
174+ & .slide-enter-active .mobile-navigation-overlay ,
175+ & .slide-enter-active .mobile-navigation-overlay .navi ,
176+ & .slide-leave-active ,
177+ & .slide-leave-active .mobile-navigation-overlay {
178+ transition-duration : 0.3s ;
179+ transition-timing-function : ease ;
180+ }
181+
182+ & .slide-leave-active ,
183+ & .slide-leave-active .mobile-navigation-overlay {
184+ transition-duration : 0.2s ;
185+ }
186+
187+ & .slide-enter .mobile-navigation-overlay ,
188+ & .slide-leave-to .mobile-navigation-overlay {
189+ transform : translateX (100% );
190+ }
191+
192+ & .slide-leave-to .mobile-navigation-overlay {
193+ opacity : 0 ;
194+ }
195+ }
162196 </style >
0 commit comments