This adds a CSS class to the DOM element around the best-matching browse
result when you've just entered a term, to help the end user spot it in
the middle of the page. It does not stick around if go forward and back
from your first result page.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
<ol class="browse-result-list">
[% FOR result IN ctx.browse_results %]
<li class="browse-result">
- <span class="browse-result-value">
+ <span class="browse-result-value[% result.row_number == 0 && !CGI.param('bpivot') ? ' browse-result-best-match' : '' %]">
<a href="[% mkurl(
ctx.opac_root _ '/results', {
'fi:has_browse_entry' => (result.browse_entry _ ',' _ result.fields)
.browse-result-sources, .browse-result-authority-bib-links {
margin-left: 1em;
}
+.browse-result-best-match {
+ font-weight: bold;
+}
.browse-pager {
margin: 2ex 0;
}