overhauled old theme

This commit is contained in:
sundae 2025-10-14 19:40:29 +03:00
parent f18a342ae5
commit fb24c6a302
No known key found for this signature in database
82 changed files with 1378 additions and 1371 deletions

View file

@ -3,102 +3,116 @@ paw: "m 15.700739,16.184194 c 0,4.483 -2.555,2.038 -5.7060001,2.038 -3.151,0 -5.
back: "M2 16 18 4h6L12 14H50v4H12L24 28H18Z"
theme: "M16 6a1 1 0 010 20Zm0-4a1 1 0 000 28A1 1 0 0016 2"
---
<!DOCTYPE html>
<html lang="en">
<head>
<title>
{{ site.name }}
{% if title %}
- {{ page.fileSlug|capitalize }}
{% endif %}
</title>
<link rel="icon" href="/assets/img/icon/sundae.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<link rel="stylesheet" href="/assets/css/reset.css">
<link rel="stylesheet" href="/assets/css/default/default.css">
<link rel="stylesheet" href="/assets/css/default/system.css" id="custom">
{% if page.url === "/home/" %}
<link rel="stylesheet" href="/assets/css/pokesprite-pokemon-gen8.css"/>
{% endif %}
{% set availableStyles = ['home', 'blog', 'gallery'] %}
{% if page.url %}
{% if availableStyles.indexOf(page.url|firstSegment) !== -1 %}
<link rel="stylesheet" href="/assets/css/default/{{ page.url|firstSegment }}.css">
{% endif %}
{% endif %}
</head>
<body id="{{ page.url|firstSegment }}">
<nav>
<details open="">
<summary>
<svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="{{ paw }}"></svg>
Navigation
</summary>
{% set currentUrl %}{{ page.url }}{% endset %}
{% set sortedPages = collections.pages|sort(attribute='data.order') %}
<ul role="list">
<li>
<a href="../">
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ back }}"></path>
</svg>
Back
</a>
</li>
<li>
<button id="theme-toggle">
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ theme }}"></svg>
Toggle theme
</button>
</li>
{% for page in sortedPages %}
<li>
<a {% if currentUrl === page.url %} aria-current="page" {% endif %} href="{{ page.url }}">
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ page.data.icon }}"></path>
</svg>
{{ page.data.title }}</a>
</li>
{% endfor %}
<script src="/assets/js/theme.js"></script>
</li>
</ul>
</details>
<details open="">
<summary>
<svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="{{ paw }}"></svg>
Outgoing
</summary>
<ul role="list">
{% for item in outgoing.items %}
<li>
<a href="{{ item.src }}"><img src="{{ item.icon }}" alt="" aria-hidden="true">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</details>
<script src="/assets/js/nav-details.js"></script>
</nav>
<header>
<h1>
{% for page in sortedPages %}
{% if currentUrl|firstSegment === page.url|firstSegment %}
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ page.data.icon }}"></path>
</svg>
{% endif %}
{% endfor %}
{{ page.url|firstSegment|slugify|capitalize }}</h1>
</header>
<main>
{{ content | safe }}
</main>
</body>
</html>
</body>
</html>
<head>
<title>
{% if page.url.split('/') %}
{{ page.url.split('/')[1] }} -
{% if page.url.split('/')[2] %}
{{ page.url.split('/')[2] | replace("-", " ") }} |
{% endif %}
{% endif %}
{{ site.name | safe }}
</title>
<link rel="icon" href="/assets/img/icon/sundae.png">
{% include "meta.njk" %}
<link rel="stylesheet" href="/assets/css/reset.css">
<link rel="stylesheet" href="/assets/css/default/default.css">
<link rel="preload" href="/assets/css/citrus/default.css" as="style">
<link rel="stylesheet" href="/assets/css/default/system.css" id="themed">
{% if page.url === "/home/" %}
<link rel="stylesheet" href="/assets/css/pokesprite-pokemon-gen8.css">
{% endif %}
{% set availableStyles = ['home', 'blog', 'gallery'] %}
{% if page.url %}
{% if availableStyles.indexOf(page.url.split('/')[1]|slugify) !== -1 %}
<link rel="stylesheet" href="/assets/css/default/{{ page.url.split('/')[1]|slugify }}.css">
{% endif %}
{% endif %}
</head>
<body id="{{ page.url.split('/')[1]|slugify }}">
<nav>
<details open="">
<summary>
Navigation
</summary>
{% set currentUrl %}{{ page.url }}{% endset %}
{% set sortedPages = collections.pages|sort(attribute='data.order') %}
<ul role="list">
<li>
<a href="../">
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ back }}"></path>
</svg>
Back
</a>
</li>
{% for page in sortedPages %}
<li>
<a href="{{ page.url }}" {% if currentUrl.split('/')[1] === page.url.split('/')[1]|slugify %} aria-current="page" {% endif %}>
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ page.data.icon }}"></path>
</svg>
{{ page.data.title }}
</a>
</li>
{% endfor %}
</li>
</ul>
</details>
<details open="">
<summary>
Options
</summary>
<ul role="list">
<li>
<button id="theme-toggle">
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ theme }}">
</svg>
Toggle theme
</button>
</li>
</li>
</ul>
<script src="/assets/js/theme.js"></script>
<script src="/assets/js/motion.js"></script>
</details>
<details open="">
<summary>
Outgoing
</summary>
<ul role="list">
{% for item in outgoing.items %}
<li>
<a href="{{ item.src }}"><img src="{{ item.icon }}" alt="" aria-hidden="true">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</details>
<script src="/assets/js/details-save.js"></script>
</body>
</html>
</nav>
<header>
<h1>
{% for page in sortedPages %}
{% if currentUrl.split('/')[1] === page.url.split('/')[1]|slugify %}
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="{{ page.data.icon }}"></path>
</svg>
{% endif %}
{% endfor %}
{{ page.url.split('/')[1]|slugify|capitalize }}
</h1>
</header>
<main>
{{ content | safe }}
</main>
<footer>
<span id="message" aria-label="Random footer message">made with love</span>
<script src="/assets/js/footer.js"></script>
</footer>
</body>
</html>

View file

@ -5,6 +5,6 @@ layout: base
<article>
{{content|safe}}
<section aria-label="Postscript">
{{blurb|safe}} <img src="{{avatar}}" alt="Profile picture">
{{blurb|safe}} <span><img src="{{avatar}}" alt="Profile picture"/></span>
</section>
</article>

View file

@ -3,27 +3,60 @@ layout: base
---
<article id="art">
<h1>{{page.fileSlug}}{%for flag in flags%}<img src="{{flag.src}}">{%endfor%}</h1>
{{content|safe}}
<section>
{%for image in images%}
<a href="{{image.src}}">
<figure>
<img src="{{image.src}}" alt="" {%if image.pixel%} style="image-rendering: pixelated" {%endif%}>
<figcaption>{{image.alt}}</figcaption>
<time datetime="{{image.date|ISO}}">{{image.date|readable}}</time>
</figure>
</a>
{%endfor%}
</section>
{%for attachment in attachments%}
<section class="attachment">
<a href="{{attachment.src}}">
<figure>
<img src="{{attachment.src}}">
<figcaption>{{attachment.alt}}</figcaption>
</figure>
</a>
</section>
{%endfor%}
</article>
<h1>{{ page.fileSlug }}
{% for flag in flags %}
<img src="{{ flag.src }}">
{% endfor %}
</h1>
{{ content|safe }}
{% if programs and programs|length > 0 %}
<p>Made with:</p>
<ul>
{% for program in programs %}
<li>
<span>
<img src="https://www.google.com/s2/favicons?domain={{ program.src }}" alt="">
<a href="{{ program.src }}">{{ program.name }}</a>
</span>
</li>
{% endfor %}
</ul>
{% endif %}
{% if palettes and palettes|length > 0 %}
<p>Color palette used:</p>
{% for palette in palettes %}
<ul>
<li>
<span>
{% if palette.src %}
<img src="https://www.google.com/s2/favicons?domain={{ palette.src }}" alt="">
<a href="{{ palette.src }}">
{% endif %}
{{ palette.name }}</a>
</span>
</li>
{% endfor %}
</ul>
{% endif %}
<section>
{% for image in images %}
<a href="{{ image.src }}">
<figure>
<img src="{{ image.src }}" alt="" {% if image.pixel %} style="image-rendering: pixelated" {% endif %}>
<figcaption>{{ image.alt }}</figcaption>
<time datetime="{{ image.date|ISO }}">{{ image.date|readable }}</time>
</figure>
</a>
{% endfor %}
</section>
{% for attachment in attachments %}
<section class="attachment">
<a href="{{ attachment.src }}">
<figure>
<img src="{{ attachment.src }}">
<figcaption>{{ attachment.alt }}</figcaption>
</figure>
</a>
</section>
{% endfor %}
</article>

7
_src/_includes/meta.njk Normal file
View file

@ -0,0 +1,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta property="og:url" content="https://sunbun.neocities.org/">
<meta property="og:type" content="site">
<meta property="og:title" content="Sundae's Bunspace">
<meta property="og:description" content="Sunbun's personal website :3">
<meta property="og:image" content="/assets/img/opengraph/site.png">