After some out-of-band discussion I decided to make the navigation structure more literal. That has the advantage of being slightly less source code and slightly smaller output, but more importantly it seems to degrade more gracefully and less noisily for limited clients, such as screen readers and text browsers. Since the overall change is really large and the changes may be hard to spot, here's the diff against v2. diff --git a/Documentation/_includes/breadcrumb.html b/Documentation/_includes/breadcrumb.html index f759807..3b93128 100644 --- a/Documentation/_includes/breadcrumb.html +++ b/Documentation/_includes/breadcrumb.html @@ -4,20 +4,18 @@ SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work> {% endcomment %} {%- unless page.url == '/' -%} <nav aria-label="Breadcrumb"> - <ol> - <li><a href="/">Spectrum</a></li> - {%- assign parts = page.url | split: '/' -%} - {%- assign acc = '' -%} - {%- for part in parts offset: 1 -%} - {%- assign acc = acc | append: '/' | append: part -%} - {%- assign parent_url = acc | append: '/' -%} - {%- if parent_url == page.url -%}{%- continue -%}{%- endif -%} - {%- assign parent = site.pages | where: 'url', parent_url | first -%} - {%- if parent %} - <li><a href="{{ parent.url }}">{{ parent.title }}</a></li> - {%- endif -%} - {%- endfor %} - <li aria-current="page">{{ page.title }}</li> - </ol> + <a href="/">Spectrum</a> + {%- assign parts = page.url | split: '/' -%} + {%- assign acc = '' -%} + {%- for part in parts offset: 1 -%} + {%- assign acc = acc | append: '/' | append: part -%} + {%- assign parent_url = acc | append: '/' -%} + {%- if parent_url == page.url -%}{%- continue -%}{%- endif -%} + {%- assign parent = site.pages | where: 'url', parent_url | first -%} + {%- if parent %} + / <a href="{{ parent.url }}">{{ parent.title }}</a> + {%- endif -%} + {%- endfor %} + / <span aria-current="page">{{ page.title }}</span> </nav> {%- endunless -%} diff --git a/Documentation/_includes/footer_custom.html b/Documentation/_includes/footer.html similarity index 82% rename from Documentation/_includes/footer_custom.html rename to Documentation/_includes/footer.html index db29f82..d0e2c0b 100644 --- a/Documentation/_includes/footer_custom.html +++ b/Documentation/_includes/footer.html @@ -3,18 +3,19 @@ SPDX-FileCopyrightText: 2020 Alyssa Ross <hi@alyssa.is> SPDX-License-Identifier: CC-BY-SA-4.0 OR GFDL-1.3-no-invariants-or-later {% endcomment %} <p> -<small>Permission is granted to copy, distribute and/or modify this +Permission is granted to copy, distribute and/or modify this document under either the terms of the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>, or the <a href="https://www.gnu.org/licenses/fdl-1.3.html">GNU Free Documentation License, Version 1.3</a> or any later version published by the Free Software Foundation; with no Invariant Sections, no -Front-Cover Texts, and no Back-Cover Texts.</small> +Front-Cover Texts, and no Back-Cover Texts. -<p><small> +<nav aria-label="Footer"> <a href="/sitemap.html">Sitemap</a> -· +· <a href="https://spectrum-os.org/git/spectrum/tree/Documentation/{{ page.path }}">Source code for this page</a> -· +· <a href="/impressum.html" lang="de">Impressum</a> +</nav> diff --git a/Documentation/_includes/sitemap.html b/Documentation/_includes/sitemap.html index 51c5bb0..26e96ec 100644 --- a/Documentation/_includes/sitemap.html +++ b/Documentation/_includes/sitemap.html @@ -33,7 +33,9 @@ which we assume if it is constructed by a directory and contains an index file. `assign` is page-global. A recursive include below may have overwritten `prefix`. {%- endcomment %} {%- assign prefix = include.prefix | default: default_root -%} - {%- assign suffix = p.url | remove_first: prefix -%} + {%- assign url_start = p.url | slice: 0, prefix.size -%} + {%- if url_start == prefix -%} + {%- assign suffix = p.url | slice: prefix.size, p.url.size -%} {%- assign without_slashes = suffix | replace: "/", "" -%} {%- assign slashes = suffix.size | minus: without_slashes.size -%} {%- assign is_index = false -%} @@ -51,6 +53,7 @@ which we assume if it is constructed by a directory and contains an index file. {%- endif -%} </li> {%- endif -%} + {%- endif -%} {%- endfor -%} {%- endcapture -%} {%- assign trimmed = inner | strip -%} diff --git a/Documentation/_layouts/page.html b/Documentation/_layouts/page.html index f2cf0f6..4eba50d 100644 --- a/Documentation/_layouts/page.html +++ b/Documentation/_layouts/page.html @@ -24,5 +24,5 @@ SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work> {{ content }} -{% include footer_custom.html %} +{% include footer.html %} </html> diff --git a/Documentation/contributing.html b/Documentation/contributing.html index 6e5fc00..9bb21d8 100644 --- a/Documentation/contributing.html +++ b/Documentation/contributing.html @@ -22,8 +22,8 @@ If you're interested in contributing code to Spectrum, you can <a href="https://spectrum-os.org/git/">find</a> the source repositories online. -If you've made changes you'd like to be included -in the official Spectrum distribution, please send patches to the +If you've made changes you'd like to be included in the official +Spectrum distribution, please send patches to the spectrum-devel <a href="https://lists.spectrum-os.org/mailman3/lists/devel.spectrum-os.org/"> mailing list</a> (<a href="mailto:devel@spectrum-os.org">devel@spectrum-os.org</a>). diff --git a/Documentation/style.css b/Documentation/style.css index 44060b3..ae617c5 100644 --- a/Documentation/style.css +++ b/Documentation/style.css @@ -26,16 +26,8 @@ var { background: yellow; } -nav[aria-label="Breadcrumb"] ol { - list-style: none; - padding: 0; - display: flex; - flex-wrap: wrap; -} - -nav[aria-label="Breadcrumb"] li + li::before { - content: "/"; - padding: 0 0.5em; +footer { + font-size: small; } :root { -- 2.54.0