Remove base_url from search.mustache
This commit is contained in:
@@ -13,9 +13,8 @@
|
||||
<div class="Box-header border-bottom p-0"></div>
|
||||
{{#results}}
|
||||
<li class="Box-row Box-row--gray">
|
||||
<span class="Counter Counter--gray tooltipped tooltipped-w" aria-label="{{filename_count}} hits in filename - {{count}} hits in content">{{filename_count}} - {{count}}</span>
|
||||
|
||||
<span class="text-bold"><a href="{{base_url}}/{{name}}">{{name}}</a></span>
|
||||
<span class="Counter Counter--gray tooltipped tooltipped-w" aria-label="{{filename_count}} hits in filename - {{count}} hits in content">{{filename_count}} - {{count}}</span>
|
||||
<span class="text-bold"><a href="{{href}}">{{name}}</a></span>
|
||||
<button class="btn-link tooltipped tooltipped-w float-right toggle-context" aria-label="Show all {{count}} hits in this page">{{#octicon}}search{{/octicon}}</button>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ module Precious
|
||||
include Pagination
|
||||
|
||||
def results
|
||||
@results.sort do |a, b|
|
||||
sorted = @results.sort do |a, b|
|
||||
if b.nil?
|
||||
b_filename_count = 0
|
||||
b_count = 0
|
||||
@@ -15,6 +15,7 @@ module Precious
|
||||
end
|
||||
[a[:filename_count], a[:count]] <=> [b_filename_count, b_count]
|
||||
end.reverse.slice((@page_num - 1) * @max_count, @max_count)
|
||||
sorted.each {|x| x[:href] = page_route(x[:name])}
|
||||
end
|
||||
|
||||
def query_string
|
||||
|
||||
Reference in New Issue
Block a user