Skip to content

Commit b0a8db3

Browse files
committed
links to entries
1 parent c635662 commit b0a8db3

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/css/instantsearch.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@
6161
line-height: 21px;
6262
}
6363

64+
.md-content .ais-InstantSearch .instantsearch__entry {
65+
display: block;
66+
color: var(--ibexa-dusk-black);
67+
}
68+
69+
.md-content .ais-InstantSearch .instantsearch__entry:hover {
70+
color: var(--ibexa-jazzberry);
71+
}
72+
73+
.md-content .ais-InstantSearch .instantsearch__entry:hover .instantsearch__entry-header,
74+
.md-content .ais-InstantSearch .instantsearch__entry:hover .instantsearch__entry-content {
75+
color: var(--ibexa-jazzberry)
76+
}
77+
6478
.md-content .ais-InstantSearch .instantsearch__entry + .instantsearch__entry {
6579
border-top: 1px solid #E0E0E8;
6680
margin-top: 16px;

docs/js/instantsearch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
},
2727
}
2828
}
29-
const search_query = document.location.hash.match(/q=(.*)(&|$)/)[1] ?? '';
29+
const search_query = document.location.hash.match(/q=(.*?)(&|$)/)[1] ?? '';
3030
const parsed_search_query = decodeURI(search_query.replace('+', ' '));
31-
const search_page = document.location.hash.match(/p=(\d*)(&|$)/)[1] ?? 1;
31+
const search_page = document.location.hash.match(/p=(\d*?)(&|$)/)[1] ?? 1;
3232
const parsed_search_page = parseInt(search_page);
3333
const version = document.location.pathname.split('/')[2];
3434
const search = instantsearch({
@@ -122,7 +122,7 @@
122122
</span>`
123123
});
124124

125-
const childHTML = `<div class="instantsearch__entry">
125+
const childHTML = `<a class="instantsearch__entry" href="${childHit.url}">
126126
${headerHTML}
127127
${contentHTML}
128128
<div class="instantsearch__entry-breadcrumbs">

0 commit comments

Comments
 (0)