unify hardware order page at /order
This commit is contained in:
parent
650bbf3218
commit
195efdc88c
@ -4,5 +4,5 @@ weight = 4
|
||||
sort_by = "weight"
|
||||
|
||||
[extra]
|
||||
title = "About us"
|
||||
in_topbar = true
|
||||
+++
|
||||
|
||||
@ -3,4 +3,8 @@ title = "ARTIQ control system"
|
||||
weight = 1
|
||||
sort_by = "weight"
|
||||
redirect_to = "artiq/artiq"
|
||||
|
||||
[extra]
|
||||
in_topbar = true
|
||||
place_order = true
|
||||
+++
|
||||
@ -2,5 +2,9 @@
|
||||
title = "Lasers"
|
||||
weight = 2
|
||||
sort_by = "weight"
|
||||
redirect_to = "lasers/kirdy"
|
||||
|
||||
[extra]
|
||||
in_topbar = true
|
||||
place_order = true
|
||||
+++
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
+++
|
||||
title = "Order hardware"
|
||||
weight = 5
|
||||
template = "page-place-order.html"
|
||||
|
||||
[extra]
|
||||
menu_item = "th1"
|
||||
+++
|
||||
@ -3,4 +3,7 @@ title = "Miscellaneous"
|
||||
weight = 3
|
||||
sort_by = "weight"
|
||||
redirect_to = "misc/migen"
|
||||
|
||||
[extra]
|
||||
in_topbar = true
|
||||
+++
|
||||
@ -1,8 +1,7 @@
|
||||
+++
|
||||
title = "Order hardware"
|
||||
weight = 5
|
||||
template = "page-place-order.html"
|
||||
|
||||
[extra]
|
||||
menu_item = "th1"
|
||||
+++
|
||||
in_topbar = false
|
||||
+++
|
||||
@ -1,4 +1,7 @@
|
||||
+++
|
||||
title = "Other"
|
||||
render = false
|
||||
|
||||
[extra]
|
||||
in_topbar = false
|
||||
+++
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user