Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #496 from eregs/500-sidebar-rework
Browse files Browse the repository at this point in the history
Rework sidebar styles
  • Loading branch information
cmc333333 authored Aug 10, 2017
2 parents bdf8cd1 + 337c13f commit e8e056d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 27 deletions.
41 changes: 17 additions & 24 deletions regulations/static/regulations/css/scss/partials/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ Sidebar
@include reset;
}

// Headers within the sidebar should be <h4>
h4 {
padding: 0 10px;
font-size: 1em * $sans_font_scale_factor;
line-height: 40px;
margin: 0;
text-transform: uppercase;
letter-spacing: 1px;
color: $gray_darkest;
@include sans-font-bold;

&.important {
color: $red;
}

h5 {
margin: 0;
}
}

/*
Sidebar Expandables
-------------------
Expand All @@ -65,7 +45,7 @@ Sidebar Expandables
width: 100%;

&.has-content {
background-color: $orange_lightest;
background-color: $blue_lightest;
}

h4 {
Expand All @@ -83,13 +63,13 @@ Sidebar Expandables
header {
&.expandable a:before {
@extend .cf-icon;
content: '\e109';
content: '\e003';
color: $blue_light;
}

&.open a:before {
@extend .cf-icon;
content: '\e111';
content: '\e007';
color: $blue_light;
}
}
Expand Down Expand Up @@ -154,12 +134,25 @@ Regs Meta contains the sub-content meta data found in the sidebar

.regs-meta {

// Headers within the sidebar should be <h4>
h4 {
@include sans-font-bold;
padding: 0 10px;
font-size: 1em * $sans_font_scale_factor;
line-height: 40px;
margin: 0;
letter-spacing: 1px;
color: $gray_darkest;
@include sans-font-regular;

&.important {
color: $red;
}

}

h5 {
font-size: 16px * $sans_font_scale_factor;
margin: 0;
}

/* We either use a subtitle + "What's this?" or an inline explanation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const SidebarView = Backbone.View.extend({
});
/* Also remove any components of the sidebar which don't have a Backbone
* view */
this.$el.find('.regs-meta').remove();
this.$el.find('.regs-meta:not(#definition)').remove();
},

loading: function loading() {
Expand Down
2 changes: 1 addition & 1 deletion regulations/templates/regulations/chrome.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3>Search in regulation effective:</h3>
{% block chrome-sidebar %}
<div id="sidebar" class="secondary-content" role="complementary">
<div id="sidebar-content" class="sidebar-inner">
<section id="definition"></section>
<section id="definition" class="regs-meta"></section>
{% block reg_sidebar %}
{{ sidebar_content|safe }}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion regulations/templates/regulations/generic_landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div id="sidebar" class="secondary-content">
<div id="sidebar-content" class="sidebar-inner">
<section id="definition"></section>
<section id="definition" class="regs-meta"></section>
<section class="landing-sidebar">

{% block reg_sidebar %}
Expand Down

0 comments on commit e8e056d

Please sign in to comment.