Commit bd6bfe92b9
Verified · cmc
Layout: unified · split
content/templates/base.html +6
| @@ -62,8 +62,14 @@ | ||
| 62 | 62 | <a class="mark" href="{{ root }}index.html">Christian Cleberg</a> |
| 63 | 63 | <nav aria-label="Site Navigation"> |
| 64 | 64 | <ul> |
| 65 | {#- orgo gives the current page's entry the url "#"; link it to itself instead and mark | |
| 66 | it, so the nav says where you are. #} | |
| 65 | 67 | {%- for item in nav %} |
| 68 | {%- if item.url == "#" %} | |
| 69 | <li><a href="{{ root }}{{ page.url }}" aria-current="page">{{ item.title | capitalize }}</a></li> | |
| 70 | {%- else %} | |
| 66 | 71 | <li><a href="{{ item.url }}">{{ item.title | capitalize }}</a></li> |
| 72 | {%- endif %} | |
| 67 | 73 | {%- endfor %} |
| 68 | 74 | </ul> |
| 69 | 75 | </nav> |
theme/static/styles.css +2 −1
| @@ -26,7 +26,8 @@ header.site, footer.site { max-width: var(--wide); margin: 0 auto; padding: 1.5r | ||
| 26 | 26 | header.site .mark { color: var(--fg); font-weight: 650; text-decoration: none; } |
| 27 | 27 | header.site ul, footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; } |
| 28 | 28 | header.site nav a { color: var(--soft); text-decoration: none; } |
| 29 | header.site nav a:hover { color: var(--fg); } | |
| 29 | header.site nav a:hover, header.site nav a[aria-current] { color: var(--fg); } | |
| 30 | header.site nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; } | |
| 30 | 31 | footer.site { border-top: 1px solid var(--rule); margin-top: clamp(3rem, 7vw, 5rem); padding-bottom: 3rem; color: var(--soft); font-size: .95rem; } |
| 31 | 32 | footer.site a { color: var(--soft); } |
| 32 | 33 | footer.site a:hover { color: var(--fg); } |