Skip to content

Commit

Permalink
Style side navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ju committed Jan 4, 2018
1 parent cee85d4 commit 16600ce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/stylesheets/components/_mobile-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
margin: 0;
padding: $govuk-spacing-scale-4 $govuk-spacing-scale-4 $govuk-spacing-scale-1 $govuk-spacing-scale-4;
color: $govuk-grey-1;
@include govuk-font-regular-19;
@include govuk-font-bold-19;
text-transform: uppercase;
}

Expand Down
11 changes: 9 additions & 2 deletions src/stylesheets/components/_subnav.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@include exports("subnav") {

.app-c-subnav {
padding: 0 $govuk-spacing-scale-3;
padding: $govuk-spacing-scale-3;
@include govuk-font-regular-16;
}

.app-c-subnav__section {
margin: $govuk-spacing-scale-3 0;
margin: 0 0 $govuk-spacing-scale-4;
padding: 0;
list-style-type: none;

Expand Down Expand Up @@ -36,4 +36,11 @@
}
}

.app-c-subnav__theme {
margin: 0;
padding: $govuk-spacing-scale-2 $govuk-spacing-scale-3;
color: $govuk-grey-1;
@include govuk-font-bold-16;
text-transform: uppercase;
}
}
7 changes: 3 additions & 4 deletions views/partials/_subnav.njk
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<nav class="app-c-subnav">
<ul class="app-c-subnav__section">

{% for item in navigation %}
{% if item.url in path %}
{% if item.items %}
{% for theme, items in item.items | groupby("theme") %}
{% if theme != 'undefined' %}
<h4 class="govuk-caption-m">{{ theme }}</h4>
<h4 class="app-c-subnav__theme">{{ theme }}</h4>
{% endif %}
<ul class="app-c-subnav__section">
{% for subitem in items %}
<li class="app-c-subnav__section-item{% if subitem.url == path %} app-c-subnav__section-item--current{% endif %}">
<a href="/{{ subitem.url }}">{{ subitem.label }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
</ul>
</nav>

0 comments on commit 16600ce

Please sign in to comment.