wip media query rework, sidebar mostly finished, rewritten njk
This commit is contained in:
parent
cb5ba4fb82
commit
790147ea05
33 changed files with 268 additions and 361 deletions
|
|
@ -1,98 +1,51 @@
|
|||
---
|
||||
paw: "m 15.700739,16.184194 c 0,4.483 -2.555,2.038 -5.7060001,2.038 -3.151,0 -5.706,2.445 -5.706,-2.038 0,-2.925 2.555,-6.113001 5.706,-6.113001 3.1510001,0 5.7060001,3.188001 5.7060001,6.113001 z M 4.0687389,8.1071934 c 0.394,1.336 0.007,2.6259996 -0.862,2.8819996 -0.87,0.256001 -1.8929999,-0.619 -2.28599993,-1.9539996 -0.393,-1.336 -0.007,-2.626 0.86199993,-2.882 0.87,-0.256 1.893,0.619 2.286,1.954 z m 15.0000001,0.945 c -0.407,1.3319996 -1.442,2.1960006 -2.312,1.9299996 -0.869,-0.266 -1.244,-1.5609996 -0.837,-2.8919996 0.407,-1.332 1.442,-2.196 2.312,-1.93 0.869,0.265 1.244,1.56 0.837,2.892 z m -10.1100001,-4.859 c 0.365,1.897 -0.218,3.606 -1.302,3.814 -1.085,0.209 -2.261,-1.16 -2.626,-3.059 -0.365,-1.898 0.218,-3.6060001 1.302,-3.8150001 1.085,-0.20799996 2.261,1.1620001 2.626,3.0600001 z m 5.9960001,0.778 c -0.388,1.893 -1.578,3.25 -2.66,3.029 -1.082,-0.222 -1.647,-1.937 -1.26,-3.83 0.388,-1.894 1.578,-3.25000006 2.66,-3.0290001 1.082,0.222 1.647,1.9370001 1.26,3.8300001 z"
|
||||
back: "M2 16 18 4h6L12 14H50v4H12L24 28H18Z"
|
||||
theme: "M16 6a1 1 0 010 20Zm0-4a1 1 0 000 28A1 1 0 0016 2"
|
||||
menu: "M4 8H28v3H4Zm0 7H28v3H4Zm0 7H28v3H4Z"
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{% set currentUrl %}{{ page.url }}{% endset %}
|
||||
{% set sortedPages = collections.pages|sort(attribute='data.order') %}
|
||||
{%set currentPage = page.url.split('/')[1]|slugify%}
|
||||
{%set pageOrder = collections.pages|sort(attribute='data.order')%}
|
||||
{%set availableStyles = ['home', 'blog', 'gallery']%}
|
||||
<head>
|
||||
<title>
|
||||
{% if page.url.split('/') %}
|
||||
{%if page.url.split('/')%}
|
||||
{{ page.url.split('/')[1] }} -
|
||||
{% if page.url.split('/')[2] %}
|
||||
{{ page.url.split('/')[2] | replace("-", " ") }} |
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ site.name | safe }}
|
||||
{%if page.url.split('/')[2]%}
|
||||
{{ page.url.split('/')[2]|replace("-", " ") }} |
|
||||
{%endif%}
|
||||
{%endif%}
|
||||
{{ site.name|safe }}
|
||||
</title>
|
||||
{% include "meta.njk" %}
|
||||
<link rel="icon" href="/assets/img/icon/sundae.png">
|
||||
<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 currentUrl === "/home/" %}
|
||||
<link rel="stylesheet" href="/assets/css/pokesprite-pokemon-gen8.css">
|
||||
{% endif %}
|
||||
{% set availableStyles = ['home', 'blog', 'gallery'] %}
|
||||
{% if currentUrl %}
|
||||
{% if availableStyles.indexOf(page.url.split('/')[1]|slugify) !== -1 %}
|
||||
<link rel="stylesheet" href="/assets/css/default/{{ page.url.split('/')[1]|slugify }}.css">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%include "meta.njk"%}
|
||||
{%include "stylesheets.njk"%}
|
||||
</head>
|
||||
<body id="{{ page.url.split('/')[1]|slugify }}">
|
||||
<body id="{{ currentPage }}">
|
||||
<dialog id="signal">
|
||||
<article>
|
||||
{% for article in collections.articles %}
|
||||
{% if article.fileSlug == 'what' %}
|
||||
{{ article.content | safe }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% include "../data/articles/what.html" %}
|
||||
</article>
|
||||
</dialog>
|
||||
<section>
|
||||
<nav class="navbar" id="floating">
|
||||
<ul role="list">
|
||||
<li>
|
||||
<button popovertarget="mobile" aria-label="Toggle menu">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{menu}}"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="theme-toggle" aria-label="Toggle theme">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{ theme }}">
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
<section id="mobile" popover="">
|
||||
<nav class="navbar">
|
||||
{% include "nav.njk" %}
|
||||
<ul role="list">
|
||||
<li>
|
||||
<button id="theme-toggle" aria-label="Toggle theme">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{ theme }}">
|
||||
</svg>
|
||||
Toggle theme
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
<nav class="navbar" id="floating">
|
||||
{%include "nav-misc.njk"%}
|
||||
</nav>
|
||||
<div id="sidebar" popover="">
|
||||
<nav class="navbar" id="default">
|
||||
{%include "nav-misc.njk"%}
|
||||
{%include "nav.njk"%}
|
||||
</nav>
|
||||
</div>
|
||||
<header>
|
||||
<h1>
|
||||
{% for page in sortedPages %}
|
||||
{% if currentUrl.split('/')[1] === page.url.split('/')[1]|slugify %}
|
||||
{%for page in pageOrder%}
|
||||
{%if page.url|slugify == currentPage%}
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{ page.data.icon }}"></path>
|
||||
<path d="{{icon[page.url|slugify]}}"></path>
|
||||
</svg>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{{ page.url.split('/')[1]|slugify|capitalize }}
|
||||
{%endif%}
|
||||
{%endfor%}
|
||||
{{ page.fileSlug|capitalize }}
|
||||
</h1>
|
||||
</header>
|
||||
<main>
|
||||
{{ content | safe }}
|
||||
{{ content|safe }}
|
||||
</main>
|
||||
<footer>
|
||||
<span id="message" aria-label="Random footer message">made with love</span>
|
||||
|
|
|
|||
|
|
@ -4,46 +4,46 @@ layout: base
|
|||
|
||||
<article id="art">
|
||||
<h1>{{ page.fileSlug }}
|
||||
{% for flag in flags %}
|
||||
{%for flag in flags%}
|
||||
<img src="{{ flag.src }}">
|
||||
{% endfor %}
|
||||
{%endfor%}
|
||||
</h1>
|
||||
{{ content|safe }}
|
||||
{% if programs and programs|length > 0 %}
|
||||
{%if programs and programs|length > 0%}
|
||||
<p>Made with:</p>
|
||||
<ul>
|
||||
{% for program in programs %}
|
||||
{%for program in programs%}
|
||||
<li>
|
||||
{{ program.name | link(program.src) | safe }}
|
||||
{{ program.name|link(program.src)|safe }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{%endfor%}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if palettes and palettes|length > 0 %}
|
||||
{%endif%}
|
||||
{%if palettes and palettes|length > 0%}
|
||||
<p>Color palette used:</p>
|
||||
{% for palette in palettes %}
|
||||
{%for palette in palettes%}
|
||||
<ul>
|
||||
<li>
|
||||
{% if palette.src %}
|
||||
{{ palette.name | link(palette.src) | safe }}
|
||||
{% endif %}
|
||||
{%if palette.src%}
|
||||
{{ palette.name|link(palette.src)|safe }}
|
||||
{%endif%}
|
||||
</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{%endfor%}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{%endif%}
|
||||
<section>
|
||||
{% for image in images %}
|
||||
{%for image in images%}
|
||||
<a href="{{ image.src }}">
|
||||
<figure>
|
||||
<img src="{{ image.src }}" alt="" {% if image.pixel %} style="image-rendering: pixelated" {% endif %}>
|
||||
<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 %}
|
||||
{%endfor%}
|
||||
</section>
|
||||
{% for attachment in attachments %}
|
||||
{%for attachment in attachments%}
|
||||
<section class="attachment">
|
||||
<a href="{{ attachment.src }}">
|
||||
<figure>
|
||||
|
|
@ -52,5 +52,5 @@ layout: base
|
|||
</figure>
|
||||
</a>
|
||||
</section>
|
||||
{% endfor %}
|
||||
{%endfor%}
|
||||
</article>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<section>
|
||||
<h3>Pages</h3>
|
||||
<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>
|
||||
Go 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.fileSlug | capitalize }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
25
_src/_includes/nav-misc.njk
Normal file
25
_src/_includes/nav-misc.njk
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<ul role="list">
|
||||
<li>
|
||||
<button popovertarget="sidebar">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{svg.menu}}"></path>
|
||||
</svg>
|
||||
Toggle menu
|
||||
</button>
|
||||
<li>
|
||||
<button class="theme-toggle">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{svg.theme}}">
|
||||
</svg>
|
||||
Toggle theme
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../">
|
||||
<svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{svg.back}}"></path>
|
||||
</svg>
|
||||
Go back
|
||||
</a>
|
||||
<li>
|
||||
</ul>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<section>
|
||||
<h3>Outgoing</h3>
|
||||
<ul role="list">
|
||||
{% for key, items in outgoing %}
|
||||
{% for item in items %}
|
||||
{% if key != "signal" %}
|
||||
<li>
|
||||
<a href="{{ item.src }}">
|
||||
<img src="/assets/img/icon/{{ item.icon }}" alt="" aria-hidden="true">{{ key | capitalize }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if key == "signal" %}
|
||||
<li>
|
||||
<button command="show-modal" commandfor="{{ items[0].id }}">
|
||||
<img src="/assets/img/icon/{{ items[0].icon }}" alt="" aria-hidden="true">{{ key | capitalize }}
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
|
@ -1,2 +1,38 @@
|
|||
{% include "nav-main.njk" %}
|
||||
{% include "nav-outgoing.njk" %}
|
||||
<section>
|
||||
<h3>Pages</h3>
|
||||
<ul role="list">
|
||||
{%for page in pageOrder%}
|
||||
<li>
|
||||
<a href="{{ page.url }}" {%if page.url|slugify == currentPage%}aria-current="page"{%endif%}>
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="{{ icon[page.url|slugify] }}"></path>
|
||||
</svg>
|
||||
{{ page.fileSlug|capitalize }}
|
||||
</a>
|
||||
</li>
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Outgoing</h3>
|
||||
<ul role="list">
|
||||
{%for key, items in outgoing%}
|
||||
{%for item in items%}
|
||||
{%if key != "signal"%}
|
||||
<li>
|
||||
<a href="{{ item.src }}">
|
||||
<img src="/assets/img/icon/{{ item.icon }}" alt="" aria-hidden="true">{{ key|capitalize }}
|
||||
</a>
|
||||
</li>
|
||||
{%endif%}
|
||||
{%endfor%}
|
||||
{%if key == "signal"%}
|
||||
<li>
|
||||
<button command="show-modal" commandfor="{{ items[0].id }}">
|
||||
<img src="/assets/img/icon/{{ items[0].icon }}" alt="" aria-hidden="true">{{ key|capitalize }}
|
||||
</button>
|
||||
</li>
|
||||
{%endif%}
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
|||
8
_src/_includes/stylesheets.njk
Normal file
8
_src/_includes/stylesheets.njk
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<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/{{ currentPage }}.css">
|
||||
<link rel="stylesheet" href="/assets/css/default/system.css" id="themed">
|
||||
{%if currentPage === "home"%}
|
||||
<link rel="stylesheet" href="/assets/css/pokesprite-pokemon-gen8.css">
|
||||
{%endif%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue