Skip to content

Move language selector to footer #378

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 1 commit into from
Jun 13, 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
86 changes: 86 additions & 0 deletions app/assets/stylesheets/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.language-selector {
& {
display: inline-block;

@media(max-width: $screen-sm-min) {
display: block;
position: relative;
}
}

a.btn-default.dropdown-toggle {
& {
background-color: transparent;
border: 1px solid white;
}

&:hover {
background-color: transparent;
}
}

&.open > a.btn-default.dropdown-toggle {
& {
background-color: transparent;
color: white;
border-color: #ddd;
}

&:hover {
background-color: transparent;
color: white;
border-color: #ddd;
}
}
}

.footer {
padding: 8px 0;
line-height: 40px;
width: 100%;
background: rgba($palette-dark-turkey ,0.8);

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

a {
margin: 0 1rem;
color: white;
font-weight: 500;
font-size: 16px;

@media(max-width: $screen-sm-min) {
text-align: center;
font-size: 14px;
}
}
}

.footer-left-col {
text-align: left;

@media(max-width: $screen-sm-min) {
text-align: center;
}
}

.footer-center-col {
text-align: center;
}

.footer-right-col {
text-align: right;

@media(max-width: $screen-sm-min) {
text-align: center;
}
}

.landing-page, .login-page, .pages, .unlocks-page, .confirmations-page, .passwords-page {
.footer {
position: absolute;
bottom: 0;
left: 0;
}
}
205 changes: 13 additions & 192 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,15 @@
@import "bootstrap-sprockets";
@import "bootstrap-custom";
@import "to-categories-dropdown";
@import "footer";

html {
font-size:62.5%;
font-size: 62.5%;
}

.content
{
min-height:500px;
margin-bottom: 40px;
}

.language-selector{
margin: 1.2rem 3rem 1.2rem 1rem;
}

.language-selector a span {
display: block;
float: left;
.content {
min-height: 500px;
margin-bottom: 36px;
}

.actions-menu {
Expand All @@ -35,11 +26,6 @@ html {
}
}

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

.actions-menu > li > a {
color: #101010;
padding: 10px 16px;
Expand Down Expand Up @@ -219,36 +205,6 @@ html {
padding: 20px;
}

.footer {
bottom: 0;
left: 0;
line-height: 40px;
padding: 0;
position: absolute;
vertical-align: middle;
width: 100%;

p {
font-size: 1.6rem;
letter-spacing: 0.013rem;
margin: 0;
text-align: center;
}

.row {
margin: 0;
}

a {
color: $pages-anchor;
font-weight: 500;
margin-left: 1.5rem;
}

a:hover {
color: $pages-anchor-hover;
}
}

.row.exports {
padding: 10px;
Expand All @@ -273,7 +229,6 @@ table.users {
background-color: $bg-color;
font-family: 'Work Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: medium;
margin: 0 0 20px;
}

form {
Expand Down Expand Up @@ -422,7 +377,11 @@ form .checkbox input[type="checkbox"] {
z-index: -1;
}

.navbar-block{
.navbar .container-fluid {
padding: 0;
}

.navbar-block {
margin-top: 0.2rem;
}

Expand All @@ -448,79 +407,6 @@ form .checkbox input[type="checkbox"] {
letter-spacing: 0.019rem;
}

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

.dropdown{
&.dropdown-language-selector{
.dropdown-toggle{
background: none;
border: 0.2rem solid $white;
border-radius: 0.3rem;
color: $white;
font-size: 1.6rem;
font-weight: 500;
min-width: 13.5rem;
text-align: left;

.caret{
display: block;
float: right;
margin-top: 1.1rem;
}
&:focus,
&:active{
box-shadow: none;
outline: none;
}
}
&.open>.btn-default.dropdown-toggle{
background: none;
border-color: $white;
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
color: $white;

.caret{
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
}
.dropdown-menu{
background: $palette-turkey;
border: 0.2rem solid $white;
border-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
box-shadow: none;
margin-top: 0;
min-width: 13.5rem;
li{
a{
color: $white;
font-size: 1.6rem;
font-weight: 500;
padding: 0.6rem 1.2rem;
&:hover{
background: $palette-dark-turkey;
opacity: 0.8;
}
&:focus,
&:active{
background: none;
box-shadow: none;
outline: none;
}
}
}
}
}
}

.landing-page, .login-page, .pages, .unlocks-page, .confirmations-page, .passwords-page {
background: image-url('home_back.jpg') no-repeat center center fixed;
background-size: cover;
Expand All @@ -532,11 +418,11 @@ form .checkbox input[type="checkbox"] {
}

.vertical-align {
left: 50%;
position: absolute;
top: 52%;
top: 48%;
left: 50%;
transform: translate(-50%, -50%);
width: 82%;
width: 100%;
}

.container-inner {
Expand Down Expand Up @@ -795,79 +681,14 @@ form .checkbox input[type="checkbox"] {
}
}

.footer-left-col, .footer-left-col p {
text-align: left;
}

.footer-center, .footer-center-col p {
text-align: center;
}

.footer-right-col, .footer-right-col p {
text-align: right;
}

@media(max-width:767px){
html{
font-size:55.5%;
}

.footer-left-col, .footer-left-col p {
text-align: center;
}

.footer-center-col, .footer-center-col p {
text-align: center;
}

.footer-right-col, .footer-right-col p {
text-align: center;
}

.navbar-nav > li > a{
text-align: center;
}

.footer {
margin-top: 4rem;
position: static;
}

.landing-page, .login-page, .pages, .unlocks-page, .confirmations-page, .passwords-page {
.language-selector{
margin: 0 auto;
width: 13.5rem;
}

.footer {
bottom: 1rem;
margin-top: 0;
}

.footer a{
margin-left: 0rem;
}

.footer-right-col a{
margin: 0 1rem;
}
}

.landing-page, .unlocks-page, .confirmations-page, .passwords-page {
.footer {
position: absolute;
}
}

.login-page {
.vertical-align{
height: auto;
position: static;
top: 0;
transform: none;
width: 100%;
}
}
}

.errors {
Expand Down
17 changes: 17 additions & 0 deletions app/views/application/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="footer container-fluid">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 footer-left-col">
<a href="http://community.coopdevs.org/" target="_blank"><%= t('layouts.application.help') %></a>
<%= link_to t('application.terms_conditions'), tnc_path, data: { target: '#modal', toggle: 'modal' } %>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 footer-center-col">
<%= render 'application/menus/language_switcher' %>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 footer-right-col">
<a href="https://twitter.com/timeoverflow" target="_blank">Twitter</a>
<a href="https://github.com/coopdevs/timeoverflow" target="_blank">Github</a>
</div>
</div>
</div>
</div>
3 changes: 0 additions & 3 deletions app/views/application/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
<%= link_to t("layouts.application.about"), page_path("about") %>
</li>
<% end %>
<li class="divider" role="presentation"></li>

<%= render 'application/menus/language_switcher' %>
</ul>
</div>
</div>
Expand Down
Loading