Set shrine home link on the global navbar template
This commit is contained in:
parent
dc956fb995
commit
296a902f1e
|
@ -1,12 +1,11 @@
|
||||||
|
---
|
||||||
|
shrineHomeUrl: /shrines/asummersend/
|
||||||
|
---
|
||||||
|
|
||||||
{% extends "global/navbar.njk" %}
|
{% extends "global/navbar.njk" %}
|
||||||
|
|
||||||
{% block navbarLinks %}
|
{% block navbarLinks %}
|
||||||
{% set shrineHomeUrl %}/shrines/asummersend/{% endset %}
|
|
||||||
{% set navPages = collections.all | eleventyNavigation("A Summer’s End Shrine") %}
|
{% set navPages = collections.all | eleventyNavigation("A Summer’s End Shrine") %}
|
||||||
{% set currentUrl %}{{ page.url }}{% endset %}
|
|
||||||
<li>
|
|
||||||
<a {% if currentUrl === shrineHomeUrl %}aria-current="page"{% endif %} href="{{ shrineHomeUrl }}">Shrine Home</a>
|
|
||||||
</li>
|
|
||||||
{%- for entry in navPages %}
|
{%- for entry in navPages %}
|
||||||
<li>
|
<li>
|
||||||
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
|
---
|
||||||
|
shrineHomeUrl: /shrines/cassettebeasts/
|
||||||
|
---
|
||||||
|
|
||||||
{% extends "global/navbar.njk" %}
|
{% extends "global/navbar.njk" %}
|
||||||
|
|
||||||
{% block navbarLinks %}
|
{% block navbarLinks %}
|
||||||
{% set shrineHomeUrl %}/shrines/cassettebeasts/{% endset %}
|
|
||||||
{% set navPages = collections.all | eleventyNavigation("Cassette Beasts Shrine") %}
|
{% set navPages = collections.all | eleventyNavigation("Cassette Beasts Shrine") %}
|
||||||
{% set currentUrl %}{{ page.url }}{% endset %}
|
|
||||||
<li>
|
|
||||||
<a {% if currentUrl === shrineHomeUrl %}aria-current="page"{% endif %} href="{{ shrineHomeUrl }}">Shrine Home</a>
|
|
||||||
</li>
|
|
||||||
{%- for entry in navPages %}
|
{%- for entry in navPages %}
|
||||||
<li>
|
<li>
|
||||||
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
https://kalechips.net/projects/snippets/burger #}
|
https://kalechips.net/projects/snippets/burger #}
|
||||||
|
|
||||||
{% set navLinksEl %}
|
{% set navLinksEl %}
|
||||||
|
{%- if tags and tags.includes("shrine pages") %}
|
||||||
|
<li>
|
||||||
|
<a {% if currentUrl === shrineHomeUrl %}aria-current="page"{% endif %} href="{{ shrineHomeUrl }}">Shrine Home</a>
|
||||||
|
</li>
|
||||||
|
{%- endif -%}
|
||||||
{% block navbarLinks %}{% endblock %}
|
{% block navbarLinks %}{% endblock %}
|
||||||
{%- if tags and tags.includes("shrine pages") %}
|
{%- if tags and tags.includes("shrine pages") %}
|
||||||
<li><a href="/shrines/">Shrine Directory</a></li>
|
<li><a href="/shrines/">Shrine Directory</a></li>
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
|
---
|
||||||
|
shrineHomeUrl: /shrines/starwarskotor/
|
||||||
|
---
|
||||||
|
|
||||||
{% extends "global/navbar.njk" %}
|
{% extends "global/navbar.njk" %}
|
||||||
|
|
||||||
{% block navbarLinks %}
|
{% block navbarLinks %}
|
||||||
{% set shrineHomeUrl %}/shrines/starwarskotor/{% endset %}
|
|
||||||
{% set navPages = collections.all | eleventyNavigation("KotOR Shrine") %}
|
{% set navPages = collections.all | eleventyNavigation("KotOR Shrine") %}
|
||||||
{% set currentUrl %}{{ page.url }}{% endset %}
|
|
||||||
<li>
|
|
||||||
<a {% if currentUrl === shrineHomeUrl %}aria-current="page"{% endif %} href="{{ shrineHomeUrl }}">Shrine Home</a>
|
|
||||||
</li>
|
|
||||||
{%- for entry in navPages %}
|
{%- for entry in navPages %}
|
||||||
<li>
|
<li>
|
||||||
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
<a {% if entry.url == page.url %}aria-current="page"{% endif %} href="{{ entry.url }}">{{ entry.title }}</a>
|
||||||
|
|
Loading…
Reference in New Issue