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>
|
||||
{% endblock %}
|
||||
{% 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 %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -81,7 +81,7 @@ function renderSearchDocument(
|
||||
return (
|
||||
<a href={`${url}`} class="md-search-result__link" tabIndex={-1}>
|
||||
<article
|
||||
class={["md-search-result__article", "md-typeset", ...parent
|
||||
class={["md-search-result__article", ...parent
|
||||
? ["md-search-result__article--document"]
|
||||
: []
|
||||
].join(" ")}
|
||||
@ -94,17 +94,21 @@ function renderSearchDocument(
|
||||
{truncate(document.text, 320)}
|
||||
</p>
|
||||
}
|
||||
{document.tags && document.tags.map(tag => {
|
||||
const id = tag.replace(/<[^>]+>/g, "")
|
||||
const type = tags
|
||||
? id in tags
|
||||
? `md-tag-icon md-tag-icon--${tags[id]}`
|
||||
: "md-tag-icon"
|
||||
: ""
|
||||
return (
|
||||
<span class={`md-tag ${type}`}>{tag}</span>
|
||||
)
|
||||
})}
|
||||
{document.tags && (
|
||||
<div class="md-typeset">
|
||||
{document.tags.map(tag => {
|
||||
const id = tag.replace(/<[^>]+>/g, "")
|
||||
const type = tags
|
||||
? id in tags
|
||||
? `md-tag-icon md-tag-icon--${tags[id]}`
|
||||
: "md-tag-icon"
|
||||
: ""
|
||||
return (
|
||||
<span class={`md-tag ${type}`}>{tag}</span>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
{teaser > 0 && missing.length > 0 &&
|
||||
<p class="md-search-result__terms">
|
||||
{translation("search.result.term.missing")}: {...missing}
|
||||
|
Loading…
Reference in New Issue
Block a user