mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-05-21 11:05:49 +00:00
style(fastsearch.js): improve search result item layout and add icons
This commit is contained in:
@@ -88,8 +88,12 @@ sInput.onkeyup = function (e) {
|
|||||||
let resultSet = ''; // our results bucket
|
let resultSet = ''; // our results bucket
|
||||||
|
|
||||||
for (let item in results) {
|
for (let item in results) {
|
||||||
resultSet += `<li class="post-entry"><header class="entry-header">${results[item].item.title} »</header>` +
|
resultSet +=
|
||||||
`<a href="${results[item].item.permalink}" aria-label="${results[item].item.title}"></a></li>`
|
`<li>` +
|
||||||
|
`${results[item].item.title}` +
|
||||||
|
`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-right"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>` +
|
||||||
|
`<a class="entry-link" href="${results[item].item.permalink}" aria-label="${results[item].item.title}"></a>` +
|
||||||
|
`</li>`
|
||||||
}
|
}
|
||||||
|
|
||||||
resList.innerHTML = resultSet;
|
resList.innerHTML = resultSet;
|
||||||
|
|||||||
Reference in New Issue
Block a user