Skip to content

Commit dad7815

Browse files
committed
Add a 404 page & necessary css/js changes
1 parent 15b4b81 commit dad7815

File tree

3 files changed

+109
-1
lines changed

3 files changed

+109
-1
lines changed

dynamic/css/layout/_wireframe.scss

+6
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ $main-z-index : 100;
196196
padding-top : $banner-buffer-md-up;
197197
}
198198

199+
@include when-inside('.ERROR404') {
200+
@include narrow-from('sm') {
201+
text-align : center;
202+
}
203+
}
204+
199205
/**
200206
* Main Content Well
201207
* 1. Because some elements inside this <main> are given relative positioning

dynamic/js/basho/selectors.coffee

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ generateVersionLists = () ->
7171

7272
# Fetch the Project Descriptions from the server, and do all the heavy lifting
7373
# inside the `success` callback.
74-
if project and project != "community" then $.getJSON('/data/project_descriptions.json',
74+
if project and project != "community" && project != "404"
75+
then $.getJSON('/data/project_descriptions.json',
7576
(data) ->
7677
project_data = data[project]
7778

layouts/404.html

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!DOCTYPE html>
2+
3+
<!-- 404 Page
4+
========
5+
This template follows the style of the _default/single.html layout, though
6+
contains fewer of the dynamic elements found on the Primary Content pages.
7+
8+
Please see layouts/_default/single.html for a discussion on HTML style,
9+
format, and page layout.
10+
11+
{{ $project := "404" }}
12+
{{ $title := "404 - File Not Found" }}
13+
14+
15+
{{ .Scratch.Add "project" $project }}
16+
{{ .Scratch.Add "title" $title }}
17+
18+
19+
20+
{{ $HugoNode := . }}
21+
-->
22+
23+
<html class="no-js" lang="en">
24+
25+
26+
27+
{{ partial "head.html" $HugoNode }}
28+
29+
30+
31+
<body class="ERROR404">
32+
33+
34+
{{ partial "google-tag-manager.html" $HugoNode }}
35+
36+
37+
{{ partial "banner.html" $HugoNode }}
38+
39+
40+
41+
<!-- Content Navigation stand-in
42+
If content-navigation.html is ever modified, this section should be updated
43+
to account for the changes. -->
44+
<nav class="content-nav content-nav--top-size-half">
45+
46+
<div class="content-nav__fixed-top">
47+
<form id="searchbox_011972015458788978446:zgdcy4fa-o0" class="search" action="">
48+
49+
<span class="block float-left search__icon-container docs-icon--search">|</span>
50+
51+
<span class="block overflow">
52+
<input class="search__input" id="main-search" type="search" name="q" placeholder="Search">
53+
</span>
54+
55+
</form>
56+
57+
</div>
58+
59+
</nav>
60+
61+
62+
63+
<div class="content-well">
64+
65+
66+
<article class="main-article">
67+
68+
69+
{{ partial "article-front-matter.html" $HugoNode }}
70+
71+
<p>Sorry, but the page you were trying to view could not be found.</p>
72+
73+
<br>
74+
75+
<p>You may want to check out:</p>
76+
77+
<br>
78+
79+
<p><a href="/community">Our Community Pages</a></p>
80+
<p><a href="/riak/kv/latest">The Riak KV Docs</a></p>
81+
<p><a href="/riak/ts/latest">The Riak TS Docs</a></p>
82+
<p><a href="/riak/cs/latest">The Riak CS Docs</a></p>
83+
84+
<br>
85+
<br>
86+
<br>
87+
88+
89+
</article>
90+
91+
92+
{{ partial "footer.html" $HugoNode }}
93+
94+
95+
</div>
96+
97+
98+
<script src="/js/main.js" type="text/javascript"></script>
99+
100+
</body>
101+
</html>

0 commit comments

Comments
 (0)