Fixed overly large headlines in search results (8.5.0 regression)

This commit is contained in:
squidfunk 2022-09-18 16:09:03 +02:00
parent fc0e4fe611
commit 8ee2de9998
4 changed files with 21 additions and 17 deletions

View File

@ -245,7 +245,7 @@
</script> </script>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/bundle.6cef57a0.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.0671d99f.min.js' | url }}"></script>
{% for path in config.extra_javascript %} {% for path in config.extra_javascript %}
<script src="{{ path | url }}"></script> <script src="{{ path | url }}"></script>
{% endfor %} {% endfor %}

View File

@ -81,7 +81,7 @@ function renderSearchDocument(
return ( return (
<a href={`${url}`} class="md-search-result__link" tabIndex={-1}> <a href={`${url}`} class="md-search-result__link" tabIndex={-1}>
<article <article
class={["md-search-result__article", "md-typeset", ...parent class={["md-search-result__article", ...parent
? ["md-search-result__article--document"] ? ["md-search-result__article--document"]
: [] : []
].join(" ")} ].join(" ")}
@ -94,7 +94,9 @@ function renderSearchDocument(
{truncate(document.text, 320)} {truncate(document.text, 320)}
</p> </p>
} }
{document.tags && document.tags.map(tag => { {document.tags && (
<div class="md-typeset">
{document.tags.map(tag => {
const id = tag.replace(/<[^>]+>/g, "") const id = tag.replace(/<[^>]+>/g, "")
const type = tags const type = tags
? id in tags ? id in tags
@ -105,6 +107,8 @@ function renderSearchDocument(
<span class={`md-tag ${type}`}>{tag}</span> <span class={`md-tag ${type}`}>{tag}</span>
) )
})} })}
</div>
)}
{teaser > 0 && missing.length > 0 && {teaser > 0 && missing.length > 0 &&
<p class="md-search-result__terms"> <p class="md-search-result__terms">
{translation("search.result.term.missing")}: {...missing} {translation("search.result.term.missing")}: {...missing}