From 22eda90eecce20b5d65e6d7cc710997cf15f7686 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 2 Dec 2024 16:44:01 -0700 Subject: [PATCH] get the devices page working --- config.toml | 2 +- content/devices/data.toml | 20 ++++++++++++++++++-- templates/devices.html | 18 +++++++++--------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/config.toml b/config.toml index 4fc1aec..8484d89 100644 --- a/config.toml +++ b/config.toml @@ -57,7 +57,7 @@ recent_more_text = "more ยป" sections = [ { name = "posts", path = "/posts", is_external = false }, { name = "projects", path = "/projects", is_external = false }, - # { name = "devices", path = "/devices", is_external = false }, + { name = "devices", path = "/devices", is_external = false }, # { name = "about", path = "/about", is_external = false }, # { name = "github", path = "https://github.com/", is_external = true }, ] diff --git a/content/devices/data.toml b/content/devices/data.toml index dafe774..30da612 100644 --- a/content/devices/data.toml +++ b/content/devices/data.toml @@ -1,7 +1,23 @@ [[device]] name = "Shepard" - desc = "Main Workstation at Home" + desc = "System76 nebula49 custom desktop" tags = [ "shepard", "workstation", "desktop" ] links = [ - { name = "Status", url = "https://status.ahoneybun.net" } + { name = "Case", url = "https://system76.com/components/nebula49-3/configure" }, + { name = "Mainboard", url = "https://www.gigabyte.com/Motherboard/X299-AORUS-Gaming-3-rev-10#kf" }, + { name = "CPU", url = "https://www.intel.com/content/www/us/en/products/sku/198012/intel-core-i910920x-xseries-processor-19-25m-cache-3-50-ghz/specifications.html" } + ] +[[device]] + name = "Garrus" + desc = "System76 Galago Pro Laptop" + tags = [ "garrus", "portable", "laptop" ] + links = [ + { name = "Link", url = "https://system76.com/laptops/galago" } + ] +[[device]] + name = "EDI" + desc = "Custom deskop running a homelab" + tags = [ "homelab", "homelab" ] + links = [ + { name = "Status", url = "https://status.ahoneybun.net" } ] diff --git a/templates/devices.html b/templates/devices.html index 6514453..3f76ae4 100644 --- a/templates/devices.html +++ b/templates/devices.html @@ -1,6 +1,6 @@ {% extends "_base.html" %} -{% block page %}devices{% endblock page%} +{% block page %}projects{% endblock page %} {% block lang %}{% if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ section.lang }}{% endif %}{% endblock lang %} {% block title %}{{ section.title }}{% endblock title %} {% block desc %} @@ -12,17 +12,17 @@
{% set data = load_data(path="content" ~ section.path ~ "data.toml", format="toml") %} - {% for devices in data.device %} + {% for device in data.device %}
-
{{ devices.name }}
+
{{ device.name }}
- {% for tag in devices.tags %} + {% for tag in device.tags %}
#{{ tag }}
{% endfor %}
- {% for tag in devices.tags %} + {% for tag in device.tags %}
#{{ tag }}
{% endfor %}
-
{{ devices.desc | trim | markdown | safe }}
- {% if devices.img %} - {{ devices.name }} +
{{ device.desc | trim | markdown | safe }}
+ {% if device.img %} + {{ device.name }} {% endif %}