unify hardware order page at /order

This commit is contained in:
architeuthis 2025-06-30 22:07:11 +02:00
parent 650bbf3218
commit 195efdc88c
9 changed files with 28 additions and 21 deletions

View File

@ -4,5 +4,5 @@ weight = 4
sort_by = "weight"
[extra]
title = "About us"
in_topbar = true
+++

View File

@ -3,4 +3,8 @@ title = "ARTIQ control system"
weight = 1
sort_by = "weight"
redirect_to = "artiq/artiq"
[extra]
in_topbar = true
place_order = true
+++

View File

@ -2,5 +2,9 @@
title = "Lasers"
weight = 2
sort_by = "weight"
redirect_to = "lasers/kirdy"
[extra]
in_topbar = true
place_order = true
+++

View File

@ -1,8 +0,0 @@
+++
title = "Order hardware"
weight = 5
template = "page-place-order.html"
[extra]
menu_item = "th1"
+++

View File

@ -3,4 +3,7 @@ title = "Miscellaneous"
weight = 3
sort_by = "weight"
redirect_to = "misc/migen"
[extra]
in_topbar = true
+++

View File

@ -1,8 +1,7 @@
+++
title = "Order hardware"
weight = 5
template = "page-place-order.html"
[extra]
menu_item = "th1"
+++
in_topbar = false
+++

View File

@ -1,4 +1,7 @@
+++
title = "Other"
render = false
[extra]
in_topbar = false
+++

View File

@ -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 %}
<li class="nav-item ms-0 ms-md-4 dropdown {% if root_current_path == root_section_path %}active{% endif %}">
<a class="nav-link dropdown-toggle {% if current_path == subsection.path %}active{% endif %}" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -105,18 +105,20 @@
</a>
<div class="dropdown-menu shadow-none shadow-lg text-start text-lg-start" aria-labelledby="navbarDropdown">
{% for tmp_page in subsection.pages %}
{% if tmp_page.extra.menu_item and tmp_page.extra.menu_item == "th1" %}
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %} rounded-1" href="{{ tmp_page.permalink | safe }}" itemprop="url">
<center>{{ tmp_page.title }}</center>
</a>
{% else %}
<a class="dropdown-item pt-2 pb-2 {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink | safe }}" itemprop="url">{{ tmp_page.title }}</a>
{% endif %}
{% endfor %}
{% if subsection.extra.place_order %}
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == "order/_index.md" %}active{% endif %} rounded-1" href="{{
get_url(path="@/order/_index.md") | safe }}" itemprop="url">
<center>{{ "Order hardware" }}</center>
</a>
{% endif %}
</div>
</li>
{% elif subsection.title != 'Other' %}
{% elif subsection.extra.in_topbar %}
<li class="nav-item ms-0 ms-md-4 {% if current_path == subsection.path %}active{% endif %}">
<a class="nav-link" href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>

View File

@ -91,7 +91,7 @@
</p>
</div>
<a href="{{ get_url(path='@/artiq/place-order.md') }}" class="btn btn-primary btn-inversed btn-lg" itemprop="url">Order hardware</a>
<a href="{{ get_url(path='@/order/_index.md') }}" class="btn btn-primary btn-inversed btn-lg" itemprop="url">Order hardware</a>
<a href="https://m-labs.hk/artiq/manual/" class="btn btn-primary btn-lg" itemprop="url">Manual</a>
<a href="https://forum.m-labs.hk" class="btn btn-primary btn-lg" itemprop="url">Forum</a>
<a href="{{ get_url(path='@/artiq/artiq.md') }}" class="btn btn-primary btn-lg" itemprop="url">More...</a>