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">
|
||||
Menu.
|
||||
<ul>
|
||||
{% for item in navigation.top %}
|
||||
<li>
|
||||
<a
|
||||
class="nav"
|
||||
href="{{ item.url }}"
|
||||
{{
|
||||
helpers.getLinkActiveState(item.url,
|
||||
page.url)
|
||||
|
|
||||
safe
|
||||
}}
|
||||
>{{ item.text }}</a
|
||||
>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Menu.
|
||||
<ul>
|
||||
{% for item in navigation.top %}
|
||||
<li>
|
||||
<a class="nav" href="{{ item.url }}" {{ helpers.getLinkActiveState(item.url, page.url) | safe }}>{{ item.text }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,38 +1,32 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- charset/http-equiv/viewport -->
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/global.css" />
|
||||
{% for preload in preloads %}
|
||||
<link
|
||||
rel="preload"
|
||||
as="{{ preload.as }}"
|
||||
href="{{ preload.href }}"
|
||||
{%
|
||||
if
|
||||
preload.crossorigin
|
||||
%}crossorigin{%
|
||||
endif
|
||||
%}
|
||||
/>
|
||||
{% endfor %} {% set fontCss %} {% include "css/fontFace.njk" %} {% include
|
||||
"css/fontVariables.njk" %}{% endset %}
|
||||
<style>
|
||||
{{ fontCss | minifyCss | safe }}
|
||||
</style>
|
||||
{% set colorCss %} {% include "css/colorVariables.njk" %} {% endset %}
|
||||
<style>
|
||||
{{ colorCss | minifyCss | safe }}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include "partials/header.html" %}
|
||||
<main id="main" class="wrapper flow">{{ content | safe }}</main>
|
||||
{% include "partials/footer.html" %}
|
||||
</body>
|
||||
<head>
|
||||
<!-- charset/http-equiv/viewport -->
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/assets/css/global.css" />
|
||||
{% for preload in preloads %}
|
||||
<link rel="preload"
|
||||
as="{{ preload.as }}"
|
||||
href="{{ preload.href }}"
|
||||
{% if preload.crossorigin %}crossorigin{% endif %} />
|
||||
{% endfor %}
|
||||
{% set fontCss %}
|
||||
{% include "css/fontFace.njk" %}
|
||||
{% include "css/fontVariables.njk" %}
|
||||
{% endset %}
|
||||
<style>{{ fontCss | minifyCss | safe }}</style>
|
||||
{% set colorCss %}
|
||||
{% include "css/colorVariables.njk" %}
|
||||
{% endset %}
|
||||
<style>{{ colorCss | minifyCss | safe }}</style>
|
||||
</head>
|
||||
<body>
|
||||
{% include "partials/header.html" %}
|
||||
<main id="main" class="wrapper flow">
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
{% include "partials/footer.html" %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,12 +3,8 @@ layout: base
|
|||
---
|
||||
|
||||
<p>{{ date }}</p>
|
||||
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
<ul>
|
||||
{% for category in categories %}
|
||||
<li>#{{ category }}</li>
|
||||
{% endfor %}
|
||||
{% for category in categories %}<li>#{{ category }}</li>{% endfor %}
|
||||
</ul>
|
||||
{{ content | safe }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue