Remove list element from breadcrumbs

This commit is contained in:
Helen Chong 2025-01-10 17:27:46 +08:00
parent d1204c0b4b
commit 17acf5b6ec
1 changed files with 7 additions and 17 deletions

View File

@ -1,15 +1,12 @@
<header class="main__header"> <header class="main__header">
{% if isArticle or hasBreadcrumbs %} {% if isArticle or hasBreadcrumbs %}
<nav aria-labelledby="breadcrumbs-title"> <nav class="breadcrumbs" aria-labelledby="breadcrumbs-title">
<h2 class="visually-hidden" id="breadcrumbs-title">Breadcrumbs</h2> <h2 class="visually-hidden" id="breadcrumbs-title">Breadcrumbs</h2>
<ol class="breadcrumbs"> {% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key or articleTitle or pageTitle or title) %}
{% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key or articleTitle or pageTitle or title) %} {%- for entry in breadcrumbNavPages %}
{%- for entry in breadcrumbNavPages %} <a href="{{ entry.url }}">{{ entry.title }}</a>
<li> <span aria-hidden="true">➔</span>
<a href="{{ entry.url }}">{{ entry.title }}</a> {%- endfor %}
</li>
{%- endfor %}
</ol>
</nav> </nav>
{% endif %} {% endif %}
@ -90,20 +87,13 @@
{%- css %} {%- css %}
.breadcrumbs { .breadcrumbs {
list-style-type: ""; margin-bottom: 0.7em;
padding: 0;
margin: 0 0 0.7em 0;
display: flex; display: flex;
gap: 0.5em; gap: 0.5em;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
} }
.breadcrumbs li::after {
content: '➔';
padding-left: 0.3em;
}
.blog__post--pagination { .blog__post--pagination {
padding-top: 1em; padding-top: 1em;
margin-block-start: 2.5em; margin-block-start: 2.5em;