Multi-line tag support, watch component files, and cleanup (#624)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Juro Oravec 2024-08-28 07:46:48 +02:00 committed by GitHub
parent b26a201138
commit ab059f362d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 217 additions and 50 deletions

View file

@ -37,7 +37,22 @@ class SimpleComponent(Component):
class BreadcrumbComponent(Component):
template_name = "mdn_component_template.html"
template: types.django_html = """
<div class="breadcrumb-container">
<nav class="breadcrumbs">
<ol typeof="BreadcrumbList" vocab="https://schema.org/" aria-label="breadcrumbs">
{% for label, url in links %}
<li property="itemListElement" typeof="ListItem">
<a class="breadcrumb-current-page" property="item" typeof="WebPage" href="{{ url }}">
<span property="name">{{ label }}</span>
</a>
<meta property="position" content="4">
</li>
{% endfor %}
</ol>
</nav>
</div>
"""
LINKS = [
(