Skip to content

Commit 17b216a

Browse files
committed
nav and home page polish
1 parent c140dfa commit 17b216a

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

_includes/essay/side-nav.html

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
11
{% if site.data.theme.base-theme == "monograph"%}
22
<nav class="sticky-top shadow navbar navbar-expand-lg {{ site.data.theme.navbar-color | default: 'navbar-dark' }} {{ site.data.theme.navbar-background | default: 'bg-dark' }}">
33
<div class="container">
4-
<div class="d-flex align-items-center w-100 position-relative">
4+
<!-- Mobile layout: Stack title above buttons -->
5+
<div class="d-lg-none w-100">
6+
<!-- Title row -->
7+
<div class="text-center py-2">
8+
<h1 class="mb-0">
9+
<a class="navbar-brand fs-4" href="{{ '/' | relative_url }}">
10+
{{ site.title }}
11+
</a>
12+
</h1>
13+
</div>
14+
<!-- Buttons row -->
15+
<div class="d-flex justify-content-between align-items-center pb-2">
16+
<button class="btn btn-link {% if site.data.theme.navbar-color == 'navbar-light' %}text-dark{% else %}text-white{% endif %} text-decoration-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasContents" aria-controls="offcanvasContents" aria-label="Open contents">
17+
CONTENTS
18+
</button>
19+
<button class="btn btn-link {% if site.data.theme.navbar-color == 'navbar-light' %}text-dark{% else %}text-white{% endif %}" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" aria-label="Open navigation">
20+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16" style="width:1.75em;height: 1.75em;">
21+
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
22+
</svg>
23+
</button>
24+
</div>
25+
</div>
526

6-
<!-- Left: Contents off-canvas button -->
27+
<!-- Desktop layout: Original side-by-side -->
28+
<div class="d-none d-lg-flex align-items-center w-100 position-relative">
29+
<!-- Left: Contents button -->
730
<button class="btn btn-link {% if site.data.theme.navbar-color == 'navbar-light' %}text-dark{% else %}text-white{% endif %} text-decoration-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasContents" aria-controls="offcanvasContents" aria-label="Open contents">
831
CONTENTS
932
</button>
1033

11-
<!-- Center: Site title (absolutely positioned for true centering) -->
34+
<!-- Center: Site title -->
1235
<div class="position-absolute top-50 start-50 translate-middle text-center essay-navbar-title">
1336
<h1 class="mb-0">
1437
<a class="navbar-brand fs-4" href="{{ '/' | relative_url }}">
@@ -17,25 +40,24 @@ <h1 class="mb-0">
1740
</h1>
1841
</div>
1942

20-
<!-- Right: Menu off-canvas button -->
43+
<!-- Right: Menu button -->
2144
<div class="ms-auto">
2245
<button class="btn btn-link {% if site.data.theme.navbar-color == 'navbar-light' %}text-dark{% else %}text-white{% endif %}" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" aria-label="Open navigation">
23-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi icon-sprite fs-1" viewBox="0 0 16 16" style="width:.75em;height: .75em;">
24-
<path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
46+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16" style="width:1.75em;height: 1.75em;">
47+
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
2548
</svg>
2649
</button>
2750
</div>
28-
2951
</div>
3052
</div>
3153
</nav>
3254

33-
<!-- Off-canvas panels (hidden by default) -->
55+
<!-- Off-canvas panels -->
3456
{% include essay/off-canvas-contents.html %}
3557
{% include essay/off-canvas-menu.html %}
3658

3759
{% else %}
38-
<!-- Non-monograph theme: keep original off-canvas behavior -->
60+
<!-- Non-monograph theme -->
3961
<nav class="navbar">
4062
<div class="container-fluid">
4163
<h1><a class="navbar-brand text-dark fs-3" href="{{ '/' | relative_url }}">{% include feature/icon.html icon="house" label="home icon linking back to home page" %} {{site.title}}</a></h1>

_layouts/home-essay.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ <h1 class="display-2">{{ site.title }}</h1>
231231
</div>
232232

233233
<div id="action-box">
234-
<a class="btn btn-lg py-3 px-5 display-6 fs-2 text-white bg-dark bg-opacity-75 rounded text-decoration-none" href="{{ site.essay[0].url | relative_url }}">Read the Essay &raquo;</a>
234+
<a class="btn btn-lg py-3 px-5 display-6 fs-2 text-white bg-dark bg-opacity-75 rounded text-decoration-none" href="{{ site.essay[0].url | relative_url }}">Read &raquo;</a>
235235

236236
{% if site.data.theme.base-theme == 'monograph' %}
237237
<a class="btn btn-sm py-2 px-4 fs-5 text-white bg-dark bg-opacity-75 rounded text-decoration-none" href="#table-of-contents">Table of Contents &darr;</a>

0 commit comments

Comments
 (0)