Skip to content

Instantly share code, notes, and snippets.

@slawosz
Created May 19, 2010 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slawosz/406168 to your computer and use it in GitHub Desktop.
Save slawosz/406168 to your computer and use it in GitHub Desktop.
#layout with very simple styling
file "app/views/layouts/application.haml", <<-HAML
!!! 5
%html
%head
%title
New Rails App!
= stylesheet_link_tag :all
= csrf_meta_tag
%body
#container
#user_navigation
- if user_signed_in?
== Signed in as \#{ current_user.email }. \#{ link_to "Sign out", destroy_user_session_path }
- else
== \#{link_to "Sign in", new_user_session_path } or \#{ link_to "sign up", new_user_registration_path }
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_\#{name}"
#content
= yield
HAML
#and stylesheet
file 'public/stylesheets/style.css', <<-CSS
body {
font-size: 13px;
font-family: Consolas, 'Lucida Console', Monaco, monospace;
background: #efefef;
}
#container {
width: 940px;
padding: 10px;
margin: 11px auto;
background: #fff;
}
#user_navigation {
text-align: left;
}
#flash_notice, #flash_alert {
margin: 10px;
padding: 10px;
text-align: center;
}
#flash_notice {
background-color: #79e077;
border: 1px solid #049f00;
}
#flash_alert {
background-color: #fd8588;
border: 1px solid #d40404;
}
CSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment