mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed overly large headlines in search results (8.5.0 regression)
This commit is contained in:
parent
fc0e4fe611
commit
8ee2de9998
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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 %}
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user