mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add FAQ search mixin
This commit is contained in:
parent
f8b85cb848
commit
45cc278acb
1 changed files with 21 additions and 0 deletions
21
services/web/app/views/_mixins/faq_search.pug
Normal file
21
services/web/app/views/_mixins/faq_search.pug
Normal file
|
@ -0,0 +1,21 @@
|
|||
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) #{headerText}
|
||||
.wiki(ng-controller="SearchWikiController")
|
||||
form.project-search.form-horizontal(role="form")
|
||||
.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
|
||||
i.fa.fa-times.form-control-feedback(
|
||||
ng-click="clearSearchText()",
|
||||
style="cursor: pointer;",
|
||||
ng-show="searchQueryText.length > 0"
|
||||
)
|
||||
|
||||
.row
|
||||
.col-md-12(ng-cloak)
|
||||
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')
|
Loading…
Reference in a new issue