Skip to content
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

Remove sidebar #406

Closed
wants to merge 5 commits into from
Closed
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
58 changes: 2 additions & 56 deletions app/assets/stylesheets/navbars.css.scss
Original file line number Diff line number Diff line change
@@ -1,49 +1,10 @@
#sidebar-wrapper {
margin-left: -220px;
left: 220px;
width: 220px;
background: rgba(0, 0, 0, 0.8);
position: fixed;
height: 100%;
overflow-y: auto;
z-index: 1000;
transition: all 0.4s ease 0s;
}

.sidebar-nav {
padding-left:0px;
> a > li {
padding: 15px 0px;
padding-left: 20px;
color: grey;

-webkit-transition: color .5s ease-in-out;
-moz-transition: color .5s ease-in-out;
-o-transition: color .5s ease-in-out;
-transition: color .5s ease-in-out;
-webkit-transition: background .25s ease-in-out;
-moz-transition: background .25s ease-in-out;
-o-transition: background .25s ease-in-out;
-transition: background .25s ease-in-out;

&:hover {
background: rgba(0,0,0,.9);
color:#31c0be;
}
}
}

#page-dashboard {
width: 100%;
padding: 5px 15px;
}

.main-wrapper {
transition: all 0.4s ease 0s;
}

.main-wrapper-pad {
padding-left: 220px;
padding-top: 50px;
}

Expand All @@ -65,25 +26,10 @@
padding:5px 85px;
}

@media (max-width:767px) {
@media (max-width:910px) and (min-width:768px) {

.main-wrapper{
padding-left: 0;
}

#sidebar-wrapper {
left: 0;
}

.main-wrapper.active {
position: relative;
left: 250px;
}

.main-wrapper.active #sidebar-wrapper {
left: 250px;
width: 250px;
transition: all 0.4s ease 0s;
padding-top: 75px;
}

}
6 changes: 5 additions & 1 deletion app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<!--<ul class="nav navbar-nav">-->
<!-- <li><#%= link_to "Clients", root_path %></li>-->
<!-- <li><#%= link_to "Locations", housing_forms_path %></li>-->
Expand All @@ -25,6 +25,10 @@

<ul class="nav navbar-nav navbar-right">

<li><%= link_to "Home", root_path %></li>
<li><%= link_to "Locations", housing_forms_path %></li>
<li><%= link_to "Field Name Guide", dictionary_path %></li>

<% if current_user %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= current_user.email %><span class="caret"></span></a>
Expand Down
16 changes: 0 additions & 16 deletions app/views/layouts/_sidebar.html.erb

This file was deleted.

5 changes: 1 addition & 4 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
<%= render "layouts/navbar" %>
<% end %>

<!-- on user sign-in, main wrapper adds padding for sidebar -->
<!-- on user sign-in, main wrapper adds padding for navbar -->
<div class="main-wrapper <%= 'main-wrapper-pad' if current_user %>">
<% if current_user %>
<%= render "layouts/sidebar" %>
<% end %>

<div id="page-dashboard">
<% if flash[:alert] %>
Expand Down