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
---
{{- css }}{{ include "../../assets/css/asummersend.css" }}{{- /css }}
@ -60,7 +60,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("A Summers End Shrine") }}
{{- for entry of navPages }}
<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>
{{ /for }}
{{ /set }}

View File

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

View File

@ -1,5 +1,5 @@
---
layout: layouts/content
layout: layouts/base
sectionName: Cassette Beasts Shrine
---
{{- css }}{{ include "../../assets/css/cassettebeasts.css" }}{{- /css }}
@ -56,7 +56,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("Cassette Beasts Shrine") }}
{{ for entry of navPages }}
<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>
{{ /for }}
{{ /set }}

View File

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

View File

@ -1,5 +1,5 @@
---
layout: layouts/content
layout: layouts/base
---
{{ 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 }}
@ -147,7 +147,7 @@ function getTodayEvent() {
{{ set navPages = collections["navbar links"] |> eleventyNavigation }}
{{ for entry of navPages }}
<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>
{{ /for }}
{{ /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>
</li>
<li><a
{{ if currentUrl === "/sitemap/" }}aria-current="page"{{ /if }}
{{ if currentUrl === "/sitemap/" }} aria-current="page"{{ /if }}
href="/sitemap/
">Site Map</a></li>
{{ for link of collections["footer links"] }}
<li><a
{{ if link.url == page.url }}aria-current="page"{{ /if }}
{{ if link.url == page.url }} aria-current="page"{{ /if }}
href="{{ link.url }}"
>{{ link.data.title }}</a></li>
{{ /for }}
{{ for statement of collections.statements }}
<li><a
{{ if statement.url == page.url }}aria-current="page"{{ /if }}
{{ if statement.url == page.url }} aria-current="page"{{ /if }}
href="{{ statement.url }}"
>{{ statement.data.title }}</a></li>
{{ /for }}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
---
layout: layouts/content
layout: layouts/base
sectionName: "Star Wars: Knights of the Old Republic Shrine"
---
{{- css }}{{ include "../../assets/css/starwarskotor.css" }}{{- /css }}
@ -56,7 +56,7 @@ function getTodayEvent() {
{{ set navPages = collections.all |> eleventyNavigation("KotOR Shrine") }}
{{ for entry of navPages }}
<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>
{{ /for }}
{{ /set }}

View File

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

View File

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

View File

@ -1,7 +1,7 @@
{{ set navLinksEl }}
{{ if tags && tags.includes("shrine pages") }}
<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>
{{ /if }}
{{ navbarLinks }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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