summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2009-11-09 16:56:03 +0100
committerChristoph Helma <helma@in-silico.de>2009-11-09 16:56:03 +0100
commit59f751019226834eb30085c74310cec593956bd8 (patch)
tree3493e31c2062875c6f565971e0ec8d0bf4d4c53c
parenta541b063f4980d753a8b61e80bd28089d19b2330 (diff)
navigation bar added
-rw-r--r--application.rb12
-rw-r--r--views/layout.haml14
-rw-r--r--views/style.sass3
3 files changed, 16 insertions, 13 deletions
diff --git a/application.rb b/application.rb
index b586b04..6dc8730 100644
--- a/application.rb
+++ b/application.rb
@@ -6,27 +6,27 @@ get '/?' do
haml :index
end
-get '/software' do
+get '/software/?' do
haml :software
end
-get '/services' do
+get '/services/?' do
haml :services
end
-get '/publications' do
+get '/publications/?' do
haml :publications
end
-get '/contact' do
+get '/contact/?' do
haml :contact
end
-get '/links' do
+get '/links/?' do
haml :links
end
-get '/awards' do
+get '/awards/?' do
haml :awards
end
diff --git a/views/layout.haml b/views/layout.haml
index d8d0fb2..95faae9 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -14,19 +14,19 @@
%br research + consulting
.index
%ul
- %li
+ %li{:class => ("selected" if /^\/$/ =~ request.path )}
%a{ :href => "/" } Home
- %li
+ %li{:class => ("selected" if /software/ =~ request.path )}
%a{ :href => "/software" } Software
- %li
+ %li{:class => ("selected" if /services/ =~ request.path )}
%a{ :href => "/services" } Services
- %li
+ %li{:class => ("selected" if /publications/ =~ request.path )}
%a{ :href => "/publications" } Publications
- %li
+ %li{:class => ("selected" if /awards/ =~ request.path )}
%a{ :href => "/awards" } Awards
- %li
+ %li{:class => ("selected" if /links/ =~ request.path )}
%a{ :href => "/links" } Links
- %li
+ %li{:class => ("selected" if /contact/ =~ request.path )}
%a{ :href => "/contact" } Contact
.content
diff --git a/views/style.sass b/views/style.sass
index 8a5c0f4..b65f749 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -15,6 +15,9 @@ body
&:hover
:background-color white
+ li.selected
+ :background-color green
+
.content
:background-color yellow