Skip to content

Commit eb7da96

Browse files
committed
Add Topics on mobile
1 parent 0378c7b commit eb7da96

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

src/assets/iconHashtag.svg

Lines changed: 6 additions & 0 deletions
Loading

src/router.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import WordBazaarCreateToken from './views/WordBazaarCreateToken.vue';
2424
import WordBazaarGetAe from './views/WordBazaarGetAe.vue';
2525
import WordBazaarHowItWorks from './views/WordBazaarHowItWorks.vue';
2626
import WordDetail from './views/WordDetail.vue';
27+
import Trending from './views/Trending.vue';
2728

2829
const routes = [
2930
{
@@ -177,6 +178,11 @@ const routes = [
177178
else next();
178179
},
179180
},
181+
{
182+
path: '/trending',
183+
name: 'trending',
184+
component: Trending,
185+
},
180186
{
181187
path: '*',
182188
redirect: '/',

src/views/FeedList.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
{{ $t('views.FeedList.posts') }}
3131
</span>
3232
</FilterButton>
33+
<FilterButton
34+
class="trending"
35+
to="/trending"
36+
>
37+
<IconHashtag />
38+
</FilterButton>
3339
</div>
3440
<div class="not-bootstrap-row">
3541
<ButtonPlain
@@ -84,6 +90,7 @@ import FilterButton from '../components/FilterButton.vue';
8490
import IconFeed from '../assets/iconFeed.svg?icon-component';
8591
import IconDiamond from '../assets/iconDiamond.svg?icon-component';
8692
import IconPosts from '../assets/iconPosts.svg?icon-component';
93+
import IconHashtag from '../assets/iconHashtag.svg?icon-component';
8794
8895
export default {
8996
components: {
@@ -96,6 +103,7 @@ export default {
96103
IconFeed,
97104
IconDiamond,
98105
IconPosts,
106+
IconHashtag,
99107
},
100108
props: {
101109
query: { type: String, default: '' },
@@ -146,6 +154,14 @@ export default {
146154
@include smallest {
147155
font-size: 14px;
148156
}
157+
158+
&.trending {
159+
display: none;
160+
161+
@include mobile {
162+
display: inline-block;
163+
}
164+
}
149165
}
150166
}
151167

src/views/Trending.vue

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<div class="trending">
3+
<BackButtonRibbon>
4+
<template #title>
5+
{{ $t('Trending topics') }}
6+
</template>
7+
</BackButtonRibbon>
8+
<TopicList />
9+
</div>
10+
</template>
11+
12+
<script>
13+
import BackButtonRibbon from '../components/BackButtonRibbon.vue';
14+
import TopicList from '../components/TopicList.vue';
15+
16+
export default {
17+
components: { BackButtonRibbon, TopicList },
18+
};
19+
</script>
20+
21+
<style lang="scss" scoped>
22+
.trending {
23+
.actions-ribbon {
24+
display: flex;
25+
26+
::v-deep .title {
27+
white-space: nowrap;
28+
}
29+
}
30+
31+
.topic-list {
32+
padding: 0 8px;
33+
}
34+
}
35+
</style>

0 commit comments

Comments
 (0)