summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorseth <[email protected]>2024-10-08 11:49:47 -0400
committerGitHub <[email protected]>2024-10-08 11:49:47 -0400
commit20d62336a446bea6c5846805e8325b67cd59fe54 (patch)
tree46a92b1de1021eb0631b54f664ba0c2ddf6752c6 /templates
parent07cb04200916169671b9c426fbfe9a24bb0fa79e (diff)
nice redesign (#145)
* nix: drop treefmt * nix: remove .envrc * nix: move `serve` to apps output * nice redesign * use local stylesheet * nix: fix build
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html2
-rw-r--r--templates/base.html9
-rw-r--r--templates/index.html26
-rw-r--r--templates/page.html4
-rw-r--r--templates/partials/footer.html6
-rw-r--r--templates/partials/head.html20
-rw-r--r--templates/partials/nav.html10
7 files changed, 44 insertions, 33 deletions
diff --git a/templates/404.html b/templates/404.html
index f391896..d59b721 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -6,7 +6,7 @@
<img
src="/imgs/tapwater.png"
alt="Can I get you some tapwater?"
- loading="lazy"
decoding="async"
+ loading="lazy"
>
{% endblock content %}
diff --git a/templates/base.html b/templates/base.html
index b15d5eb..a78d8b9 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -2,9 +2,12 @@
<html lang="en">
{% include "partials/head.html" %}
<body>
- <h1><b>getchoo's website 🦀</b></h1>
- {% include "partials/nav.html" %}
- {% block content %}{% endblock content %}
+ <header>
+ {% include "partials/nav.html" %}
+ </header>
+ <div class="main-content">
+ {% block content %}{% endblock content %}
+ </div>
{% include "partials/footer.html" %}
</body>
</html>
diff --git a/templates/index.html b/templates/index.html
index 8a9042f..9733821 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,17 +1,25 @@
{% extends "base.html" %}
{% block content %}
-
{{ section.content | safe }}
- <div id="gifs">
- {% for gif in config.extra.gifs %}
- {% set img = '<img src = "/imgs/gifs/' ~ gif.name ~'" alt="' ~ gif.alt ~ '" width=88 height=31 loading="lazy" decoding="async">' %}
- {% if gif.href %}
- <a href="{{ gif.href }}">{{ img | safe }}</a>
- {% else %}
- {{ img | safe }}
- {% endif %}
+ <div class="gif-buttons">
+ {% for button in config.extra.buttons %}
+ <div class="gif-button">
+ {% set imageTag = '<img
+ src="/imgs/buttons/' ~ button.name ~ '"
+ alt="' ~ button.alt ~ '"
+ width=88
+ height=31
+ decoding="async"
+ loading="lazy"
+ >' %}
+ {% if button.link %}
+ <a href="{{ button.link }}">{{ imageTag | safe }}</a>
+ {% else %}
+ {{ imageTag | safe }}
+ {% endif %}
+ </div>
{% endfor %}
</div>
{% endblock content %}
diff --git a/templates/page.html b/templates/page.html
index fce601d..9eb1631 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,7 +1,5 @@
{% extends "base.html" %}
{% block content %}
- <div class="blogpost">
- {{ page.content | safe }}
- </div>
+ {{ page.content | safe }}
{% endblock content %}
diff --git a/templates/partials/footer.html b/templates/partials/footer.html
index 122766f..c116580 100644
--- a/templates/partials/footer.html
+++ b/templates/partials/footer.html
@@ -1,3 +1,7 @@
<footer>
- <a href="{{ config.extra.repository_url }}">source code</a>
+ <p>Content is All Rights Reserved</p>
+ <p>
+ The <a href="{{ config.extra.repository_url }}">source code</a> is available
+ under the <a href="https://spdx.org/licenses/MIT.html">MIT License</a>
+ </p>
</footer>
diff --git a/templates/partials/head.html b/templates/partials/head.html
index 5b1dcf6..fa2c30d 100644
--- a/templates/partials/head.html
+++ b/templates/partials/head.html
@@ -1,20 +1,22 @@
<head>
<meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1" />
- <style>{{ load_data(path="static/main.css") | safe }}</style>
- <link rel="sitemap" href="sitemap.xml" />
{% if page.title %}
- <title>{{ page.title }} :: {{ config.title }}</title>
+ {% set title = page.title %}
{% elif section.title %}
- <title>{{ section.title }} :: {{ config.title }}</title>
+ {% set title = section.title %}
{% else %}
- <title>{{ config.title }}</title>
+ {% set title = config.title %}
{% endif %}
+ <title>{{ title }}</title>
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
{% if page.description %}
- <meta name="description" content="{{ page.description }}" />
+ {% set description = page.description %}
{% elif section.description %}
- <meta name="description" content="{{ section.description }}" />
+ {% set description = section.description %}
{% else %}
- <meta name="description" content="{{ config.description }}" />
+ {% set description = config.description %}
{% endif %}
+ <meta name="description" content="{{ description }}" />
+ <link rel="sitemap" href="sitemap.xml" />
+ <link rel="stylesheet" href="/style.css" />
</head>
diff --git a/templates/partials/nav.html b/templates/partials/nav.html
index e65db1d..bd74873 100644
--- a/templates/partials/nav.html
+++ b/templates/partials/nav.html
@@ -1,9 +1,5 @@
<nav>
- <div id="nav_links">
- {% for link in config.extra.nav_links %}
- <a href="{{ link.url }}">{{ link.name }}</a>
- {% endfor %}
- </div>
-
- <hr />
+ {% for link in config.extra.nav_links %}
+ <div><a href="{{ link.url }}">{{ link.name }}</a></div>
+ {% endfor %}
</nav>