Commit 67922f8a authored by Steffen van Bergerem's avatar Steffen van Bergerem

Merge pull request #6483 from Flaburgan/add-not-connected-header-to-mobile

Add header on not connected pages on mobile version
parents baeff224 3a1235e2
......@@ -78,6 +78,7 @@ Contributions are very welcome, the hard work is done!
* Correctly display location in post preview [#6429](https://github.com/diaspora/diaspora/pull/6429)
* Do not fail when submitting an empty comment in the mobile view [#6543](https://github.com/diaspora/diaspora/pull/6543)
* Limit flash message width on small devices [#6529](https://github.com/diaspora/diaspora/pull/6529)
* Add navbar on mobile when not logged in [#6483](https://github.com/diaspora/diaspora/pull/6483)
## Features
* Support color themes [#6033](https://github.com/diaspora/diaspora/pull/6033)
......
......@@ -10,6 +10,12 @@ $mobile-navbar-height: 46px;
min-height: $mobile-navbar-height !important;
max-height: $mobile-navbar-height !important;
.login {
color: $white;
font-weight: bold;
padding: 13px;
}
.navbar {
margin: 0;
padding: 0;
......@@ -17,6 +23,16 @@ $mobile-navbar-height: 46px;
min-height: $mobile-navbar-height;
}
.navbar-right {
float: right;
}
.navbar-nav {
margin-bottom: 0;
margin-top: 0;
li { float: left; }
}
#header-title {
padding: 7px 15px;
margin: 0 0 0 -15px;
......
......@@ -652,24 +652,11 @@ input#user_password, #user_username, #user_password_confirmation, #user_email {
padding: 1px
}
.session_mobile {
margin-top: -55px;
}
h1.session {
font-size: 40px;
font-weight: 200;
}
.landing {
padding: 20px;
margin: -10px -20px 10px -20px;
background-color:#4b4b4b;
z-index: 10;
position: relative;
text-align: center;
}
form p.checkbox_select {
position: relative;
label {
......
......@@ -19,7 +19,4 @@
= link_to AppConfig.settings.pod_name, root_path, class: "navbar-brand"
.collapse.navbar-collapse#navbar-collapse
%ul.nav.navbar-nav.navbar-right
- 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'
= render "layouts/header_not_connected"
......@@ -4,32 +4,36 @@
= link_to(image_tag("mobile/asterisk_white_mobile.png", class: "img-responsive"),
stream_path, id: "header-title", class: "navbar-brand")
%ul.nav.navbar-nav#nav-badges
-# Notifications
%li
= link_to notifications_path, class: "badge-link", id: "notification-badge" do
%i.entypo-bell
- if current_user.unread_notifications.size > 0
%span.badge.badge-important#notification
= current_user.unread_notifications.size
- if user_signed_in?
%ul.nav.navbar-nav#nav-badges
-# Notifications
%li
= link_to notifications_path, class: "badge-link", id: "notification-badge" do
%i.entypo-bell
- if current_user.unread_notifications.size > 0
%span.badge.badge-important#notification
= current_user.unread_notifications.size
-# Conversations
%li
= link_to conversations_path, class: "badge-link", id: "conversations-badge" do
%i.entypo-mail
- if current_user.unread_message_count > 0
%span.badge.badge-important#conversation
= current_user.unread_message_count
-# Conversations
%li
= link_to conversations_path, class: "badge-link", id: "conversations-badge" do
%i.entypo-mail
- if current_user.unread_message_count > 0
%span.badge.badge-important#conversation
= current_user.unread_message_count
-# Publisher
%li
= link_to new_status_message_path, class: "badge-link", id: "compose-badge" do
%i.diaspora-custom-compose
-# Publisher
%li
= link_to new_status_message_path, class: "badge-link", id: "compose-badge" do
%i.diaspora-custom-compose
-# Menu
%li
%button.navbar-toggle#menu-badge{type: "button"}
%span.sr-only
%span.icon-bar
%span.icon-bar
%span.icon-bar
-# Menu
%li
%button.navbar-toggle#menu-badge{type: "button"}
%span.sr-only
%span.icon-bar
%span.icon-bar
%span.icon-bar
- else
= render "layouts/header_not_connected"
%ul.nav.navbar-nav.navbar-right
- 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"
......@@ -51,8 +51,8 @@
= include_gon(:camel_case => true)
%body
#app
= render "layouts/header"
- if user_signed_in?
= render "layouts/header"
= render "layouts/drawer"
#main{:role => "main"}
......
......@@ -2,42 +2,37 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.session_mobile
.landing
%h1.session
= pod_name
#main_stream.stream
- flash.each do |name, msg|
.expose#flash-container
.flash-message{class: "message alert alert-#{flash_class name}"}
= msg
#login_form
.login-container
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
%fieldset
%legend
= image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
= t("devise.sessions.new.login")
.form-group
= f.label :username, t("username")
= f.text_field :username, autofocus: true, class: "form-control", autocapitalize: "none", autocorrect: "off"
.form-group
= f.label :password , t("password")
= f.password_field :password, class: "form-control"
= hidden_field(:user, :remember_me, value: 1)
.form-group
= f.submit t("devise.sessions.new.sign_in"), class: "btn btn-primary"
- if display_registration_link?
= link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name),
class: "btn btn-default pull-right"
%footer
- if display_password_reset_link?
= link_to t("devise.passwords.new.forgot_password"), new_password_path(resource_name)
= link_to t("layouts.application.toggle"), toggle_mobile_path
.stream#main_stream
- flash.each do |name, msg|
.expose#flash-container
.flash-message{class: "message alert alert-#{flash_class name}"}
= msg
#login_form
.login-container
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
%fieldset
%legend
= image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
= t("devise.sessions.new.login")
.form-group
= f.label :username, t("username")
= f.text_field :username, autofocus: true, class: "form-control", autocapitalize: "none", autocorrect: "off"
.form-group
= f.label :password, t("password")
= f.password_field :password, class: "form-control"
= hidden_field(:user, :remember_me, value: 1)
.form-group
= f.submit t("devise.sessions.new.sign_in"), class: "btn btn-primary"
- if display_registration_link?
= link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name),
class: "btn btn-default pull-right"
%footer
- if display_password_reset_link?
= link_to t("devise.passwords.new.forgot_password"), new_password_path(resource_name)
= link_to t("layouts.application.toggle"), toggle_mobile_path
......@@ -3,7 +3,7 @@ Feature: editing the getting started in the mobile view
Background:
Given I am on the login page
When I follow "Sign up"
When I follow "Sign up" within ".navbar"
And I fill in the new user form
And I submit the form
Then I should be on the getting started page
......
......@@ -6,7 +6,7 @@ Feature: New user registration
Background:
Given I am on the login page
And I follow "Sign up"
And I follow "Sign up" within "#login_form"
Scenario: user signs up and goes to getting started
When I fill in the new user form
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment