Skip to content

Commit

Permalink
Add 404 error page (elixirschool#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitrino authored and doomspork committed Mar 10, 2019
1 parent ba6b50a commit 45f5e71
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
11 changes: 11 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Not found
layout: default
disable_transform: true
lang: en
permalink: 404.html
---
<section class="not_found">
<div class="not_found-code">404</div>
<div class="not_found-text">Looks like you are lost</div>
</section>
15 changes: 15 additions & 0 deletions _assets/stylesheets/components/_errors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.not_found {
text-align: center;
color: _purple(fg-hov);

&-code {
font-size: 12em;
font-weight: bold;
line-height: 1.25;
}

&-text {
font-size: 2em;
line-height: 1.25;
}
}
1 change: 1 addition & 0 deletions _assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
@import 'components/mini-posts';
@import 'components/features';
@import 'components/posts';
@import 'components/errors';

// Layout.

Expand Down
2 changes: 1 addition & 1 deletion _plugins/elixir_school/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def build_tree(site)

site.pages.each do |page|
next if site.config['exclude_from_chapters'].include? page.name
lang = get_lang_from_url(site, page.url)
lang = page.data['lang'] || get_lang_from_url(site, page.url)
section = get_section_from_url(site, page.url)
chapter_name = get_chapter_from_url(site, page.url)

Expand Down

0 comments on commit 45f5e71

Please sign in to comment.