Skip to content

Improved main views on mobile devices #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app/assets/images/home_back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/assets/images/home_back_overlay.jpg
Binary file not shown.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/_bootstrap-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ $navbar-inverse-link-color: $white;
$navbar-inverse-link-active-color: $palette-light-blue;
$navbar-inverse-link-active-bg: $palette-turkey;
$navbar-inverse-link-hover-color: $palette-light-blue;
$navbar-inverse-toggle-border-color: $white;
$navbar-inverse-toggle-hover-bg: $palette-dark-turkey;

$navbar-inverse-bg: $palette-turkey;
5 changes: 5 additions & 0 deletions app/assets/stylesheets/_to-categories-dropdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.to-categories-dropdown {
@media(max-width: $screen-sm-min) {
display: none;
}
}
4 changes: 3 additions & 1 deletion app/assets/stylesheets/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
$palette-turkey: #2797af;
$palette-dark-turkey: #165e6d;
$palette-light-blue: #d9edf7;
$palette-grey: #aaa;
$palette-black: #333;

// Old colors
$bg-color: #f5f8fa;
Expand All @@ -14,7 +16,7 @@ $form-input-bg-color: #f5f5f5;
$form-input-button: #2a292a;
$form-input-button-hover: #3a393a;
$form-a-color: gray;
$form-a-hover-color: #333;
$form-a-hover-color: $palette-black;
$form-login-gray-text: #9b9b9b;
$btn-landing: rgba(255, 255, 255, 0.7);
$btn-landing-hover: rgba(255, 255, 255, 0.9);
Expand Down
86 changes: 43 additions & 43 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import "variables";
@import "bootstrap-sprockets";
@import "bootstrap-custom";
@import "to-categories-dropdown";

html {
font-size:62.5%;
Expand All @@ -25,17 +26,35 @@ html {
float: left;
}

.actions-menu {
margin-bottom: 16px;
padding: 0 15px;

@media(max-width: $screen-sm-min) {
padding: 0;
}
}

.actions-menu > .dropdown > .language b {
display: inline-block;
margin-left: 0.7rem;
}

.actions-menu > li > a {
color: #101010;
padding: 10px 16px;

@media(max-width: $screen-sm-min) {
padding: 10px;
}
}

.actions-menu > li{
margin-right:5px;
.actions-menu > li {
margin-right: 6px;

@media(max-width: $screen-sm-min) {
margin-right: 2px;
}
}

#login-box {
Expand Down Expand Up @@ -66,14 +85,6 @@ html {
transition: background-color 100000s ease-in-out 0s;
}

span.input-group-addon {
padding: 2rem 2rem 2rem 3rem;

@media (max-width: $screen-xs-min) {
display: none;
}
}

span.show-password {
border-radius: 0 0.3rem 0.3rem 0;
cursor: pointer;
Expand All @@ -100,10 +111,6 @@ html {
text-align: center;
}

.panel-body {
padding: 0 3rem 0 3rem;
}

.panel-footer {
padding: 2rem 3rem;

Expand Down Expand Up @@ -136,7 +143,6 @@ html {
color: $form-input-glyph;
font-size: 2.24rem;
letter-spacing: -0.0040rem;
padding: 2rem;
}

.form-control {
Expand Down Expand Up @@ -174,7 +180,7 @@ html {
background-color: $white;
border: 1px solid $border;
border-radius: 5px;
margin: 10px;
margin: 14px 0;
padding: 5px 20px;

h4 {
Expand All @@ -192,6 +198,12 @@ html {
margin-right: 10px;
}

&__datetime {
color: $palette-grey;
padding: 4px 0 0;
font-size: 10px;
text-align: right;
}
}

.break-word {
Expand Down Expand Up @@ -385,8 +397,13 @@ label[required]::after{
}

.navbar-form {
padding: 0;
border: 0;
background-color: transparent;
padding: 0;

@media(max-width: $screen-sm-min) {
padding: 10px 15px;
}
}

form .checkbox input[type="checkbox"] {
Expand Down Expand Up @@ -418,7 +435,7 @@ form .checkbox input[type="checkbox"] {
}

.navbar-static-top {
background-color: $palette-turkey;
background-color: rgba($palette-turkey, 0.9);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sauloperez I didn't know this was possible :D

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also flipé when I started doing CSS recently 😆

}

.navbar-inverse {
Expand All @@ -432,7 +449,7 @@ form .checkbox input[type="checkbox"] {
}

.language-selector{
margin: 0.5rem 2rem 0 2rem;
margin: 0.6rem 2rem 0 2rem;
width: 13.5rem;
}

Expand Down Expand Up @@ -511,18 +528,15 @@ form .checkbox input[type="checkbox"] {
.back-overlay {
display: block;
filter: alpha(opacity = 60); /* For IE8 and earlier */
opacity: 0.6;
opacity: 0.2;
}

.vertical-align {
left: 50%;
position: absolute;
top: 47%;
top: 52%;
transform: translate(-50%, -50%);
width: 75%;
}
.container-fluid {
padding-bottom: 0.8rem;
padding-top: 0.8rem;
width: 82%;
}

.container-inner {
Expand Down Expand Up @@ -559,6 +573,7 @@ form .checkbox input[type="checkbox"] {
font-weight: 700;
letter-spacing: -0.073rem;
margin: 0;
text-shadow: 1px 1px $palette-black;
}

h3 {
Expand All @@ -567,6 +582,7 @@ form .checkbox input[type="checkbox"] {
font-weight: 500;
letter-spacing: -0.107rem;
margin-top: 1rem;
text-shadow: 1px 1px $palette-black;
}

.btn {
Expand All @@ -589,18 +605,6 @@ form .checkbox input[type="checkbox"] {
}

.login-page {
h1 {
font-size: 3.84rem;
font-weight: 600;
letter-spacing: 0.031rem;
margin-bottom: 2rem;
margin-top: 3rem;

@media (max-width: $screen-xs-min) {
display: none;
}
}

.material-icons {
font-size: 3rem;
}
Expand Down Expand Up @@ -646,10 +650,6 @@ form .checkbox input[type="checkbox"] {
padding: 0;
}

#login-box .panel-body {
padding: 3rem 3rem 2rem 3rem;
}

.panel-body h2 {
font-size: 1.9rem;
font-weight: 500;
Expand Down Expand Up @@ -750,7 +750,7 @@ form .checkbox input[type="checkbox"] {
}

.banner {
background: image-url('home_back_overlay.jpg') no-repeat center center;
background: image-url('home_back.jpg') no-repeat center center;
background-size: cover;
margin: 8rem 0 3rem 0;
padding: 8rem 1rem;
Expand Down
30 changes: 14 additions & 16 deletions app/views/application/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,20 @@

<% if current_user && current_organization %>
<nav role="navigation">
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<ul class="nav nav-pills actions-menu">
<%= render 'application/menus/user_list_link' %>
<%= render 'application/menus/offers_dashboard_link' %>
<%= render 'application/menus/inquiries_list_link' %>
<% if current_user.manages? current_organization %>
<%= render 'application/menus/offers_by_tag_link' %>
<%= render 'application/menus/organization_reports_menu' %>
<%= render 'application/menus/organization_statistics_menu' %>
<%= render 'application/menus/organization_listings_menu' %>
<% end %>
</ul>
</div>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<ul class="nav nav-pills actions-menu">
<%= render 'application/menus/user_list_link' %>
<%= render 'application/menus/offers_dashboard_link' %>
<%= render 'application/menus/inquiries_list_link' %>
<% if current_user.manages? current_organization %>
<%= render 'application/menus/offers_by_tag_link' %>
<%= render 'application/menus/organization_reports_menu' %>
<%= render 'application/menus/organization_statistics_menu' %>
<%= render 'application/menus/organization_listings_menu' %>
<% end %>
</ul>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/application/menus/_user_list_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<li class="<%= "active" if current_page?(users_path) %>">
<%= link_to users_path do %>
<%= glyph :user %>
<%= User.model_name.human(count: :many) %>
<%= t("users.index.members") %>
<% end %>
</li>
5 changes: 0 additions & 5 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<div class="vertical-align">
<div class="col-xs-12 col-sm-8 col-md-6 col-lg-6 col-sm-offset-2 col-md-offset-3 col-lg-offset-3">
<div class="panel" id="login-box">
<div class="panel-heading">
<h1>
TimeOverflow
</h1>
</div>
<div class="panel-body">
<%= render 'layouts/messages' %>
<%= show_error_messages!(resource) %>
Expand Down
Loading