[bug fix] search enter, single pagination
This commit is contained in:
parent
656d955dbf
commit
41a5773d2e
|
@ -881,9 +881,8 @@
|
||||||
document.querySelector(".search-content").scrollTop = overflowedPixel + items[activeIndex].getBoundingClientRect().height;
|
document.querySelector(".search-content").scrollTop = overflowedPixel + items[activeIndex].getBoundingClientRect().height;
|
||||||
}
|
}
|
||||||
} else if (e.key === 'Enter' || keyCode === 13) {
|
} else if (e.key === 'Enter' || keyCode === 13) {
|
||||||
var currentItemLink = items[activeIndex].getAttribute('href');
|
if (items[activeIndex] && items[activeIndex].getAttribute('href')) {
|
||||||
if (currentItemLink) {
|
location.href = items[activeIndex].getAttribute('href');
|
||||||
location.href = currentItemLink;
|
|
||||||
}
|
}
|
||||||
} else if (e.key === 'Escape' || keyCode === 27) {
|
} else if (e.key === 'Escape' || keyCode === 27) {
|
||||||
e.target.value = null;
|
e.target.value = null;
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
<nav class="pagination-single">
|
<nav class="pagination-single">
|
||||||
{{ if eq ($.Param "languagedir") "ltr" }}
|
{{ if eq ($.Param "languagedir") "rtl" }}
|
||||||
{{ if .PrevPage }}
|
{{ if .NextPage }}
|
||||||
<a href="{{ .PrevPage.Permalink }}" class="pagination-single__left">
|
<a href="{{ .NextPage.Permalink }}" class="pagination-single__right">
|
||||||
<div class="pagination-single__icon">
|
<div class="pagination-single__icon">
|
||||||
{{ partial "svgs/arrow/arrow-back.svg" (dict "width" 25 "height" 25) }}
|
{{ partial "svgs/arrow/arrow-forward.svg" (dict "width" 25 "height" 25) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-single__left-title">{{ .PrevPage.Title }}</div>
|
<div class="pagination-single__right-title">{{ .NextPage.Title }}</div>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
{{ if .NextPage }}
|
{{ if .PrevPage }}
|
||||||
<a href="{{ .NextPage.Permalink }}" class="pagination-single__right">
|
<a href="{{ .PrevPage.Permalink }}" class="pagination-single__left">
|
||||||
<div class="pagination-single__right-title">{{ .NextPage.Title }}</div>
|
<div class="pagination-single__left-title">{{ .PrevPage.Title }}</div>
|
||||||
<div class="pagination-single__icon">
|
<div class="pagination-single__icon">
|
||||||
{{ partial "svgs/arrow/arrow-forward.svg" (dict "width" 25 "height" 25) }}
|
{{ partial "svgs/arrow/arrow-back.svg" (dict "width" 25 "height" 25) }}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if .NextPage }}
|
{{ if .PrevPage }}
|
||||||
<a href="{{ .NextPage.Permalink }}" class="pagination-single__right">
|
<a href="{{ .PrevPage.Permalink }}" class="pagination-single__left">
|
||||||
<div class="pagination-single__icon">
|
<div class="pagination-single__icon">
|
||||||
{{ partial "svgs/arrow/arrow-forward.svg" (dict "width" 25 "height" 25) }}
|
{{ partial "svgs/arrow/arrow-back.svg" (dict "width" 25 "height" 25) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-single__right-title">{{ .NextPage.Title }}</div>
|
<div class="pagination-single__left-title">{{ .PrevPage.Title }}</div>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
{{ if .PrevPage }}
|
{{ if .NextPage }}
|
||||||
<a href="{{ .PrevPage.Permalink }}" class="pagination-single__left">
|
<a href="{{ .NextPage.Permalink }}" class="pagination-single__right">
|
||||||
<div class="pagination-single__left-title">{{ .PrevPage.Title }}</div>
|
<div class="pagination-single__right-title">{{ .NextPage.Title }}</div>
|
||||||
<div class="pagination-single__icon">
|
<div class="pagination-single__icon">
|
||||||
{{ partial "svgs/arrow/arrow-back.svg" (dict "width" 25 "height" 25) }}
|
{{ partial "svgs/arrow/arrow-forward.svg" (dict "width" 25 "height" 25) }}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue