Include content partials

This commit is contained in:
Leilukin 2025-05-05 18:37:36 +08:00
parent 5d155a9859
commit 542efb5dba
18 changed files with 27 additions and 30 deletions

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
sectionName: A Summers End — Hong Kong 1986 Shrine sectionName: A Summers End — Hong Kong 1986 Shrine
--- ---
{{- css }}{{ include "../../assets/css/asummersend.css" }}{{- /css }} {{- css }}{{ include "../../assets/css/asummersend.css" }}{{- /css }}
@ -60,7 +60,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("A Summers End Shrine") }} {{ set navPages = collections.all |> eleventyNavigation("A Summers End Shrine") }}
{{- for entry of navPages }} {{- for entry of navPages }}
<li> <li>
<a {{ if entry.url == page.url }}aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a> <a {{ if entry.url == page.url }} aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{{ /for }} {{ /for }}
{{ /set }} {{ /set }}

View File

@ -46,7 +46,7 @@
{{ include "partials/hero.vto" }} {{ include "partials/hero.vto" }}
{{ include "partials/navbar.vto" }} {{ include "partials/navbar.vto" }}
<main id="content"> <main id="content">
{{ content }} {{ include "partials/content.vto" }}
</main> </main>
{{ include "partials/footer.vto" }} {{ include "partials/footer.vto" }}
</body> </body>

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
sectionName: Cassette Beasts Shrine sectionName: Cassette Beasts Shrine
--- ---
{{- css }}{{ include "../../assets/css/cassettebeasts.css" }}{{- /css }} {{- css }}{{ include "../../assets/css/cassettebeasts.css" }}{{- /css }}
@ -56,7 +56,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("Cassette Beasts Shrine") }} {{ set navPages = collections.all |> eleventyNavigation("Cassette Beasts Shrine") }}
{{ for entry of navPages }} {{ for entry of navPages }}
<li> <li>
<a {{ if entry.url == page.url }}aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a> <a {{ if entry.url == page.url }} aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{{ /for }} {{ /for }}
{{ /set }} {{ /set }}

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
articleElement: true articleElement: true
isContentDivided: true isContentDivided: true
--- ---

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
--- ---
{{ layout "partials/hero.vto" }} {{ layout "partials/hero.vto" }}
{{ set heroImg }}<img fetchpriority="high" src="/assets/leilukin/Leilukins-Hub-website-banner.avif" alt="Banner of Leilukin's Hub" width="900" height="300">{{ /set }} {{ set heroImg }}<img fetchpriority="high" src="/assets/leilukin/Leilukins-Hub-website-banner.avif" alt="Banner of Leilukin's Hub" width="900" height="300">{{ /set }}
@ -147,7 +147,7 @@ function getTodayEvent() {
{{ set navPages = collections["navbar links"] |> eleventyNavigation }} {{ set navPages = collections["navbar links"] |> eleventyNavigation }}
{{ for entry of navPages }} {{ for entry of navPages }}
<li> <li>
<a {{ if entry.url == page.url }}aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a> <a {{ if entry.url == page.url }} aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{{ /for }} {{ /for }}
{{ /set }} {{ /set }}
@ -161,18 +161,18 @@ function getTodayEvent() {
<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>
<li><a <li><a
{{ if currentUrl === "/sitemap/" }}aria-current="page"{{ /if }} {{ if currentUrl === "/sitemap/" }} aria-current="page"{{ /if }}
href="/sitemap/ href="/sitemap/
">Site Map</a></li> ">Site Map</a></li>
{{ for link of collections["footer links"] }} {{ for link of collections["footer links"] }}
<li><a <li><a
{{ if link.url == page.url }}aria-current="page"{{ /if }} {{ if link.url == page.url }} aria-current="page"{{ /if }}
href="{{ link.url }}" href="{{ link.url }}"
>{{ link.data.title }}</a></li> >{{ link.data.title }}</a></li>
{{ /for }} {{ /for }}
{{ for statement of collections.statements }} {{ for statement of collections.statements }}
<li><a <li><a
{{ if statement.url == page.url }}aria-current="page"{{ /if }} {{ if statement.url == page.url }} aria-current="page"{{ /if }}
href="{{ statement.url }}" href="{{ statement.url }}"
>{{ statement.data.title }}</a></li> >{{ statement.data.title }}</a></li>
{{ /for }} {{ /for }}

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
sectionName: Pokémon Omega Ruby and Alpha Sapphire Shrine sectionName: Pokémon Omega Ruby and Alpha Sapphire Shrine
--- ---
{{- css }}{{ include "../../assets/css/pokemonoras.css" }}{{- /css }} {{- css }}{{ include "../../assets/css/pokemonoras.css" }}{{- /css }}
@ -50,7 +50,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("ORAS Shrine") }} {{ set navPages = collections.all |> eleventyNavigation("ORAS Shrine") }}
{{ for entry of navPages }} {{ for entry of navPages }}
<li> <li>
<a {{ if entry.url == page.url }}aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a> <a {{ if entry.url == page.url }} aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{{ /for }} {{ /for }}
{{ /set }} {{ /set }}

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
--- ---
{{ content }} {{ content }}

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
sectionName: "Star Wars: Knights of the Old Republic Shrine" sectionName: "Star Wars: Knights of the Old Republic Shrine"
--- ---
{{- css }}{{ include "../../assets/css/starwarskotor.css" }}{{- /css }} {{- css }}{{ include "../../assets/css/starwarskotor.css" }}{{- /css }}
@ -56,7 +56,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("KotOR Shrine") }} {{ set navPages = collections.all |> eleventyNavigation("KotOR Shrine") }}
{{ for entry of navPages }} {{ for entry of navPages }}
<li> <li>
<a {{ if entry.url == page.url }}aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a> <a {{ if entry.url == page.url }} aria-current="page"{{ /if }} href="{{ entry.url }}">{{ entry.title }}</a>
</li> </li>
{{ /for }} {{ /for }}
{{ /set }} {{ /set }}

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/base
articleElement: true articleElement: true
--- ---
@ -9,13 +9,13 @@ articleElement: true
<p class="changelog__nav--title" id="changelog-nav-title">Changelog Archive:</p> <p class="changelog__nav--title" id="changelog-nav-title">Changelog Archive:</p>
<ul class="inline-nav changelog__nav--links"> <ul class="inline-nav changelog__nav--links">
<li><a <li><a
{{ if currentUrl === "/changelogs/" }}aria-current="page"{{ /if }} {{ if currentUrl === "/changelogs/" }} aria-current="page"{{ /if }}
href="/changelogs" href="/changelogs"
>Latest</a></li> >Latest</a></li>
{{ set navPages = collections.all |> eleventyNavigation("Changelogs") |> toReversed }} {{ set navPages = collections.all |> eleventyNavigation("Changelogs") |> toReversed }}
{{ for entry of navPages }} {{ for entry of navPages }}
<li><a <li><a
{{ if entry.url == page.url }}aria-current="page"{{ /if }} {{ if entry.url == page.url }} aria-current="page"{{ /if }}
href="{{ entry.url }}" href="{{ entry.url }}"
>{{ entry.title }}</a></li> >{{ entry.title }}</a></li>
{{ /for }} {{ /for }}

View File

@ -1,6 +1,3 @@
---
layout: layouts/base
---
<header class="main__header"> <header class="main__header">
{{ if isArticle || hasBreadcrumbs }} {{ if isArticle || hasBreadcrumbs }}
<nav class="breadcrumbs" aria-labelledby="breadcrumbs-title"> <nav class="breadcrumbs" aria-labelledby="breadcrumbs-title">

View File

@ -1,7 +1,7 @@
{{ set navLinksEl }} {{ set navLinksEl }}
{{ if tags && tags.includes("shrine pages") }} {{ if tags && tags.includes("shrine pages") }}
<li> <li>
<a {{ if currentUrl === shrineHomeUrl }}aria-current="page"{{ /if }} href="{{ shrineHomeUrl }}">Shrine Home</a> <a {{ if currentUrl === shrineHomeUrl }} aria-current="page"{{ /if }} href="{{ shrineHomeUrl }}">Shrine Home</a>
</li> </li>
{{ /if }} {{ /if }}
{{ navbarLinks }} {{ navbarLinks }}

View File

@ -1,6 +1,6 @@
export default { export default {
tags: ["articles", "contents", "feed items"], tags: ["articles", "contents", "feed items"],
layout: "layouts/content", layout: "layouts/base",
permalink: "/articles/{{ page.fileSlug }}/", permalink: "/articles/{{ page.fileSlug }}/",
isArticle: true, isArticle: true,
eleventyComputed: { eleventyComputed: {

View File

@ -1,6 +1,6 @@
--- ---
title: Blog Archive title: Blog Archive
layout: layouts/content layout: layouts/base
tags: blog pages tags: blog pages
eleventyComputed: eleventyComputed:
desc: Archive of blog posts on {{ sitemeta.siteName }} desc: Archive of blog posts on {{ sitemeta.siteName }}

View File

@ -1,5 +1,5 @@
export default { export default {
layout: "layouts/content", layout: "layouts/base",
tags: ["posts", "contents", "feed items"], tags: ["posts", "contents", "feed items"],
isArticle: true, isArticle: true,
eleventyComputed: { eleventyComputed: {

View File

@ -1,5 +1,5 @@
--- ---
layout: layouts/content layout: layouts/main
tags: navbar links tags: navbar links
metadata: metadata:
title: Home title: Home

View File

@ -1,5 +1,5 @@
export default { export default {
layout: "layouts/content", layout: "layouts/base",
permalink: "/links/{{ page.fileSlug }}/", permalink: "/links/{{ page.fileSlug }}/",
hasBreadcrumbs: true, hasBreadcrumbs: true,
eleventyComputed: { eleventyComputed: {

View File

@ -1,6 +1,6 @@
export default { export default {
tags: "project pages", tags: "project pages",
layout: "layouts/content", layout: "layouts/base",
hasBreadcrumbs: true, hasBreadcrumbs: true,
eleventyComputed: { eleventyComputed: {
eleventyNavigation: { eleventyNavigation: {

View File

@ -1,6 +1,6 @@
export default { export default {
tags: "pages", tags: "pages",
layout: "layouts/content", layout: "layouts/base",
permalink: "/{{ page.fileSlug }}/", permalink: "/{{ page.fileSlug }}/",
eleventyComputed: { eleventyComputed: {
eleventyNavigation: { eleventyNavigation: {