DEV: Use angle bracket syntax (#130)
This commit is contained in:
parent
0b4d2f3691
commit
e00946e200
|
@ -1,20 +1,20 @@
|
||||||
<span class="docs-search-wrapper">
|
<span class="docs-search-wrapper">
|
||||||
{{input
|
<Input
|
||||||
type="text"
|
@type="text"
|
||||||
value=(readonly searchTerm)
|
@value={{readonly searchTerm}}
|
||||||
input=(action "onSearchTermChange" value="target.value")
|
|
||||||
class="no-blur docs-search-bar"
|
class="no-blur docs-search-bar"
|
||||||
autocorrect="off"
|
autocorrect="off"
|
||||||
placeholder=(i18n "docs.search.placeholder")
|
placeholder={{i18n "docs.search.placeholder"}}
|
||||||
autocapitalize="off"
|
autocapitalize="off"
|
||||||
}}
|
{{on "input" (action "onSearchTermChange" value="target.value")}}
|
||||||
|
/>
|
||||||
|
|
||||||
{{#if searchTerm}}
|
{{#if searchTerm}}
|
||||||
{{d-button
|
<DButton
|
||||||
action=(action "clearSearch")
|
@action={{action "clearSearch"}}
|
||||||
class="clear-search"
|
class="clear-search"
|
||||||
label="docs.search.clear"
|
@label="docs.search.clear"
|
||||||
}}
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{d-icon "search"}}
|
{{d-icon "search"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#load-more selector=".topic-list tr" action=loadMore}}
|
<LoadMore @selector=".topic-list tr" @action={{loadMore}}>
|
||||||
<table class="topic-list">
|
<table class="topic-list">
|
||||||
<thead class="topic-list-header">
|
<thead class="topic-list-header">
|
||||||
<th role="button" class="topic-list-data" {{action "sortListTitle"}}>
|
<th role="button" class="topic-list-data" {{action "sortListTitle"}}>
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{/load-more}}
|
</LoadMore>
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=loading}}
|
<ConditionalLoadingSpinner @condition={{loading}} />
|
|
@ -1,9 +1,14 @@
|
||||||
{{d-button label="docs.topic.back" class="docs-nav-link return" action=return}}
|
<DButton
|
||||||
|
@label="docs.topic.back"
|
||||||
|
class="docs-nav-link return"
|
||||||
|
@action={{return}}
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="topic-content">
|
<div class="topic-content">
|
||||||
<h1>{{html-safe topic.fancyTitle}}</h1>
|
<h1>{{html-safe topic.fancyTitle}}</h1>
|
||||||
|
|
||||||
{{mount-widget widget="post" model=model args=post}}
|
{{! template-lint-disable no-capital-arguments }}
|
||||||
|
<MountWidget @widget="post" @model={{model}} @args={{post}} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="docs-nav-link more" href="/t/{{topic.id}}">
|
<a class="docs-nav-link more" href="/t/{{topic.id}}">
|
||||||
|
@ -11,4 +16,6 @@
|
||||||
{{i18n "docs.topic.navigate_to_topic"}}
|
{{i18n "docs.topic.navigate_to_topic"}}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{plugin-outlet name="after-docs-topic" tagName="span" connectorTagName="div"}}
|
<span>
|
||||||
|
<PluginOutlet @name="after-docs-topic" @connectorTagName="div" />
|
||||||
|
</span>
|
|
@ -1,16 +1,16 @@
|
||||||
{{#conditional-loading-spinner condition=isLoading}}
|
<ConditionalLoadingSpinner @condition={{isLoading}}>
|
||||||
{{#if noContent}}
|
{{#if noContent}}
|
||||||
<EmptyState @title={{emptyState.title}} @body={{emptyState.body}} />
|
<EmptyState @title={{emptyState.title}} @body={{emptyState.body}} />
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="docs-browse">
|
<div class="docs-browse">
|
||||||
{{#if site.mobileView}}
|
{{#if site.mobileView}}
|
||||||
{{#unless selectedTopic}}
|
{{#unless selectedTopic}}
|
||||||
{{d-button
|
<DButton
|
||||||
class="docs-expander"
|
class="docs-expander"
|
||||||
icon=(if expandedFilters "angle-up" "angle-down")
|
@icon={{if expandedFilters "angle-up" "angle-down"}}
|
||||||
action=(action "toggleFilters")
|
@action={{action "toggleFilters"}}
|
||||||
label="docs.filter_button"
|
@label="docs.filter_button"
|
||||||
}}
|
/>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -19,12 +19,15 @@
|
||||||
{{#if canFilterSolved}}
|
{{#if canFilterSolved}}
|
||||||
<div class="docs-items docs-solved">
|
<div class="docs-items docs-solved">
|
||||||
<label class="checkbox-label docs-item">
|
<label class="checkbox-label docs-item">
|
||||||
{{input
|
<Input
|
||||||
type="checkbox"
|
@type="checkbox"
|
||||||
checked=(readonly filterSolved)
|
@checked={{readonly filterSolved}}
|
||||||
change=(action "onChangeFilterSolved" value="target.checked")
|
{{on
|
||||||
|
"input"
|
||||||
|
(action "onChangeFilterSolved" value="target.checked")
|
||||||
}}
|
}}
|
||||||
{{plugin-outlet name="custom-checkbox"}}
|
/>
|
||||||
|
<PluginOutlet @name="custom-checkbox" />
|
||||||
{{i18n "docs.filter_solved"}}
|
{{i18n "docs.filter_solved"}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,35 +38,35 @@
|
||||||
<section class="item-controls">
|
<section class="item-controls">
|
||||||
<h3>{{i18n "docs.categories"}}</h3>
|
<h3>{{i18n "docs.categories"}}</h3>
|
||||||
<div class="item-controls-buttons">
|
<div class="item-controls-buttons">
|
||||||
{{d-button
|
<DButton
|
||||||
class=(if
|
class={{if
|
||||||
(eq categorySort.type "alpha")
|
(eq categorySort.type "alpha")
|
||||||
"categories-alphabet active"
|
"categories-alphabet active"
|
||||||
"categories-alphabet"
|
"categories-alphabet"
|
||||||
)
|
|
||||||
icon=categorySortAlphaIcon
|
|
||||||
action=toggleCategorySort
|
|
||||||
actionParam="alpha"
|
|
||||||
}}
|
}}
|
||||||
{{d-button
|
@icon="categorySortAlphaIcon"
|
||||||
class=(if
|
@action={{toggleCategorySort}}
|
||||||
|
@actionParam="alpha"
|
||||||
|
/>
|
||||||
|
<DButton
|
||||||
|
class={{if
|
||||||
(eq categorySort.type "numeric")
|
(eq categorySort.type "numeric")
|
||||||
"categories-amount active"
|
"categories-amount active"
|
||||||
"categories-amount"
|
"categories-amount"
|
||||||
)
|
|
||||||
icon=categorySortNumericIcon
|
|
||||||
action=toggleCategorySort
|
|
||||||
actionParam="numeric"
|
|
||||||
}}
|
}}
|
||||||
{{plugin-outlet name="categories-controls-buttons-bottom"}}
|
@icon="categorySortNumericIcon"
|
||||||
|
@action={{toggleCategorySort}}
|
||||||
|
@actionParam="numeric"
|
||||||
|
/>
|
||||||
|
<PluginOutlet @name="categories-controls-buttons-bottom" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{#if showCategoryFilter}}
|
{{#if showCategoryFilter}}
|
||||||
{{input
|
<Input
|
||||||
value=categoryFilter
|
@value={{categoryFilter}}
|
||||||
class="filter"
|
class="filter"
|
||||||
placeholderKey="docs.categories_filter_placeholder"
|
placeholder={{i18n "docs.categories_filter_placeholder"}}
|
||||||
}}
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<ul>
|
<ul>
|
||||||
{{#each sortedCategories as |category|}}
|
{{#each sortedCategories as |category|}}
|
||||||
|
@ -85,42 +88,44 @@
|
||||||
<section class="item-controls">
|
<section class="item-controls">
|
||||||
<h3>{{i18n "docs.tags"}}</h3>
|
<h3>{{i18n "docs.tags"}}</h3>
|
||||||
<div class="item-controls-buttons">
|
<div class="item-controls-buttons">
|
||||||
{{d-button
|
<DButton
|
||||||
class=(if
|
class={{if
|
||||||
(eq tagSort.type "alpha")
|
(eq tagSort.type "alpha")
|
||||||
"tags-alphabet active"
|
"tags-alphabet active"
|
||||||
"tags-alphabet"
|
"tags-alphabet"
|
||||||
)
|
|
||||||
icon=tagSortAlphaIcon
|
|
||||||
action=toggleTagSort
|
|
||||||
actionParam="alpha"
|
|
||||||
}}
|
}}
|
||||||
{{d-button
|
@icon="tagSortAlphaIcon"
|
||||||
class=(if
|
@action={{toggleTagSort}}
|
||||||
|
@actionParam="alpha"
|
||||||
|
/>
|
||||||
|
<DButton
|
||||||
|
class={{if
|
||||||
(eq tagSort.type "numeric")
|
(eq tagSort.type "numeric")
|
||||||
"tags-amount active"
|
"tags-amount active"
|
||||||
"tags-amount"
|
"tags-amount"
|
||||||
)
|
|
||||||
icon=tagSortNumericIcon
|
|
||||||
action=toggleTagSort
|
|
||||||
actionParam="numeric"
|
|
||||||
}}
|
}}
|
||||||
{{plugin-outlet name="tags-controls-buttons-bottom"}}
|
@icon="tagSortNumericIcon"
|
||||||
|
@action={{toggleTagSort}}
|
||||||
|
@actionParam="numeric"
|
||||||
|
/>
|
||||||
|
<PluginOutlet @name="tags-controls-buttons-bottom" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{#if showTagFilter}}
|
{{#if showTagFilter}}
|
||||||
{{input
|
<Input
|
||||||
value=tagFilter
|
@value={{tagFilter}}
|
||||||
class="filter"
|
class="filter"
|
||||||
placeholderKey="docs.tags_filter_placeholder"
|
placeholder={{i18n "docs.tags_filter_placeholder"}}
|
||||||
}}
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{plugin-outlet
|
<PluginOutlet
|
||||||
name="before-docs-tag-list"
|
@name="before-docs-tag-list"
|
||||||
tagName=""
|
@connectorTagName="div"
|
||||||
connectorTagName="div"
|
@outletArgs={{hash
|
||||||
args=(hash tags=tags updateSelectedTags=updateSelectedTags)
|
tags=tags
|
||||||
|
updateSelectedTags=updateSelectedTags
|
||||||
}}
|
}}
|
||||||
|
/>
|
||||||
<ul>
|
<ul>
|
||||||
{{#each sortedTags as |tag|}}
|
{{#each sortedTags as |tag|}}
|
||||||
<li class="docs-filter-tag-{{tag.id}}">
|
<li class="docs-filter-tag-{{tag.id}}">
|
||||||
|
@ -137,14 +142,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if selectedTopic}}
|
{{#if selectedTopic}}
|
||||||
{{#conditional-loading-spinner condition=isTopicLoading}}
|
<ConditionalLoadingSpinner @condition={{isTopicLoading}}>
|
||||||
{{docs-topic topic=topic return=(action "returnToList")}}
|
{{docs-topic topic=topic return=(action "returnToList")}}
|
||||||
{{plugin-outlet
|
<PluginOutlet @name="below-docs-topic" @connectorTagName="div" />
|
||||||
name="below-docs-topic"
|
</ConditionalLoadingSpinner>
|
||||||
tagName=""
|
|
||||||
connectorTagName="div"
|
|
||||||
}}
|
|
||||||
{{/conditional-loading-spinner}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="docs-results">
|
<div class="docs-results">
|
||||||
{{#if isSearchingOrFiltered}}
|
{{#if isSearchingOrFiltered}}
|
||||||
|
@ -152,11 +153,12 @@
|
||||||
<div class="result-count no-result">
|
<div class="result-count no-result">
|
||||||
{{i18n "search.no_results"}}
|
{{i18n "search.no_results"}}
|
||||||
</div>
|
</div>
|
||||||
{{plugin-outlet
|
<span>
|
||||||
name="after-docs-empty-results"
|
<PluginOutlet
|
||||||
tagName="span"
|
@name="after-docs-empty-results"
|
||||||
connectorTagName="div"
|
@connectorTagName="div"
|
||||||
}}
|
/>
|
||||||
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="result-count">
|
<div class="result-count">
|
||||||
{{i18n "docs.search.results" count=topicCount}}
|
{{i18n "docs.search.results" count=topicCount}}
|
||||||
|
@ -178,4 +180,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/conditional-loading-spinner}}
|
</ConditionalLoadingSpinner>
|
|
@ -1,15 +1,16 @@
|
||||||
<div class="docs">
|
<div class="docs">
|
||||||
{{plugin-outlet
|
<span>
|
||||||
name="before-docs-search"
|
<PluginOutlet
|
||||||
tagName="span"
|
@name="before-docs-search"
|
||||||
connectorTagName="div"
|
@connectorTagName="div"
|
||||||
args=(hash
|
@outletArgs={{hash
|
||||||
selectCategory=(action "updateSelectedCategories")
|
selectCategory=(action "updateSelectedCategories")
|
||||||
selectTag=(action "updateSelectedTags")
|
selectTag=(action "updateSelectedTags")
|
||||||
tags=indexController.tags
|
tags=indexController.tags
|
||||||
categories=indexController.categories
|
categories=indexController.categories
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
|
||||||
{{docs-search
|
{{docs-search
|
||||||
searchTerm=(readonly indexController.searchTerm)
|
searchTerm=(readonly indexController.searchTerm)
|
||||||
|
|
Loading…
Reference in New Issue