refactor: Format site files for 11ty
- Convert HTML pages into NJK templates - Add front matter to NJK templates - Modularize monolithic stylesheet
This commit is contained in:
47
src/_includes/base.njk
Normal file
47
src/_includes/base.njk
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ metaDesc }}">
|
||||
|
||||
<title>{{title}}</title>
|
||||
|
||||
{% if stylesheet %}
|
||||
{% for style in stylesheet %}
|
||||
<link rel="stylesheet" href="{{ style }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if hCAPTCHA %}
|
||||
<script src="{{ hCAPTCHA }}" async defer></script>
|
||||
{% endif %}
|
||||
|
||||
{% if fontAwesome %}
|
||||
<script src="{{ fontAwesome }}" crossorigin="anonymous"></script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{% include "header.html" %}
|
||||
|
||||
<main>
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
</main>
|
||||
|
||||
{% include "footer.html" %}
|
||||
|
||||
<!-- <a href="https://www.svgbackgrounds.com/set/free-svg-backgrounds-and-patterns/">Free SVG Backgrounds and Patterns by SVGBackgrounds.com</a> -->
|
||||
|
||||
{% if pageScripts %}
|
||||
{% for script in pageScripts %}
|
||||
<script src="{{ script }}"></script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user