From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/layouts/_navbar.html.haml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/views/layouts/_navbar.html.haml (limited to 'app/views/layouts/_navbar.html.haml') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml new file mode 100644 index 0000000..4005e28 --- /dev/null +++ b/app/views/layouts/_navbar.html.haml @@ -0,0 +1,21 @@ +.navbar.navbar-inverse.navbar-fixed-top + .navbar-inner + .container-fluid + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} + %span.icon-bar + %span.icon-bar + %span.icon-bar + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} Gemeinschaft 5 + .nav-collapse.collapse + %p.navbar-text.pull-right + - if current_user + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + %ul.nav + %li.active + %a{:href => "#"} Home + %li + %a{:href => "#about"} About + %li + %a{:href => "#contact"} Contact + / /.nav-collapse -- cgit v1.2.3 From 25f7eec8c93630650c2b5f980712261a14b00def Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 23:44:19 +0100 Subject: Avatar --- app/views/layouts/_navbar.html.haml | 43 ++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'app/views/layouts/_navbar.html.haml') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 4005e28..d6a8422 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -1,21 +1,34 @@ .navbar.navbar-inverse.navbar-fixed-top .navbar-inner - .container-fluid + .container + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} + Gemeinschaft 5 + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} %span.icon-bar %span.icon-bar - %span.icon-bar - %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} Gemeinschaft 5 - .nav-collapse.collapse - %p.navbar-text.pull-right - - if current_user - %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} - = current_user - %ul.nav - %li.active - %a{:href => "#"} Home - %li - %a{:href => "#about"} About + %span.icon-bar + + - if current_user + .nav-collapse.collapse + %ul.nav + %li + %a{:href => "#about"} About + %li.pull_right + %a{:href => "#contact"} Contact + + - if current_user + %ul.nav.pull-right + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) + %li.active + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + - else + %li + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + %li - %a{:href => "#contact"} Contact - / /.nav-collapse + %a.navbar-link{:href => log_out_path} + %i.icon-off.icon-white + -- cgit v1.2.3 From f8bc860750f06ab95f9ced8e919e846d3e589819 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 00:02:03 +0100 Subject: Icons --- app/views/layouts/_navbar.html.haml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/views/layouts/_navbar.html.haml') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index d6a8422..d6f08cb 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -19,6 +19,15 @@ - if current_user %ul.nav.pull-right + %li + - if current_user.image? + =image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded') + - else + - if current_user.male? + = image_tag 'icons/user-male-16x.png', :class => 'img-rounded' + - else + = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) %li.active %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} -- cgit v1.2.3