Desktop and mobile styling improvements
This commit is contained in:
parent
6057e054c4
commit
3af0fcb50b
|
@ -2,6 +2,6 @@
|
||||||
type="text"
|
type="text"
|
||||||
value={{searchTerm}}
|
value={{searchTerm}}
|
||||||
oninput={{action "onSearchTermChange"}}
|
oninput={{action "onSearchTermChange"}}
|
||||||
class="kb-search-bar"
|
class="knowledge-explorer-search-bar"
|
||||||
autocorrect="off"
|
autocorrect="off"
|
||||||
autocapitalize="off">
|
autocapitalize="off">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="knowledge-explorer">
|
<div class="knowledge-explorer">
|
||||||
<div class="knowledge-explorer-filter">
|
<div class="knowledge-explorer-search">
|
||||||
{{knowledge-explorer-search searchResults=searchResults searchTerm=searchTerm filterTags=filterTags}}
|
{{knowledge-explorer-search searchResults=searchResults searchTerm=searchTerm filterTags=filterTags}}
|
||||||
</div>
|
</div>
|
||||||
<div class="knowledge-explorer-browse">
|
<div class="knowledge-explorer-browse">
|
||||||
|
@ -7,15 +7,17 @@
|
||||||
tags=tags
|
tags=tags
|
||||||
filterTags=filterTags
|
filterTags=filterTags
|
||||||
}}
|
}}
|
||||||
|
<div class="knowledge-explorer-results">
|
||||||
{{#if hasSearchResults}}
|
{{#if hasSearchResults}}
|
||||||
{{#if emptySearchResults}}
|
{{#if emptySearchResults}}
|
||||||
<div class="no-result">{{i18n 'search.no_results'}}</div>
|
<div class="result-count no-result">{{i18n 'search.no_results'}}</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>{{i18n 'knowledge_explorer.search.results' count=searchCount}}</div>
|
<div class="result-count">{{i18n 'knowledge_explorer.search.results' count=searchCount}}</div>
|
||||||
{{knowledge-explorer-topic-list topics=searchResults}}
|
{{knowledge-explorer-topic-list topics=searchResults}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{knowledge-explorer-topic-list topics=topics}}
|
{{knowledge-explorer-topic-list topics=topics}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
.knowledge-explorer {
|
.knowledge-explorer {
|
||||||
|
.knowledge-explorer-search {
|
||||||
|
align-items: center;
|
||||||
|
background-color: $primary-very-low;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 1.5em 1em;
|
||||||
|
.knowledge-explorer-search-bar {
|
||||||
|
height: 50px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.knowledge-explorer-browse {
|
.knowledge-explorer-browse {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
.knowledge-explorer-results {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-basis: 100%;
|
||||||
|
.result-count {
|
||||||
|
padding-top: 15px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.knowledge-explorer-tags {
|
.knowledge-explorer-tags {
|
||||||
flex-basis: 25%;
|
flex-basis: 25%;
|
||||||
padding: 10px 10px 10px 0;
|
padding: 10px 10px 10px 0;
|
||||||
|
@ -43,7 +64,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.knowledge-explorer-topic-list {
|
.knowledge-explorer-topic-list {
|
||||||
flex-basis: 75%;
|
flex-basis: 100%;
|
||||||
|
.discourse-tag {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
.mobile-view {
|
||||||
|
.knowledge-explorer {
|
||||||
|
.knowledge-explorer-search {
|
||||||
|
font-size: $font-up-2;
|
||||||
|
padding: .5em 0;
|
||||||
|
|
||||||
|
.knowledge-explorer-search-bar {
|
||||||
|
width: calc(100vw - 2em);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.knowledge-explorer-browse {
|
||||||
|
flex-direction: column;
|
||||||
|
.knowledge-explorer-results .result-count {
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
|
.knowledge-explorer-tags {
|
||||||
|
flex-basis: 100%;
|
||||||
|
padding: 1em 0;
|
||||||
|
}
|
||||||
|
.knowledge-explorer-topic-list {
|
||||||
|
flex-basis: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
enabled_site_setting :knowledge_explorer_enabled
|
enabled_site_setting :knowledge_explorer_enabled
|
||||||
|
|
||||||
register_asset 'stylesheets/common/knowledge-explorer.scss'
|
register_asset 'stylesheets/common/knowledge-explorer.scss'
|
||||||
|
register_asset 'stylesheets/mobile/knowledge-explorer.scss'
|
||||||
|
|
||||||
load File.expand_path('../lib/knowledge_explorer/engine.rb', __FILE__)
|
load File.expand_path('../lib/knowledge_explorer/engine.rb', __FILE__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue