Skip to content

Instantly share code, notes, and snippets.

@turingmachine
Created May 11, 2009 15:47
Show Gist options
  • Save turingmachine/110032 to your computer and use it in GitHub Desktop.
Save turingmachine/110032 to your computer and use it in GitHub Desktop.
xhtml_strict do
head do
title 'cinemaniacs!'
stylesheet_link_tag 'base'
stylesheet_link_tag 'themes/default/style.css'
end
body do
div.container! do
if logged_in?
div.header! do
span.userbar! do
render :partial => 'users/user_bar'
end
h1 do
link_to 'Cinemaniacs', '/'
end
div :id => 'user-navigation' do
ul do
li.first { link_to 'Admin', '/admin/movies' }
li { link_to 'Downloads', '/downloads' }
li { link_to 'Rules', '/rules' }
li { link_to 'Logout', '/logout' }
end
div.clear {}
end
div :id => 'main-navigation' do
ul do
li.first { link_to 'Dashboard', '/dashboard' }
li { link_to 'Music', '/music' }
li { link_to 'Movies', '/movies' }
li { link_to 'Software', '/software' }
end
div.clear {}
end
end
div.wrapper! do
div.main! do
if flash[:notice]
div :class => 'notice flash-messages fade-and-hide' do
p flash[:notice]
end
end
if flash[:error]
div :class => 'error flash-messages fade-and-hide' do
p flash[:error]
end
end
self << content_for_layout
end
div.sidebar! do
render :partial => 'sidebar'
end
div.clear {}
end
div.footer! do
div.block do
p 'Cinemaniacs! admin at cinemaniacs dot org'
end
end
else
self << content_for_layout
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment