fix: clean up html/njk formatting

This commit is contained in:
Devin Haska 2024-02-04 10:53:11 -08:00
parent a65a26ebe4
commit 9b773d7ce2
5 changed files with 45 additions and 61 deletions

View file

@ -1 +1,3 @@
<footer>Footer.</footer>
<footer>
Footer.
</footer>

View file

@ -1 +1,3 @@
<header>{% include "partials/menu.html" %}</header>
<header>
{% include "partials/menu.html" %}
</header>

View file

@ -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>

View file

@ -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>

View file

@ -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 }}