From 1a3ba1f5be4b11aec3c3401df1068e885c1ea65a Mon Sep 17 00:00:00 2001
From: architeuthis
Date: Mon, 30 Jun 2025 22:07:11 +0200
Subject: [PATCH] unify hardware order page at /order
---
content/about-us/_index.md | 2 +-
content/artiq/_index.md | 4 ++++
content/lasers/_index.md | 4 ++++
content/lasers/place-order.md | 8 --------
content/misc/_index.md | 3 +++
.../{artiq/place-order.md => order/_index.md} | 5 ++---
content/other/_index.md | 3 +++
templates/_base.html | 18 ++++++++++--------
templates/index.html | 2 +-
9 files changed, 28 insertions(+), 21 deletions(-)
delete mode 100644 content/lasers/place-order.md
rename content/{artiq/place-order.md => order/_index.md} (68%)
diff --git a/content/about-us/_index.md b/content/about-us/_index.md
index 93a1eb0..6c49e3f 100644
--- a/content/about-us/_index.md
+++ b/content/about-us/_index.md
@@ -4,5 +4,5 @@ weight = 4
sort_by = "weight"
[extra]
-title = "About us"
+in_topbar = true
+++
diff --git a/content/artiq/_index.md b/content/artiq/_index.md
index fe35363..2c7ba51 100644
--- a/content/artiq/_index.md
+++ b/content/artiq/_index.md
@@ -3,4 +3,8 @@ title = "ARTIQ control system"
weight = 1
sort_by = "weight"
redirect_to = "artiq/artiq"
+
+[extra]
+in_topbar = true
+place_order = true
+++
\ No newline at end of file
diff --git a/content/lasers/_index.md b/content/lasers/_index.md
index 9faccbf..384e29c 100644
--- a/content/lasers/_index.md
+++ b/content/lasers/_index.md
@@ -2,5 +2,9 @@
title = "Lasers"
weight = 2
sort_by = "weight"
+redirect_to = "lasers/kirdy"
+[extra]
+in_topbar = true
+place_order = true
+++
diff --git a/content/lasers/place-order.md b/content/lasers/place-order.md
deleted file mode 100644
index 6129fbe..0000000
--- a/content/lasers/place-order.md
+++ /dev/null
@@ -1,8 +0,0 @@
-+++
-title = "Order hardware"
-weight = 5
-template = "page-place-order.html"
-
-[extra]
-menu_item = "th1"
-+++
diff --git a/content/misc/_index.md b/content/misc/_index.md
index 387eeef..2f0cfcf 100644
--- a/content/misc/_index.md
+++ b/content/misc/_index.md
@@ -3,4 +3,7 @@ title = "Miscellaneous"
weight = 3
sort_by = "weight"
redirect_to = "misc/migen"
+
+[extra]
+in_topbar = true
+++
\ No newline at end of file
diff --git a/content/artiq/place-order.md b/content/order/_index.md
similarity index 68%
rename from content/artiq/place-order.md
rename to content/order/_index.md
index 6129fbe..2872a06 100644
--- a/content/artiq/place-order.md
+++ b/content/order/_index.md
@@ -1,8 +1,7 @@
+++
title = "Order hardware"
-weight = 5
template = "page-place-order.html"
[extra]
-menu_item = "th1"
-+++
+in_topbar = false
++++
\ No newline at end of file
diff --git a/content/other/_index.md b/content/other/_index.md
index ff06763..3e9bb47 100644
--- a/content/other/_index.md
+++ b/content/other/_index.md
@@ -1,4 +1,7 @@
+++
title = "Other"
render = false
+
+[extra]
+in_topbar = false
+++
\ No newline at end of file
diff --git a/templates/_base.html b/templates/_base.html
index 37126ca..0bf2a9a 100644
--- a/templates/_base.html
+++ b/templates/_base.html
@@ -97,7 +97,7 @@
{% set root_current_path = current_path | trim_start_matches(pat='/') | split(pat='/') | first %}
{% set root_section_path = subsection.path | trim_start_matches(pat='/') | split(pat='/') | first %}
- {% if subsection.pages|length > 0 and subsection.title != 'Other' %}
+ {% if subsection.pages|length > 0 and subsection.extra.in_topbar %}
@@ -105,18 +105,20 @@
{% for tmp_page in subsection.pages %}
- {% if tmp_page.extra.menu_item and tmp_page.extra.menu_item == "th1" %}
-
- {{ tmp_page.title }}
-
- {% else %}
{{ tmp_page.title }}
- {% endif %}
{% endfor %}
+
+ {% if subsection.extra.place_order %}
+
+ {{ "Order hardware" }}
+
+ {% endif %}
+
- {% elif subsection.title != 'Other' %}
+ {% elif subsection.extra.in_topbar %}
{{ subsection.title }}
diff --git a/templates/index.html b/templates/index.html
index 38b0b97..4e273de 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -91,7 +91,7 @@
- Order hardware
+ Order hardware
Manual
Forum
More...