Adjust intendation in Nunjucks templates

This commit is contained in:
Leilukin 2025-04-10 22:40:57 +08:00 committed by Helen Chong
parent ae6ad1d66f
commit 4e745d3b97
17 changed files with 192 additions and 192 deletions

View File

@ -1,6 +1,6 @@
{% extends "global/footer.njk" %} {% extends "global/footer.njk" %}
{% block footerContent %} {% block footerContent %}
<p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 16 February 2023</p> <p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 16 February 2023</p>
{% endblock %} {% endblock %}

View File

@ -1,21 +1,21 @@
{% extends "global/hero.njk" %} {% extends "global/hero.njk" %}
{% block heroImg %} {% block heroImg %}
<picture> <picture>
<source srcset="/assets/shrines/asummersend/images/asummersend-header-320.avif" media="(orientation: landscape)" /> <source srcset="/assets/shrines/asummersend/images/asummersend-header-320.avif" media="(orientation: landscape)" />
<img src="/assets/shrines/asummersend/images/asummersend-header.avif" alt="Banner of A Summers End — Hong Kong 1986 Shrine" /> <img src="/assets/shrines/asummersend/images/asummersend-header.avif" alt="Banner of A Summers End — Hong Kong 1986 Shrine" />
</picture> </picture>
{% endblock %} {% endblock %}
{% block eventScript %} {% block eventScript %}
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent) { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent; heroTopBarEl.innerHTML = todayEvent;
} }
function getTodayEvent() { function getTodayEvent() {
const date = new Date(); const date = new Date();
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
@ -42,5 +42,5 @@
`; `;
else else
return null; return null;
} }
{% endblock %} {% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "global/shrineinfo.njk" %} {% extends "global/shrineinfo.njk" %}
{% block shrineAbout %} {% block shrineAbout %}
<p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "A Summers End — Hong Kong 1986" %}, an indie visual novel developed by Oracle and Bone. Set in 1980s Hong Kong, it tells of a love story between two women.</p> <p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "A Summers End — Hong Kong 1986" %}, an indie visual novel developed by Oracle and Bone. Set in 1980s Hong Kong, it tells of a love story between two women.</p>
{% endblock %} {% endblock %}
{% block shrineLinks %} {% block shrineLinks %}
<li><a href="https://www.asummersend.com/">Official Website</a> <li><a href="https://www.asummersend.com/">Official Website</a>
</li> </li>
<li><a href="https://store.steampowered.com/app/1111370/A_Summers_End__Hong_Kong_1986/">Steam</a></li> <li><a href="https://store.steampowered.com/app/1111370/A_Summers_End__Hong_Kong_1986/">Steam</a></li>
<li><a href="https://oracleandbone.itch.io/a-summers-end">itch.io</a></li> <li><a href="https://oracleandbone.itch.io/a-summers-end">itch.io</a></li>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "global/footer.njk" %} {% extends "global/footer.njk" %}
{% block footerContent %} {% block footerContent %}
<p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 3 August 2023</p> <p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 3 August 2023</p>
{% endblock %} {% endblock %}

View File

@ -1,21 +1,21 @@
{% extends "global/hero.njk" %} {% extends "global/hero.njk" %}
{% block heroImg %} {% block heroImg %}
<picture> <picture>
<source srcset="/assets/shrines/cassettebeasts/images/cassettebeasts-header-320.avif" media="(orientation: landscape)" /> <source srcset="/assets/shrines/cassettebeasts/images/cassettebeasts-header-320.avif" media="(orientation: landscape)" />
<img src="/assets/shrines/cassettebeasts/images/cassettebeasts-header-640.avif" alt="Banner of Cassette Beasts Shrine" /> <img src="/assets/shrines/cassettebeasts/images/cassettebeasts-header-640.avif" alt="Banner of Cassette Beasts Shrine" />
</picture> </picture>
{% endblock %} {% endblock %}
{% block eventScript %} {% block eventScript %}
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent) { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent; heroTopBarEl.innerHTML = todayEvent;
} }
function getTodayEvent() { function getTodayEvent() {
const date = new Date(); const date = new Date();
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
@ -36,5 +36,5 @@
`; `;
else else
return null; return null;
} }
{% endblock %} {% endblock %}

View File

@ -1,14 +1,14 @@
{% extends "global/shrineinfo.njk" %} {% extends "global/shrineinfo.njk" %}
{% block shrineAbout %} {% block shrineAbout %}
<p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Cassette Beasts" %}, an indie monster collecting turn-based open-world role-playing video game developed by Bytten Studio and published by Raw Fury.</p> <p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Cassette Beasts" %}, an indie monster collecting turn-based open-world role-playing video game developed by Bytten Studio and published by Raw Fury.</p>
{% endblock %} {% endblock %}
{% block shrineLinks %} {% block shrineLinks %}
<li><a href="https://www.cassettebeasts.com/">Official Website</a> <li><a href="https://www.cassettebeasts.com/">Official Website</a>
</li> </li>
<li><a href="https://wiki.cassettebeasts.com/">Official Wiki</a></li> <li><a href="https://wiki.cassettebeasts.com/">Official Wiki</a></li>
<li><a href="https://store.steampowered.com/app/1321440/Cassette_Beasts/">Steam</a></li> <li><a href="https://store.steampowered.com/app/1321440/Cassette_Beasts/">Steam</a></li>
<li><a href="https://bytten-studio.com/">Bytten Studio</a></li> <li><a href="https://bytten-studio.com/">Bytten Studio</a></li>
<li><a href="https://fan.leilukin.com/cassettebeasts/">Cassette Beasts fanlisting</a></li> <li><a href="https://fan.leilukin.com/cassettebeasts/">Cassette Beasts fanlisting</a></li>
{% endblock %} {% endblock %}

View File

@ -1,9 +1,9 @@
{% extends "global/footer.njk" %} {% extends "global/footer.njk" %}
{% block footerContent %} {% block footerContent %}
<h2 class="visually-hidden">Footer Navigation:</h2> <h2 class="visually-hidden">Footer Navigation:</h2>
{% set currentUrl %}{{ page.url }}{% endset %} {% set currentUrl %}{{ page.url }}{% endset %}
<ul class="inline-nav footer__links"> <ul class="inline-nav footer__links">
<li> <li>
<a href="{{ sitemeta.feedPath }}"><svg class="inline-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 64C0 46.3 14.3 32 32 32c229.8 0 416 186.2 416 416c0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96C14.3 96 0 81.7 0 64zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zM32 160c159.1 0 288 128.9 288 288c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>RSS Feed</a> <a href="{{ sitemeta.feedPath }}"><svg class="inline-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 64C0 46.3 14.3 32 32 32c229.8 0 416 186.2 416 416c0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96C14.3 96 0 81.7 0 64zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zM32 160c159.1 0 288 128.9 288 288c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>RSS Feed</a>
</li> </li>
@ -23,7 +23,7 @@
href="{{ statement.url }}" href="{{ statement.url }}"
>{{ statement.data.title }}</a></li> >{{ statement.data.title }}</a></li>
{%- endfor -%} {%- endfor -%}
</ul> </ul>
<p>Made with ♥ by {{ sitemeta.siteAuthor.name }} since 11 September 2022</p> <p>Made with ♥ by {{ sitemeta.siteAuthor.name }} since 11 September 2022</p>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "global/hero.njk" %} {% extends "global/hero.njk" %}
{% block heroImg %} {% block heroImg %}
<img fetchpriority="high" src="/assets/leilukin/Leilukins-Hub-website-banner.avif" alt="Banner of Leilukin's Hub" width="900" height="300"> <img fetchpriority="high" src="/assets/leilukin/Leilukins-Hub-website-banner.avif" alt="Banner of Leilukin's Hub" width="900" height="300">
{% endblock %} {% endblock %}
{% set heroDropShadow %} {% set heroDropShadow %}

View File

@ -13,12 +13,12 @@
{%- css %}#statuscafe-content { margin-bottom: 0.5em; }{% endcss %} {%- css %}#statuscafe-content { margin-bottom: 0.5em; }{% endcss %}
{%- js %} {%- js %}
const statusCafeContent = document.getElementById("statuscafe-content"); const statusCafeContent = document.getElementById("statuscafe-content");
statusCafeContent.innerHTML = ` statusCafeContent.innerHTML = `
<p>Fetching data from status.cafe...</p> <p>Fetching data from status.cafe...</p>
`; `;
const fetchStatusCafe = async () => { const fetchStatusCafe = async () => {
try { try {
const res = await fetch('https://status.cafe/users/leilukin/status.json'); const res = await fetch('https://status.cafe/users/leilukin/status.json');
const data = await res.json(); const data = await res.json();
@ -34,6 +34,6 @@
console.error(error); console.error(error);
document.getElementById("statuscafe-content").textContent = `[ERROR] ${error}`; document.getElementById("statuscafe-content").textContent = `[ERROR] ${error}`;
} }
}; };
fetchStatusCafe(); fetchStatusCafe();
{% endjs %} {% endjs %}

View File

@ -1,6 +1,6 @@
{% extends "global/footer.njk" %} {% extends "global/footer.njk" %}
{% block footerContent %} {% block footerContent %}
<p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 21 November 2024</p> <p>Made with ♥ by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 21 November 2024</p>
{% endblock %} {% endblock %}

View File

@ -1,21 +1,21 @@
{% extends "global/hero.njk" %} {% extends "global/hero.njk" %}
{% block heroImg %} {% block heroImg %}
<picture> <picture>
<source srcset="/assets/shrines/pokemonoras/images/pokemonoras-header-320.avif" media="(orientation: landscape)" /> <source srcset="/assets/shrines/pokemonoras/images/pokemonoras-header-320.avif" media="(orientation: landscape)" />
<img src="/assets/shrines/pokemonoras/images/pokemonoras-header-640.avif" alt="Banner of Pokémon Omega Ruby and Alpha Sapphire Shrine" /> <img src="/assets/shrines/pokemonoras/images/pokemonoras-header-640.avif" alt="Banner of Pokémon Omega Ruby and Alpha Sapphire Shrine" />
</picture> </picture>
{% endblock %} {% endblock %}
{% block eventScript %} {% block eventScript %}
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent) { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent; heroTopBarEl.innerHTML = todayEvent;
} }
function getTodayEvent() { function getTodayEvent() {
const date = new Date(); const date = new Date();
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
@ -30,5 +30,5 @@
`; `;
else else
return null; return null;
} }
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "global/shrineinfo.njk" %} {% extends "global/shrineinfo.njk" %}
{% block shrineAbout %} {% block shrineAbout %}
<p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Pokémon Omega Ruby and Alpha Sapphire" %}, remakes of the 2002 Game Boy Advance role-playing video games {% cite "Pokémon Ruby" %} and {% cite "Pokémon Sapphire" %}. The games are part of the sixth generation of the {% cite "Pokémon" %} main series of video games, developed by Game Freak and published by The Pokémon Company and Nintendo for the Nintendo 3DS.</p> <p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Pokémon Omega Ruby and Alpha Sapphire" %}, remakes of the 2002 Game Boy Advance role-playing video games {% cite "Pokémon Ruby" %} and {% cite "Pokémon Sapphire" %}. The games are part of the sixth generation of the {% cite "Pokémon" %} main series of video games, developed by Game Freak and published by The Pokémon Company and Nintendo for the Nintendo 3DS.</p>
{% endblock %} {% endblock %}
{% block shrineLinks %} {% block shrineLinks %}
<li><a href="https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Omega_Ruby_and_Alpha_Sapphire">Bulbapedia</a></li> <li><a href="https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Omega_Ruby_and_Alpha_Sapphire">Bulbapedia</a></li>
<li><a href="https://pkmn.redcrown.net/hoenn/"><cite>Pokémon Ruby</cite>, <cite>Sapphire</cite>, <cite>Omega Ruby</cite> and <cite>Alpha Sapphire</cite> fanlisting</a></li> <li><a href="https://pkmn.redcrown.net/hoenn/"><cite>Pokémon Ruby</cite>, <cite>Sapphire</cite>, <cite>Omega Ruby</cite> and <cite>Alpha Sapphire</cite> fanlisting</a></li>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "global/footer.njk" %} {% extends "global/footer.njk" %}
{% block footerContent %} {% block footerContent %}
<p>Made with ♥ and the Force by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 17 February 2023</p> <p>Made with ♥ and the Force by {{ sitemeta.siteAuthor.name }} • Shrine Launched: 17 February 2023</p>
{% endblock %} {% endblock %}

View File

@ -1,21 +1,21 @@
{% extends "global/hero.njk" %} {% extends "global/hero.njk" %}
{% block heroImg %} {% block heroImg %}
<picture> <picture>
<source srcset="/assets/shrines/starwarskotor/images/swkotor-header-320.avif" media="(orientation: landscape)" /> <source srcset="/assets/shrines/starwarskotor/images/swkotor-header-320.avif" media="(orientation: landscape)" />
<img src="/assets/shrines/starwarskotor/images/swkotor-header.avif" alt="anner of Star Wars: Knights of the Old Republic Shrine" /> <img src="/assets/shrines/starwarskotor/images/swkotor-header.avif" alt="anner of Star Wars: Knights of the Old Republic Shrine" />
</picture> </picture>
{% endblock %} {% endblock %}
{% block eventScript %} {% block eventScript %}
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent) { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent; heroTopBarEl.innerHTML = todayEvent;
} }
function getTodayEvent() { function getTodayEvent() {
const date = new Date(); const date = new Date();
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
@ -36,5 +36,5 @@
`; `;
else else
return null; return null;
} }
{% endblock %} {% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "global/shrineinfo.njk" %} {% extends "global/shrineinfo.njk" %}
{% block shrineAbout %} {% block shrineAbout %}
<p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Star Wars: Knights of the Old Republic" %}, a series of role-playing video games set in the {% cite "Star Wars" %} universe, taking place almost 4,000 years before the events of the Skywalker film saga.</p> <p>Welcome to {{ sitemeta.siteAuthor.name }}'s shrine for {% cite "Star Wars: Knights of the Old Republic" %}, a series of role-playing video games set in the {% cite "Star Wars" %} universe, taking place almost 4,000 years before the events of the Skywalker film saga.</p>
{% endblock %} {% endblock %}
{% block shrineLinks %} {% block shrineLinks %}
<li><a href="https://kotor.neocities.org/">KOTOR Community Portal</a></li> <li><a href="https://kotor.neocities.org/">KOTOR Community Portal</a></li>
<li><a href="https://glitterskies.org/kotor/"><cite>Star Wars: KotOR</cite> fanlisting</a></li> <li><a href="https://glitterskies.org/kotor/"><cite>Star Wars: KotOR</cite> fanlisting</a></li>
<li><a href="https://glitterskies.org/kotor2/"><cite>Star Wars: KotOR II</cite> fanlisting</a></li> <li><a href="https://glitterskies.org/kotor2/"><cite>Star Wars: KotOR II</cite> fanlisting</a></li>
{% endblock %} {% endblock %}