fix: clean up html/njk formatting
This commit is contained in:
parent
a65a26ebe4
commit
9b773d7ce2
5 changed files with 45 additions and 61 deletions
|
@ -1 +1,3 @@
|
||||||
<footer>Footer.</footer>
|
<footer>
|
||||||
|
Footer.
|
||||||
|
</footer>
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
<header>{% include "partials/menu.html" %}</header>
|
<header>
|
||||||
|
{% include "partials/menu.html" %}
|
||||||
|
</header>
|
||||||
|
|
|
@ -1,20 +1,10 @@
|
||||||
<nav aria-label="Main">
|
<nav aria-label="Main">
|
||||||
Menu.
|
Menu.
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in navigation.top %}
|
{% for item in navigation.top %}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a class="nav" href="{{ item.url }}" {{ helpers.getLinkActiveState(item.url, page.url) | safe }}>{{ item.text }}</a>
|
||||||
class="nav"
|
</li>
|
||||||
href="{{ item.url }}"
|
{% endfor %}
|
||||||
{{
|
</ul>
|
||||||
helpers.getLinkActiveState(item.url,
|
|
||||||
page.url)
|
|
||||||
|
|
|
||||||
safe
|
|
||||||
}}
|
|
||||||
>{{ item.text }}</a
|
|
||||||
>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -1,38 +1,32 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- charset/http-equiv/viewport -->
|
<!-- charset/http-equiv/viewport -->
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="/assets/css/global.css" />
|
||||||
<link rel="stylesheet" href="/assets/css/global.css" />
|
{% for preload in preloads %}
|
||||||
{% for preload in preloads %}
|
<link rel="preload"
|
||||||
<link
|
as="{{ preload.as }}"
|
||||||
rel="preload"
|
href="{{ preload.href }}"
|
||||||
as="{{ preload.as }}"
|
{% if preload.crossorigin %}crossorigin{% endif %} />
|
||||||
href="{{ preload.href }}"
|
{% endfor %}
|
||||||
{%
|
{% set fontCss %}
|
||||||
if
|
{% include "css/fontFace.njk" %}
|
||||||
preload.crossorigin
|
{% include "css/fontVariables.njk" %}
|
||||||
%}crossorigin{%
|
{% endset %}
|
||||||
endif
|
<style>{{ fontCss | minifyCss | safe }}</style>
|
||||||
%}
|
{% set colorCss %}
|
||||||
/>
|
{% include "css/colorVariables.njk" %}
|
||||||
{% endfor %} {% set fontCss %} {% include "css/fontFace.njk" %} {% include
|
{% endset %}
|
||||||
"css/fontVariables.njk" %}{% endset %}
|
<style>{{ colorCss | minifyCss | safe }}</style>
|
||||||
<style>
|
</head>
|
||||||
{{ fontCss | minifyCss | safe }}
|
<body>
|
||||||
</style>
|
{% include "partials/header.html" %}
|
||||||
{% set colorCss %} {% include "css/colorVariables.njk" %} {% endset %}
|
<main id="main" class="wrapper flow">
|
||||||
<style>
|
{{ content | safe }}
|
||||||
{{ colorCss | minifyCss | safe }}
|
</main>
|
||||||
</style>
|
{% include "partials/footer.html" %}
|
||||||
</head>
|
</body>
|
||||||
|
|
||||||
<body>
|
|
||||||
{% include "partials/header.html" %}
|
|
||||||
<main id="main" class="wrapper flow">{{ content | safe }}</main>
|
|
||||||
{% include "partials/footer.html" %}
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,12 +3,8 @@ layout: base
|
||||||
---
|
---
|
||||||
|
|
||||||
<p>{{ date }}</p>
|
<p>{{ date }}</p>
|
||||||
|
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for category in categories %}
|
{% for category in categories %}<li>#{{ category }}</li>{% endfor %}
|
||||||
<li>#{{ category }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue