Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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
Add Comment
Please, Sign In to add comment