mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
e2bf647b81
Replace Triple-Dots with Ellipsis in Pug Files GitOrigin-RevId: 408cea0772d8751acd8939e199e49e2cf9685b8f
32 lines
1.7 KiB
Text
32 lines
1.7 KiB
Text
mixin faq_search(headerText, headerClass)
|
|
- if(typeof(settings.algolia) != "undefined" && typeof(settings.algolia.indexes) != "undefined" && typeof(settings.algolia.indexes.wiki) != "undefined")
|
|
if headerText
|
|
div(class=headerClass, ng-non-bindable) #{headerText}
|
|
.wiki(ng-controller="SearchWikiController")
|
|
form.project-search.form-horizontal(role="search")
|
|
.form-group.has-feedback.has-feedback-left
|
|
.col-sm-12
|
|
input.form-control(type='text', ng-model='searchQueryText', ng-keyup='search()', placeholder="Search help library…")
|
|
i.fa.fa-search.form-control-feedback-left(aria-hidden="true")
|
|
i.fa.fa-times.form-control-feedback(
|
|
ng-click="clearSearchText()",
|
|
style="cursor: pointer;",
|
|
ng-show="searchQueryText.length > 0"
|
|
aria-hidden="true"
|
|
)
|
|
button.sr-only(
|
|
type="button"
|
|
ng-click="clearSearchText()",
|
|
ng-show="searchQueryText.length > 0"
|
|
) #{translate('clear_search')}
|
|
|
|
.row(role="region" aria-label="search results")
|
|
.col-md-12(ng-cloak)
|
|
span.sr-only(ng-show="searchQueryText.length > 0" aria-live="polite")
|
|
span(ng-if="hits_total > config_hits_per_page") Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}
|
|
span(ng-if="hits_total <= config_hits_per_page") {{hits.length}} results for {{searchQueryText}}
|
|
a(ng-href='{{hit.url}}',ng-repeat='hit in hits').search-result.card.card-thin
|
|
span(ng-bind-html='hit.name')
|
|
div.search-result-content(ng-show="hit.content != ''", ng-bind-html='hit.content')
|
|
.row-spaced-small.search-result.card.card-thin(ng-if="!processingSearch && searchQueryText.length > 1 && hits.length === 0")
|
|
p #{translate("no_search_results")}
|