on master help sign in
urbit.org: conditional section name, remove icon
975e8e1Matilde Park
sass/_main.scss−4
@@ -314,10 +314,6 @@ nav.previous, nav.next {
314 // min-width: 110px;
314 // min-width: 110px;
315 text-align: left;
315 text-align: left;
316 background: transparent;
316 background: transparent;
317− span#search-icon {
318− display: inline-block;
319− transform: translate(-4px, 2px) rotate(-45deg);
320− }
321 span.search-slash {
317 span.search-slash {
322 font-size: 0.75em;
318 font-size: 0.75em;
323 position: absolute;
319 position: absolute;
templates/partials/navigation-docs.html+35−6
@@ -1,4 +1,30 @@
1<!-- First nav is desktop-specific. Second nav is dropdown version for mobile. -->
1<!-- First nav is desktop-specific. Second nav is dropdown version for mobile. -->
2+
3+{% set sectionTitle = "urbit.org" %}
4+{% if page %}
5+ {% if "docs" in page.components %}
6+ {% set sectionTitle = "Docs" %}
7+ {% endif %}
8+ {% if "updates" in page.components %}
9+ {% set sectionTitle = "Updates" %}
10+ {% endif %}
11+ {% if "blog" in page.components %}
12+ {% set sectionTitle = "Blog" %}
13+ {% endif %}
14+{% endif %}
15+
16+{% if section %}
17+ {% if "docs" in section.components %}
18+ {% set sectionTitle = "Docs" %}
19+ {% endif %}
20+ {% if "updates" in section.components %}
21+ {% set sectionTitle = "Updates" %}
22+ {% endif %}
23+ {% if "blog" in section.components %}
24+ {% set sectionTitle = "Blog" %}
25+ {% endif %}
26+{% endif %}
27+
2{% block content %}
28{% block content %}
3<nav class="bg-gray5 dn db-xl pt4 full-left no-break docs pr4">
29<nav class="bg-gray5 dn db-xl pt4 full-left no-break docs pr4">
4 <a class="gray3" href="{{config.base_url}}">Urbit</a>
30 <a class="gray3" href="{{config.base_url}}">Urbit</a>
@@ -6,10 +32,11 @@
6 <a href="{{config.base_url}}/docs/">
32 <a href="{{config.base_url}}/docs/">
7 Documentation
33 Documentation
8 </a>
34 </a>
9− <button id="js-search-window-toggle" class="mt2 mb4 dn db-m db-l db-xl" type="button" style="outline:none">
35+<button id="js-search-window-toggle" class="pointer pa0 pv3 dn db-m db-l db-xl bw-0 relative" type="button"
10− <span id="search-icon" class="f3 gray3">⚲</span><span class="ml3 gray2">Search</span>
36+ style="outline:none">
37+ <span class="dib pv1 v-mid gray3">Search {{sectionTitle}}</span>
11− <span class="absolute pa1 ba b--gray3 gray3 br1 f7" id="keyhint" style="right: -139px;top: 6px;">Ctrl + /</span>
38+ <span class="ml1 pa1 dib v-mid ba br1 b--gray3 gray3 f7" id="keyhint">Ctrl + /</span>
12− </button>
39+</button>
13 <ul class="lh-copy">
40 <ul class="lh-copy">
14 <li class="ml2 mt1"><a href="/using/install">Install -> </a></li>
41 <li class="ml2 mt1"><a href="/using/install">Install -> </a></li>
15 <li class="ml2 mt1"><a href="/using/operations/">Operations Manual -></a></li>
42 <li class="ml2 mt1"><a href="/using/operations/">Operations Manual -></a></li>
@@ -141,8 +168,10 @@
141 {% endif %}
168 {% endif %}
142 {% endfor %}
169 {% endfor %}
143 </select>
170 </select>
144− <button id="js-search-window-toggle" class="mt4 mb4 dn db-m db-l db-xl" type="button" style="outline:none">
171+ <button id="js-search-window-toggle" class="pointer pa0 pt3 dn db-m db-l db-xl bw-0 relative" type="button"
145− <span id="search-icon" class="f3 gray3">⚲</span><span class="ml3 gray2">Search</span>
172+ style="outline:none">
173+ <span class="pv1 dib v-mid gray3">Search {{sectionTitle}}</span>
174+ <span class="ml1 pa1 dib v-mid ba br1 b--gray3 gray3 f7" id="keyhint">Ctrl + /</span>
146 </button>
175 </button>
147</nav>
176</nav>
148{% endblock content %}
177{% endblock content %}
templates/partials/navigation-search.html+28−7
@@ -1,8 +1,29 @@
1+{% set sectionTitle = "urbit.org" %}
2+{% if page %}
3+ {% if "docs" in page.components %}
4+ {% set sectionTitle = "Docs" %}
5+ {% endif %}
6+ {% if "updates" in page.components %}
7+ {% set sectionTitle = "Updates" %}
8+ {% endif %}
9+ {% if "blog" in page.components %}
10+ {% set sectionTitle = "Blog" %}
11+ {% endif %}
12+{% endif %}
13+
14+{% if section %}
15+ {% if "docs" in section.components %}
16+ {% set sectionTitle = "Docs" %}
17+ {% endif %}
18+ {% if "updates" in section.components %}
19+ {% set sectionTitle = "Updates" %}
20+ {% endif %}
21+ {% if "blog" in section.components %}
22+ {% set sectionTitle = "Blog" %}
23+ {% endif %}
24+{% endif %}
25+
1−<button id="js-search-window-toggle" class="pointer mt2 dn db-m db-l db-xl bw-0 mb3 relative" type="button" style="outline:none">
26+<button id="js-search-window-toggle" class="pointer pa0 pt3 dn db-m db-l db-xl bw-0 relative" type="button" style="outline:none">
2− <span id="search-icon" class="f3 gray3">⚲</span>
3− <span class="gray3">Search</span>
27+ <span class="pv1 dib v-mid gray3">Search {{sectionTitle}}</span>
4− <span class="absolute pa1 ba b--gray3 gray3 br1 f7" id="keyhint" style="
28+ <span class="ml1 pa1 dib v-mid ba br1 b--gray3 gray3 f7" id="keyhint">Ctrl + /</span>
5− right: -56px;
6− top: 6px;
7− ">Ctrl + /</span>
8</button>
29</button>