Skip to content

Commit 494dc58

Browse files
Adding a 404 page and updating the readme to include details to add a page and use the suffix typing script
1 parent 3ca7133 commit 494dc58

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

404.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Error 404
3+
layout: default
4+
---
5+
6+
<div class="container">
7+
<div class="row">
8+
<div class="col-md-12">
9+
<div class="error-template">
10+
<h1>
11+
Oops!</h1>
12+
<h2>
13+
404 Not Found</h2>
14+
<div class="error-details">
15+
Sorry, an error has occured, Requested page not found!
16+
</div>
17+
<div class="error-actions">
18+
<a href="index.html" class="btn btn-primary btn-lg"><span class="fas fa-home"></span>
19+
Take Me Home </a><a href="contact.html" class="btn btn-primary btn-lg"><span
20+
class="fas fa-envelope"></span> Contact Us </a>
21+
</div>
22+
</div>
23+
</div>
24+
</div>
25+
</div>

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,15 @@ The site's sitemap is generated automatically on deployment
2828
To avoid a page being indexed, e.g people pages that are included use the below snippet at the top of the page.
2929

3030
`sitemap: false`
31+
32+
# Adding a page to the typed suffix functionality
33+
* Add a variable to the suffix-lists.js file with the first word of the page title. Assign the array you want to use to the variable.
34+
35+
e.g.
36+
37+
For a page named "Home"
38+
39+
```javascript
40+
var Languages = ["Java","HTML"]
41+
var Home = Languages
42+
```

css/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ div.event-book-button {
403403
margin-top:0.2em;
404404
}
405405

406+
/*404*/
407+
408+
.error-template {padding: 40px 15px;text-align: center;}
409+
.error-actions {margin-top:15px;margin-bottom:15px;}
410+
.error-actions .btn { margin-right:10px; text-decoration: none;}
411+
406412
/* RESIZING (min-width) */
407413

408414
@media (min-width: 526px) {

js/suffix-lists.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ var people = [
1515
];
1616

1717
var About = people;
18-
1918
var Activities = [
2019
"codecademy",
2120
"CodeCombat",
@@ -35,7 +34,6 @@ var Activities = [
3534
"Jupyter"
3635
];
3736

38-
var Contact = people;
3937

4038
var Events = [
4139
"Databases",
@@ -56,6 +54,8 @@ var Languages = [
5654
"Python",
5755
"SQL"
5856
];
57+
var Error = Languages
58+
5959

6060
var People = [
6161
"Drew",

0 commit comments

Comments
 (0)