mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-08 13:45:21 +00:00
search representation fix
This commit is contained in:
parent
43c28d459f
commit
b6bd818cb9
@ -156,9 +156,21 @@
|
|||||||
resultsHTML += '<div>';
|
resultsHTML += '<div>';
|
||||||
// we need to add title, url from ref
|
// we need to add title, url from ref
|
||||||
results.forEach(r => {
|
results.forEach(r => {
|
||||||
resultsHTML += `<div class="searchresult"><a class="search-link" href="${r.url}">${r.title}</a><span onclick="window.location='${r.url}'"><div class="header-meta">
|
resultsHTML += `<div class="searchresult">
|
||||||
{% if tags %}<div class="header-tags">{% for tag in tags %}<a class="tag" href="JavaScript:Void(0);">#{{tag}}</a>{% endfor %}</a>{% endif %}
|
<a class="search-link" href="${r.url}">${r.title}</a>
|
||||||
</div>${r.content}</span></div>`;
|
<div onclick="window.location='${r.url}'">
|
||||||
|
<div class="header-meta">
|
||||||
|
{% if tags %}
|
||||||
|
<div class="header-tags">
|
||||||
|
{% for tag in tags %}
|
||||||
|
<a class="tag" href="JavaScript:Void(0);">#{{tag}}</a>
|
||||||
|
{% endfor %}</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
${r.content}
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
});
|
});
|
||||||
resultsHTML += '</div>';
|
resultsHTML += '</div>';
|
||||||
resultsDiv.innerHTML = resultsHTML;
|
resultsDiv.innerHTML = resultsHTML;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user