Added a 404 error page; added some more linking between the pages
This commit is contained in:
parent
e5022c5624
commit
df53c44201
12
src/routes/error.rb
Normal file
12
src/routes/error.rb
Normal file
@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# error handling routes
|
||||
class Destructo < Sinatra::Base
|
||||
|
||||
error 404 do
|
||||
erb :'error/404', locals: {
|
||||
title: 'Page not found'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'error'
|
||||
require_relative 'index'
|
||||
require_relative 'message'
|
||||
|
5
views/error/404.erb
Normal file
5
views/error/404.erb
Normal file
@ -0,0 +1,5 @@
|
||||
<p>This page does not exist.</p>
|
||||
|
||||
<p>If you're looking for a message, it's possible that it has already been viewed and subsequently deleted.</p>
|
||||
|
||||
<p>If you would like to send a new message, head <a href="/">back home</a> to get started.</p>
|
@ -1,5 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="columns twelve">
|
||||
<p>This is the home page.</p>
|
||||
|
||||
<p><a href="/message/new">Click here</a> to send a new message.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user