Skip to content

Commit d94ca1c

Browse files
committed
Adjust mobile navigation
1 parent eb7da96 commit d94ca1c

File tree

3 files changed

+102
-52
lines changed

3 files changed

+102
-52
lines changed

src/components/layout/FooterSection.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ export default {
108108
109109
.footer-btns {
110110
margin-bottom: 8px;
111+
112+
@include mobile {
113+
display: flex;
114+
flex-direction: column;
115+
116+
.outlined-button {
117+
width: 100%;
118+
margin-bottom: 8px;
119+
}
120+
}
111121
}
112122
113123
.venture {
@@ -171,6 +181,12 @@ export default {
171181
}
172182
}
173183
}
184+
185+
a {
186+
@include mobile {
187+
display: block;
188+
}
189+
}
174190
}
175191
176192
p {

src/components/layout/MobileNavigation.vue

Lines changed: 84 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,55 @@
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-
&#x2715;
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+
&#x2715;
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';
6063
import IconSearch from '../../assets/iconSearch.svg?icon-component';
6164
import IconMobileMenu from '../../assets/iconMobileMenu.svg?icon-component';
6265
import ButtonPlain from '../ButtonPlain.vue';
66+
import Modal from '../Modal.vue';
6367
6468
export 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.6rem;
121-
padding-left: 1rem;
125+
padding-right: 8px;
126+
padding-left: 8px;
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>

src/components/layout/Navigation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ export default {
121121
}
122122
123123
&.mobile a:not(.logo) {
124-
font-size: 0.95rem;
125-
margin-bottom: 1rem;
124+
font-size: 14px;
125+
margin-bottom: 8px;
126126
}
127127
}
128128
</style>

0 commit comments

Comments
 (0)