Skip to content

Commit 0ca6136

Browse files
committed
Updated 404 page to include left sidebar.
Sidebar contains search and site section headings.
1 parent 736ed64 commit 0ca6136

2 files changed

Lines changed: 45 additions & 8 deletions

File tree

assets/scss/_styles_project.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,19 @@
6767
}
6868
}
6969

70+
// 404 page sidebar styling
71+
.td-404 .td-sidebar-nav h5 {
72+
font-size: 16px;
73+
padding-left: 1rem;
74+
padding-bottom: 0.5rem;
75+
border-bottom: 1px solid #dee2e6;
76+
margin-left: 0;
77+
}
78+
79+
.td-404 .td-sidebar-nav__section {
80+
padding-left: 1rem;
81+
}
82+
7083
// Keep search visible on mobile, wrap to second row
7184
@media (max-width: 991.98px) {
7285
.td-navbar-container {

layouts/404.html

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
{{ define "main" }}
2-
<main id="main">
3-
<div>
4-
<h1 id="title">Page Not Found</h1>
5-
<p>The page or document you were trying to reach does not exist. It might have been moved or removed. If you are following a link from some other source, please let us know so we can correct the problem.</p>
6-
<p>Please check the URL for typos or
7-
<a href="{{ "" | relURL }}">visit our homepage</a>.</p>
8-
</div>
9-
</main>
2+
<div class="td-main">
3+
<div class="row flex-xl-nowrap">
4+
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
5+
<div class="td-sidebar__inner">
6+
<form class="td-sidebar__search d-flex align-items-center">
7+
<div class="td-search">
8+
<div class="td-search__icon"></div>
9+
<input type="search" name="q" class="td-search__input form-control td-search-input" placeholder="Search this site…" aria-label="Search this site…" autocomplete="off">
10+
</div>
11+
</form>
12+
<nav class="td-sidebar-nav">
13+
<h5 class="mt-3 mb-2">Site Sections</h5>
14+
<ul class="td-sidebar-nav__section pe-md-3 ul-0 list-unstyled">
15+
{{ range site.Menus.main }}
16+
<li class="td-sidebar-nav__section-title my-2">
17+
<a href="{{ .URL }}" class="td-sidebar-link">
18+
{{ if .Pre }}{{ .Pre | safeHTML }} {{ end }}{{ .Name }}
19+
</a>
20+
</li>
21+
{{ end }}
22+
</ul>
23+
</nav>
24+
</div>
25+
</aside>
26+
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
27+
<h1>Page Not Found</h1>
28+
<p class="lead">The page you were looking for doesn't exist. It may have been moved or removed.</p>
29+
<p>You can use the search box or browse the site sections on the left to find what you're looking for.</p>
30+
<p>Or <a href="{{ "" | relURL }}">return to the homepage</a>.</p>
31+
</main>
32+
</div>
33+
</div>
1034
{{ end }}

0 commit comments

Comments
 (0)