Tweak Nunjucks indentation

This commit is contained in:
Helen Chong 2025-04-02 01:03:14 +08:00
parent 1943159f11
commit 1d5d5acec9
18 changed files with 115 additions and 115 deletions

View File

@ -5,10 +5,10 @@ shrineHomeUrl: /shrines/asummersend/
{% extends "global/navbar.njk" %} {% extends "global/navbar.njk" %}
{% block navbarLinks %} {% block navbarLinks %}
{% set navPages = collections.all | eleventyNavigation("A Summers End Shrine") %} {% set navPages = collections.all | eleventyNavigation("A Summers End Shrine") %}
{%- 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>
</li> </li>
{%- endfor %} {%- endfor %}
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% for log in changelogList | reverse %} {% for log in changelogList | reverse %}
{% headingAnchor 2, log.fileSlug %} {% headingAnchor 2, log.fileSlug %}
{{ log.date | formatDate }} {{ log.date | formatDate }}
{% endheadingAnchor %} {% endheadingAnchor %}
{{ log.content | safe }} {{ log.content | safe }}
{%- endfor %} {%- endfor %}

View File

@ -44,5 +44,5 @@ isContentDivided: true
<a href="#linktabs" class="tab__btn tab__back">Back to tabs</a> <a href="#linktabs" class="tab__btn tab__back">Back to tabs</a>
</section> </section>
{%- endfor %} {%- endfor %}
</article> </article>

View File

@ -1,11 +1,11 @@
{% extends "global/navbar.njk" %} {% extends "global/navbar.njk" %}
{% block navbarLinks %} {% block navbarLinks %}
{% set currentUrl %}{{ page.url }}{% endset %} {% set currentUrl %}{{ page.url }}{% endset %}
{% set navPages = collections["navbar links"] | eleventyNavigation %} {% set navPages = collections["navbar links"] | eleventyNavigation %}
{%- 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>
</li> </li>
{%- endfor %} {%- endfor %}
{% endblock %} {% endblock %}

View File

@ -5,10 +5,10 @@ shrineHomeUrl: /shrines/pokemonoras/
{% extends "global/navbar.njk" %} {% extends "global/navbar.njk" %}
{% block navbarLinks %} {% block navbarLinks %}
{% set navPages = collections.all | eleventyNavigation("ORAS Shrine") %} {% set navPages = collections.all | eleventyNavigation("ORAS Shrine") %}
{%- 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>
</li> </li>
{%- endfor %} {%- endfor %}
{% endblock %} {% endblock %}

View File

@ -5,10 +5,10 @@ shrineHomeUrl: /shrines/starwarskotor/
{% extends "global/navbar.njk" %} {% extends "global/navbar.njk" %}
{% block navbarLinks %} {% block navbarLinks %}
{% set navPages = collections.all | eleventyNavigation("KotOR Shrine") %} {% set navPages = collections.all | eleventyNavigation("KotOR Shrine") %}
{%- 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>
</li> </li>
{%- endfor %} {%- endfor %}
{% endblock %} {% endblock %}

View File

@ -26,15 +26,15 @@ eleventyNavigation:
</ul> </ul>
{%- css %} {%- css %}
.blog__postlist { .blog__postlist {
display: grid; display: grid;
gap: 1em; gap: 1em;
padding-left: 1em; padding-left: 1em;
} }
.blog__postlist--title { .blog__postlist--title {
font-size: clamp(1.55rem, 1rem + 3vw, 1.3rem); font-size: clamp(1.55rem, 1rem + 3vw, 1.3rem);
line-height: 1.3; line-height: 1.3;
margin-bottom: 0.2em; margin-bottom: 0.2em;
} }
{% endcss %} {% endcss %}

View File

@ -9,10 +9,10 @@ eleventyNavigation:
--- ---
{%- macro siteLayout(params) -%} {%- macro siteLayout(params) -%}
## {{ params.title }} ## {{ params.title }}
{% for screenshot in params.screenshots %} {% for screenshot in params.screenshots %}
<img src="/assets/layouts/{{ screenshot.imgFile }}" alt="{{ screenshot.imgAlt }}" loading="lazy"> <img src="/assets/layouts/{{ screenshot.imgFile }}" alt="{{ screenshot.imgAlt }}" loading="lazy">
{% endfor %} {% endfor %}
{%- endmacro -%} {%- endmacro -%}
{{ siteLayout({ {{ siteLayout({

View File

@ -16,8 +16,8 @@ eleventyNavigation:
<h2>Latest Changelogs</h2> <h2>Latest Changelogs</h2>
{% for log in changelogs %} {% for log in changelogs %}
<h3 class="date-style"><time datetime="{{ log.date }}">{{ log.date | formatDate }}</time></h3> <h3 class="date-style"><time datetime="{{ log.date }}">{{ log.date | formatDate }}</time></h3>
{{ log.content | safe }} {{ log.content | safe }}
{%- endfor %} {%- endfor %}
{% include "global/pagination-oldnew.njk" %} {% include "global/pagination-oldnew.njk" %}

View File

@ -10,25 +10,25 @@ eleventyNavigation:
--- ---
{%- macro virtualPet(url, img, alt, tooltip=alt) -%} {%- macro virtualPet(url, img, alt, tooltip=alt) -%}
<li data-tooltip> <li data-tooltip>
<a href="{{ url }}" data-tooltip-trigger title="{{ tooltip }}"> <a href="{{ url }}" data-tooltip-trigger title="{{ tooltip }}">
<img src="{{ img }}" alt="{{ alt }}" loading="lazy"> <img src="{{ img }}" alt="{{ alt }}" loading="lazy">
</a> </a>
</li> </li>
{%- endmacro -%} {%- endmacro -%}
{%- macro myPixelArt(file, alt, tooltip=alt) -%} {%- macro myPixelArt(file, alt, tooltip=alt) -%}
<li data-tooltip> <li data-tooltip>
<img src="/assets/adoptables/{{ file }}" alt="{{ alt }}" data-tooltip-trigger title="{{ tooltip }}" loading="lazy" tabindex="0"> <img src="/assets/adoptables/{{ file }}" alt="{{ alt }}" data-tooltip-trigger title="{{ tooltip }}" loading="lazy" tabindex="0">
</li> </li>
{%- endmacro -%} {%- endmacro -%}
{%- macro adoptable(url, file, alt, tooltip=alt) -%} {%- macro adoptable(url, file, alt, tooltip=alt) -%}
<li data-tooltip> <li data-tooltip>
<a href="{{ url }}" data-tooltip-trigger title="{{ tooltip }}"> <a href="{{ url }}" data-tooltip-trigger title="{{ tooltip }}">
<img src="/assets/adoptables/{{ file }}" alt="{{ alt }}" loading="lazy"> <img src="/assets/adoptables/{{ file }}" alt="{{ alt }}" loading="lazy">
</a> </a>
</li> </li>
{%- endmacro -%} {%- endmacro -%}
<section class="content__section"> <section class="content__section">

View File

@ -17,18 +17,18 @@ eleventyComputed:
{% container "section", "content__section" %} {% container "section", "content__section" %}
## My Code Projects ## My Code Projects
<ul> <ul>
{%- for project in collections["code projects"] -%} {%- for project in collections["code projects"] -%}
<li><a href="{{ project.url }}">{{ project.data.title }}</a> — {{ project.data.desc }}</li> <li><a href="{{ project.url }}">{{ project.data.title }}</a> — {{ project.data.desc }}</li>
{%- endfor -%} {%- endfor -%}
</ul> </ul>
{% endcontainer %} {% endcontainer %}
{% container "section", "content__section" %} {% container "section", "content__section" %}
## My Code Snippets ## My Code Snippets
<ul> <ul>
{%- for snippet in collections["code snippets"] -%} {%- for snippet in collections["code snippets"] -%}
<li><a href="{{ snippet.url }}">{{ snippet.data.title }}</a> — {{ snippet.data.desc }}</li> <li><a href="{{ snippet.url }}">{{ snippet.data.title }}</a> — {{ snippet.data.desc }}</li>
{%- endfor -%} {%- endfor -%}
</ul> </ul>
{% endcontainer %} {% endcontainer %}
@ -45,11 +45,11 @@ My drawings can be found on my art blog on Tumblr:
I have created mods (short for "modifications") for the following video games: I have created mods (short for "modifications") for the following video games:
<ul> <ul>
{%- for mods in collections["video game mods"] -%} {%- for mods in collections["video game mods"] -%}
<li> <li>
<a href="{{ mods.url }}">{{ mods.data.title }}</a> <a href="{{ mods.url }}">{{ mods.data.title }}</a>
</li> </li>
{%- endfor -%} {%- endfor -%}
</ul> </ul>
{% endcontainer %} {% endcontainer %}