From dc0584f7d993ef7c75fbdd9d341ebb3337f3448d Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 17 Oct 2012 15:19:09 +0200 Subject: UI tweaks including newer version of bootstrap --- app/assets/javascripts/application.js | 1 + app/assets/stylesheets/application.scss | 1 + app/views/home/index.html.haml | 12 ------------ app/views/layouts/_navigation.html.haml | 10 ++++++++++ app/views/layouts/application.html.erb | 14 -------------- app/views/layouts/application.html.haml | 23 +++++++++++++++++++++++ 6 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 app/views/layouts/_navigation.html.haml delete mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/application.html.haml (limited to 'app') diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a0b89db..dc975d4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -15,3 +15,4 @@ //= require srp //= require users //= require_tree . +//= require bootstrap diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index cbd46a7..72c943a 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1 +1,2 @@ @import "bootstrap"; +@import "bootstrap-responsive"; diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 68e39bb..0be7ca2 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,15 +1,3 @@ -%h1 Leap Web Demo Try to fetch a = link_to "cert", cert_path - --if current_user - %p - logged in as - = current_user.login - = link_to "logout", logout_path --else - %p - = link_to "login", login_path - or - = link_to "signup", signup_path diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml new file mode 100644 index 0000000..04d2356 --- /dev/null +++ b/app/views/layouts/_navigation.html.haml @@ -0,0 +1,10 @@ += link_to "Leap Web", root_path, :class => 'brand' +%ul.nav + - if current_user + %li + = link_to t(:logout), logout_path + - else + %li + = link_to t(:login), login_path + %li + = link_to t(:signup), signup_path diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index ce68ec8..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - LeapWeb - <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml new file mode 100644 index 0000000..a57d65e --- /dev/null +++ b/app/views/layouts/application.html.haml @@ -0,0 +1,23 @@ +!!! +%html + %head + %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"} + %title= content_for?(:title) ? yield(:title) : "Leap Web" + %meta{:content => content_for?(:description) ? yield(:description) : "Leap Web", :name => "description"} + = stylesheet_link_tag "application", :media => "all" + = javascript_include_tag "application" + = csrf_meta_tags + = yield(:head) + %body + %header.navbar.navbar-fixed-top + %nav.navbar-inner + .container + = render 'layouts/navigation' + #main{:role => "main"} + .container + .content + .row + .span12 + //= render 'layouts/messages' + = yield + %footer -- cgit v1.2.3