on master help sign in
update nav to toggle between docs sections
86c416aJosh Lehman
templates/partials/navigation-docs.html+37−16
@@ -34,33 +34,54 @@
34{% endif %}
34{% endif %}
35
35
36{% block content %}
36{% block content %}
37+{% if section %}
38+ {%- set base = section.components[0] -%}
39+{% elif page %}
40+ {%- set base = page.components[0] -%}
41+{% endif %}
37<nav class="bg-gray5 dn db-xl pt4 full-left no-break docs pr4">
42<nav class="bg-gray5 dn db-xl pt4 full-left no-break docs pr4">
38 <a class="gray3" href="{{config.base_url}}">Urbit</a>
43 <a class="gray3" href="{{config.base_url}}">Urbit</a>
39 <span class="gray3"> / </span>
44 <span class="gray3"> / </span>
45+ {% if base == "docs" %}
40 <a href="{{config.base_url}}/docs/">
46 <a href="{{config.base_url}}/docs/">
41− Documentation
47+ Development
48+ </a>
49+ {% elif base == "using" %}
50+ <a href="{{config.base_url}}/using/">
51+ Operations
42 </a>
52 </a>
53+ {% endif %}
43−<button id="js-search-window-toggle" class="pointer pa0 pv3 dn db-m db-l db-xl bw-0 relative" type="button"
54+ <button id="js-search-window-toggle" class="pointer pa0 pv3 dn db-m db-l db-xl bw-0 relative" type="button"
44 style="outline:none">
55 style="outline:none">
45 <span class="dib pv1 v-mid gray3">Search {{sectionTitle}}</span>
56 <span class="dib pv1 v-mid gray3">Search {{sectionTitle}}</span>
46 <span class="ml1 pa1 dib v-mid ba br1 b--gray3 gray3 f7" id="keyhint">Ctrl + /</span>
57 <span class="ml1 pa1 dib v-mid ba br1 b--gray3 gray3 f7" id="keyhint">Ctrl + /</span>
47</button>
58</button>
48 <ul class="lh-copy">
59 <ul class="lh-copy">
49− <li class="ml2 mt1"><a href="/using/install">Install -> </a></li>
60+ <li class="ml2 mt1"><a href="/get-started">Install / Get Started -> </a></li>
50− <li class="ml2 mt1"><a href="/using/os/">Operations Manual -></a></li>
61+ <li class="ml2 mt1 mb4">
51− <li class="ml2 mt1 mb4"><a href="/using/develop/">Developer's Guide -></a></li>
62+ {% if base == "using" %}
52− {% block menu %}
63+ <a href="/docs/">Development Docs -></a>
53− {% if sectionTitle == "Docs" %}
64+ {% elif base == "docs" %}
54− <li class="ml3 mt1">
65+ <a href="/using/">Operations Docs -></a>
55− <a
56− {% if section and section.relative_path == "docs/_index.md" %}
57− class="fw6"
58− {% endif %}
59− href="/docs">
60− Introduction
61− </a>
62− </li>
63 {% endif %}
66 {% endif %}
67+ </li>
68+ {% block menu %}
69+ <li class="ml3 mt1">
70+ <a
71+ {% if section and section.relative_path == "docs/_index.md" %}
72+ class="fw6"
73+ {% elif section and section.relative_path == "using/_index.md" %}
74+ class="fw6"
75+ {% endif %}
76+ {% if base == "docs" %}
77+ href="/docs"
78+ {% elif base == "using" %}
79+ href="/using"
80+ {% endif %}
81+ >
82+ Introduction
83+ </a>
84+ </li>
64 {% set index = get_section(path=directory ~ "/_index.md") %}
85 {% set index = get_section(path=directory ~ "/_index.md") %}
65 {% for s in index.subsections %}
86 {% for s in index.subsections %}
66 {% set subsection = get_section(path=s) %}
87 {% set subsection = get_section(path=s) %}