Navigation Menu

Skip to content

Commit

Permalink
Added a nicer 404 page. Change the link to the project to point to in…
Browse files Browse the repository at this point in the history
…tegrityapp.com [integrity#13 state:resolved]
  • Loading branch information
foca committed Jul 23, 2008
1 parent 88aeb99 commit ac219f1
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/integrity/ui/web.rb
Expand Up @@ -8,8 +8,7 @@

not_found do
status 404
content_type 'text/plain'
'Not Found'
show :not_found, :title => "lost, are we?"
end

include Integrity
Expand Down Expand Up @@ -84,7 +83,7 @@ def show(view, options={})
end

def pages
@pages ||= [["projects", "/"], ["new project", "/new"], ["edit", nil]]
@pages ||= [["projects", "/"], ["new project", "/new"]]
end

def breadcrumbs(*crumbs)
Expand Down
14 changes: 13 additions & 1 deletion lib/integrity/ui/web/views/integrity.sass
@@ -1,4 +1,5 @@
!default_fonts = "Helvetica Neue, Helvetica, Arial, sans-serif"
!nice_fonts = "Georgia, Times New Roman, serif"
!monospace_fonts = "Monaco, Deja Vu Sans Mono, Inconsolata, Consolas, monospace"

!page_bg = #e0e0e0
Expand Down Expand Up @@ -159,7 +160,7 @@ a
:float none
:display inline

.blank_slate
.blank_slate, .error
p
:position relative
:top .3em
Expand All @@ -178,6 +179,17 @@ a
&:hover
:background = !link_color
:color = !link_bg

.error
dt
:margin
:top 1.4em
:bottom .3em
:font
:size 1.75em
:family = !nice_fonts
dd
:line-height 1.4

#projects
:margin 1em 0 2em
Expand Down
2 changes: 1 addition & 1 deletion lib/integrity/ui/web/views/layout.haml
Expand Up @@ -12,5 +12,5 @@
%h1= @title.join(" / ")
%address.watermark
checked with
%a{ :href => "http://github.com/foca/integrity", :title => "The fun continuous integration server" } integrity
%a{ :href => "http://integrityapp.com", :title => "The fun continuous integration server" } integrity
#content= yield
31 changes: 31 additions & 0 deletions lib/integrity/ui/web/views/not_found.haml
@@ -0,0 +1,31 @@
.error
%h1
Ehm, you seem a bit lost, sir. Maybe going to the
%a{ :href => "/", :rel => "home" } list of projects
will help?
%dl
%dt Ouch. This is a 404 error-thingie, right?
%dd Yeah, you browsed to a page that doesn't exist in this server.

%dt What can I do?
%dd
As a very good book says on its cover:
= succeed "." do
%strong DON'T PANIC
/ if you didn't get the reference you aren't as nerd as you should be
You should probably just go back to
%a{ :href => "/", :rel => "home" } the projects list
or, alternatively, go
= succeed "." do
%a{ :href => request.referer } back from whence you came

%dt
What the hell is
= succeed "?" do
%strong Integrity
%dd
Integrity is your friendly
%a{ :href => "http://en.wikipedia.org/wiki/Continuous_integration" } Continuous Integration
server. If you want to know more about us, check our website at
= succeed "." do
%a{ :href => "http://integrityapp.com" } integrityapp.com

0 comments on commit ac219f1

Please sign in to comment.