mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Fixed rendering of tags in search
This commit is contained in:
parent
43a22b6150
commit
06fe18af7e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.56dfad97.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.d6f25eb3.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -88,7 +88,9 @@ function renderSearchDocument(
|
||||
{teaser > 0 && document.text.length > 0 &&
|
||||
document.text
|
||||
}
|
||||
{document.tags && document.tags.map(tag => {
|
||||
{document.tags && (
|
||||
<nav class="md-tags">
|
||||
{document.tags.map(tag => {
|
||||
const type = tags
|
||||
? tag in tags
|
||||
? `md-tag-icon md-tag--${tags[tag]}`
|
||||
@ -98,6 +100,8 @@ function renderSearchDocument(
|
||||
<span class={`md-tag ${type}`}>{tag}</span>
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
)}
|
||||
{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