Add header on not connected pages on mobile version

This commit is contained in:
fla 2015-10-10 12:21:43 +02:00
parent 245698865f
commit 96af4a0aec
3 changed files with 40 additions and 27 deletions

View file

@ -10,6 +10,13 @@ $mobile-navbar-height: 46px;
min-height: $mobile-navbar-height !important; min-height: $mobile-navbar-height !important;
max-height: $mobile-navbar-height !important; max-height: $mobile-navbar-height !important;
.login {
color: $white;
float: right;
font-weight: bold;
padding: 13px;
}
.navbar { .navbar {
margin: 0; margin: 0;
padding: 0; padding: 0;

View file

@ -4,32 +4,38 @@
= link_to(image_tag("mobile/asterisk_white_mobile.png", class: "img-responsive"), = link_to(image_tag("mobile/asterisk_white_mobile.png", class: "img-responsive"),
stream_path, id: "header-title", class: "navbar-brand") stream_path, id: "header-title", class: "navbar-brand")
%ul.nav.navbar-nav#nav-badges - if user_signed_in?
-# Notifications %ul.nav.navbar-nav#nav-badges
%li -# Notifications
= link_to notifications_path, class: "badge-link", id: "notification-badge" do %li
%i.entypo-bell = link_to notifications_path, class: "badge-link", id: "notification-badge" do
- if current_user.unread_notifications.size > 0 %i.entypo-bell
%span.badge.badge-important#notification - if current_user.unread_notifications.size > 0
= current_user.unread_notifications.size %span.badge.badge-important#notification
= current_user.unread_notifications.size
-# Conversations -# Conversations
%li %li
= link_to conversations_path, class: "badge-link", id: "conversations-badge" do = link_to conversations_path, class: "badge-link", id: "conversations-badge" do
%i.entypo-mail %i.entypo-mail
- if current_user.unread_message_count > 0 - if current_user.unread_message_count > 0
%span.badge.badge-important#conversation %span.badge.badge-important#conversation
= current_user.unread_message_count = current_user.unread_message_count
-# Publisher -# Publisher
%li %li
= link_to new_status_message_path, class: "badge-link", id: "compose-badge" do = link_to new_status_message_path, class: "badge-link", id: "compose-badge" do
%i.diaspora-custom-compose %i.diaspora-custom-compose
-# Menu -# Menu
%li %li
%button.navbar-toggle#menu-badge{type: "button"} %button.navbar-toggle#menu-badge{type: "button"}
%span.sr-only %span.sr-only
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
- else
- if AppConfig.settings.enable_registrations? && !current_page?(controller: "/registrations", action: :new)
%li= link_to t("devise.shared.links.sign_up"), new_user_registration_path, class: "login"
%li= link_to t("devise.shared.links.sign_in"), new_user_session_path, class: "login"

View file

@ -51,8 +51,8 @@
= include_gon(:camel_case => true) = include_gon(:camel_case => true)
%body %body
#app #app
= render "layouts/header"
- if user_signed_in? - if user_signed_in?
= render "layouts/header"
= render "layouts/drawer" = render "layouts/drawer"
#main{:role => "main"} #main{:role => "main"}