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,17 +94,21 @@ function renderSearchDocument(
{truncate(document.text, 320)} {truncate(document.text, 320)}
</p> </p>
} }
{document.tags && document.tags.map(tag => { {document.tags && (
const id = tag.replace(/<[^>]+>/g, "") <div class="md-typeset">
const type = tags {document.tags.map(tag => {
? id in tags const id = tag.replace(/<[^>]+>/g, "")
? `md-tag-icon md-tag-icon--${tags[id]}` const type = tags
: "md-tag-icon" ? id in tags
: "" ? `md-tag-icon md-tag-icon--${tags[id]}`
return ( : "md-tag-icon"
<span class={`md-tag ${type}`}>{tag}</span> : ""
) return (
})} <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}