Skip to content

Commit

Permalink
Add Topics on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
AtanasKrondev committed Jun 14, 2021
1 parent 6fa8ed7 commit 454709b
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/assets/iconHashtag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import WordBazaarCreateToken from './views/WordBazaarCreateToken.vue';
import WordBazaarGetAe from './views/WordBazaarGetAe.vue';
import WordBazaarHowItWorks from './views/WordBazaarHowItWorks.vue';
import WordDetail from './views/WordDetail.vue';
import Trending from './views/Trending.vue';

const routes = [
{
Expand Down Expand Up @@ -177,6 +178,11 @@ const routes = [
else next();
},
},
{
path: '/trending',
name: 'trending',
component: Trending,
},
{
path: '*',
redirect: '/',
Expand Down
16 changes: 16 additions & 0 deletions src/views/FeedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
{{ $t('views.FeedList.posts') }}
</span>
</FilterButton>
<FilterButton
class="trending"
to="/trending"
>
<IconHashtag />
</FilterButton>
</div>
<div class="not-bootstrap-row">
<ButtonPlain
Expand Down Expand Up @@ -84,6 +90,7 @@ import FilterButton from '../components/FilterButton.vue';
import IconFeed from '../assets/iconFeed.svg?icon-component';
import IconDiamond from '../assets/iconDiamond.svg?icon-component';
import IconPosts from '../assets/iconPosts.svg?icon-component';
import IconHashtag from '../assets/iconHashtag.svg?icon-component';
export default {
components: {
Expand All @@ -96,6 +103,7 @@ export default {
IconFeed,
IconDiamond,
IconPosts,
IconHashtag,
},
props: {
query: { type: String, default: '' },
Expand Down Expand Up @@ -146,6 +154,14 @@ export default {
@include smallest {
font-size: 14px;
}
&.trending {
display: none;
@include mobile {
display: inline-block;
}
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions src/views/Trending.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div class="trending">
<BackButtonRibbon>
<template #title>
{{ $t('Trending topics') }}
</template>
</BackButtonRibbon>
<TopicList />
</div>
</template>

<script>
import BackButtonRibbon from '../components/BackButtonRibbon.vue';
import TopicList from '../components/TopicList.vue';
export default {
components: { BackButtonRibbon, TopicList },
};
</script>

<style lang="scss" scoped>
.trending {
.actions-ribbon {
display: flex;
::v-deep .title {
white-space: nowrap;
}
}
.topic-list {
padding: 0 8px;
}
}
</style>

0 comments on commit 454709b

Please sign in to comment.