feat: quick search changes

main
Barış Soner Uşaklı 5 years ago
parent 4ffdb7cf9e
commit e65ec0fa15

@ -33,15 +33,30 @@
} }
} }
.quick-search-results { .quick-search-container {
.dropdown-menu;
display: block;
left: auto;
right: 0px;
.quick-search-results {
max-width: 400px; max-width: 400px;
max-height: 500px; max-height: 500px;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
padding: 0px 0px;
li {
list-style: none;
a { a {
white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden overflow: hidden;
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
line-height: 1.42857143;
white-space: nowrap;
color: @gray-dark;
}
} }
.quick-search-title { .quick-search-title {
font-weight: 600; font-weight: 600;
@ -51,6 +66,7 @@
word-break: break-word; word-break: break-word;
white-space: normal; white-space: normal;
} }
}
} }
.quick-search-results, .search-results { .quick-search-results, .search-results {

@ -173,7 +173,7 @@
<button type="submit" class="btn btn-default hide">[[global:search]]</button> <button type="submit" class="btn btn-default hide">[[global:search]]</button>
</div> </div>
</form> </form>
<ul id="quick-search-results" class="dropdown-menu quick-search-results hidden"></ul> <div id="quick-search-container" class="quick-search-container hidden"></div>
</li> </li>
<li class="visible-xs" id="search-menu"> <li class="visible-xs" id="search-menu">
<a href="{relative_path}/search"> <a href="{relative_path}/search">

@ -1,3 +1,4 @@
<ul id="quick-search-results" class="quick-search-results">
{{{each posts}}} {{{each posts}}}
<li> <li>
<a href="{config.relative_path}/post/{posts.pid}"> <a href="{config.relative_path}/post/{posts.pid}">
@ -17,10 +18,14 @@
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<!-- ENDIF --> <!-- ENDIF -->
{{{end}}} {{{end}}}
</ul>
<!-- IF multiplePages --> <!-- IF multiplePages -->
<li class="text-center"> <div class="text-center">
<a href="{url}"> <a href="{url}">
[[search:see-more-results, {matchCount}]] [[search:see-more-results, {matchCount}]]
</a> </a>
</li> </div>
<!-- ENDIF multiplePages --> <!-- ENDIF multiplePages -->
{{{if !posts.length}}}
<div class="text-center no-results">[[search:no-matches]]</li>
{{{end}}}
Loading…
Cancel
Save