Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
FEATURE: Basic mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
justindirose committed Jul 9, 2019
1 parent 93baff3 commit d0964e5
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
55 changes: 55 additions & 0 deletions javascripts/discourse/templates/mobile/discovery/topics.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{#knowledge-base category=category model=model as |kbActive|}}
{{#discovery-topics-list model=model refresh=(action "refresh") incomingCount=topicTrackingState.incomingCount}}
{{#if top}}
<div class='top-lists'>
{{period-chooser period=period action=(action "changePeriod")}}
</div>
{{else}}
{{#if topicTrackingState.hasIncoming}}
<div class='alert alert-info clickable' {{action "showInserted"}}>
{{count-i18n key="topic_count_" suffix=topicTrackingState.filter count=topicTrackingState.incomingCount}}
</div>
{{/if}}
{{/if}}

{{#if hasTopics}}
{{topic-list
highlightLastVisited=true
showPosters=true
hideCategory=model.hideCategory
order=order
ascending=ascending
topics=model.topics
expandGloballyPinned=expandGloballyPinned
expandAllPinned=expandAllPinned
category=category
}}
{{/if}}
{{/discovery-topics-list}}
{{/knowledge-base}}

<footer class='topic-list-bottom'>
{{conditional-loading-spinner condition=model.loadingMore}}
{{#if allLoaded}}
{{#if showDismissRead}}
<button title="{{i18n 'topics.bulk.dismiss_tooltip'}}" id='dismiss-topics' class='btn btn-default dismiss-read' {{action "dismissReadPosts"}}>{{i18n 'topics.bulk.dismiss_button'}}</button>
{{/if}}
{{#if showResetNew}}
<button id='dismiss-new' class='btn btn-default dismiss-read' {{action "resetNew"}}>
{{d-icon "check"}}
{{i18n 'topics.bulk.dismiss_new'}}</button>
{{/if}}

{{#footer-message education=footerEducation message=footerMessage}}
{{#if latest}}
{{#if canCreateTopicOnCategory}}<a href {{action "createTopic"}}>{{i18n 'topic.suggest_create_topic'}}</a>{{/if}}
{{else if top}}
{{#link-to "discovery.categories"}}{{i18n 'topic.browse_all_categories'}}{{/link-to}}, {{#link-to 'discovery.latest'}}{{i18n 'topic.view_latest_topics'}}{{/link-to}} {{i18n 'or'}} {{i18n 'filters.top.other_periods'}}
{{top-period-buttons period=period action=(action "changePeriod")}}
{{else}}
{{#link-to "discovery.categories"}} {{i18n 'topic.browse_all_categories'}}{{/link-to}} {{i18n 'or'}} {{#link-to 'discovery.latest'}}{{i18n 'topic.view_latest_topics'}}{{/link-to}}
{{/if}}
{{/footer-message}}
{{/if}}
</footer>

23 changes: 23 additions & 0 deletions mobile/mobile.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.kb-active {
.kb-search {
font-size: $font-up-2;
padding: 1.5em 1em;

.kb-search-bar {
height: 50px;
margin-bottom: 0px;
width: 500px;
}
}
.kb-area {
flex-direction: column;
.kb-tags {
flex-basis: 100%;
padding: 1em 0;
}
.contents,
.kb-search-results {
flex-basis: 100%;
}
}
}

0 comments on commit d0964e5

Please sign in to comment.