Skip to content

Commit

Permalink
Merge pull request consuldemocracy#3778 from consul/fix_equalizer_inv…
Browse files Browse the repository at this point in the history
…estments

Fix blank space in admin content
  • Loading branch information
javierm committed Dec 19, 2019
2 parents ad93749 + 8be96f3 commit 06d7ef6
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 38 deletions.
14 changes: 4 additions & 10 deletions app/assets/stylesheets/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,11 @@ $sidebar-active: #f4fcd0;
margin-right: rem-calc(12);
}

.admin-content {
.side-menu-and-admin-content {
@include side-menu-and-content;
}

.admin-content {
.proposal-form {
padding-top: 0;
}
Expand All @@ -311,11 +314,6 @@ $sidebar-active: #f4fcd0;
display: none;
}

.admin-content {
overflow: scroll;
padding: $line-height !important;
}

@include breakpoint(medium) {

tr {
Expand Down Expand Up @@ -431,10 +429,6 @@ code {
background: linear-gradient(to bottom, #245b80 0%, #488fb5 100%);
border-right: 1px solid $border;

@include breakpoint(medium) {
min-height: rem-calc(1100);
}

ul {
list-style-type: none;
margin-bottom: 0;
Expand Down
8 changes: 4 additions & 4 deletions app/assets/stylesheets/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
// 01. Dashboard global
// --------------------

.dashboard-menu-and-content {
@include side-menu-and-content;
}

.proposal-title {
display: inline-block;

Expand Down Expand Up @@ -288,10 +292,6 @@
background: #fbfbfb;
border-right: 1px solid $border;

@include breakpoint(medium) {
min-height: $line-height * 45;
}

[class^="icon-"] {
color: $text;
display: inline-block;
Expand Down
31 changes: 27 additions & 4 deletions app/assets/stylesheets/mixins.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Table of Contents
//
// 01. Logo
// 02. Orbit bullets
// 03. Direct uploads
// 02. Side menu and content
// 03. Orbit bullets
// 04. Direct uploads
// ------------------

// 01. Logo
Expand All @@ -21,7 +22,29 @@
}
}

// 02. Orbit bullet
// 02. Side menu and content
// -------------------------

@mixin side-menu-and-content {
display: flex;

> :first-child {
flex: 25%;
min-width: 250px;

> :first-child {
height: 100%;
}
}

> :last-child {
flex: 75%;
overflow-x: auto;
padding: $line-height !important;
}
}

// 03. Orbit bullet
// ----------------

@mixin orbit-bullets {
Expand Down Expand Up @@ -49,7 +72,7 @@
}
}

// 03. Direct uploads
// 04. Direct uploads
// ------------------

@mixin direct-uploads {
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="admin-sidebar" data-equalizer-watch>
<div class="admin-sidebar">
<ul id="admin_menu" data-accordion-menu data-multi-open="false">
<% if feature?(:proposals) %>
<li class="section-title">
Expand Down
13 changes: 5 additions & 8 deletions app/views/layouts/admin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@
<div class="off-canvas-content" data-off-canvas-content>
<%= render "layouts/admin_header" %>

<div class="no-margin-top row expanded collapse" data-equalizer>
<div class="small-12 medium-3 column" data-equalizer-watch>
<div class="side-menu-and-admin-content no-margin-top">
<div id="side_menu" class="hide-for-small-only">
<%= side_menu %>
</div>

<div class="admin-content">
<div class="show-for-small-only">
<button type="button" class="button hollow expanded" data-toggle="offCanvas"><%= t("admin.menu.admin") %></button>
</div>

<div id="side_menu" class="hide-for-small-only">
<%= side_menu %>
</div>
</div>

<div class="admin-content small-12 medium-9 column" data-equalizer-watch>
<%= render "layouts/flash" %>
<%= render "layouts/officing_booth" if controller.class.parent == Officing && session[:booth_id].present? %>
<%= yield %>
Expand Down
18 changes: 8 additions & 10 deletions app/views/layouts/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
<div class="off-canvas position-left" id="offCanvas" data-off-canvas>
<div class="show-for-small-only">
<div class="dashboard-sidebar" data-equalizer-watch>
<div class="dashboard-sidebar">
<%= render "dashboard/menu" %>
</div>
</div>
Expand All @@ -38,22 +38,20 @@
<div class="off-canvas-content" data-off-canvas-content>
<%= render "layouts/header", with_subnavigation: false %>

<div class="no-margin-top row expanded collapse" data-equalizer>
<div class="small-12 medium-3 column" data-equalizer-watch>
<div class="dashboard-menu-and-content no-margin-top">
<div id="side_menu" class="hide-for-small-only">
<div class="dashboard-sidebar">
<%= render "dashboard/menu" %>
</div>
</div>

<div class="admin-content">
<div class="show-for-small-only">
<button type="button" class="button hollow expanded" data-toggle="offCanvas">
<%= t("admin.menu.admin") %>
</button>
</div>

<div id="side_menu" class="hide-for-small-only">
<div class="dashboard-sidebar" data-equalizer-watch>
<%= render "dashboard/menu" %>
</div>
</div>
</div>
<div class="admin-content small-12 medium-9 column" data-equalizer-watch>
<%= render "layouts/flash" %>
<%= render "layouts/dashboard/proposal_totals" %>
<%= render "layouts/dashboard/proposal_header" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/officing/_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="admin-sidebar" data-equalizer-watch>
<div class="admin-sidebar">
<ul id="officing_menu">
<% if vote_collection_shift? %>
<li class="<%= "js-vote-collection" %>
Expand Down

0 comments on commit 06d7ef6

Please sign in to comment.