Skip to content

Commit

Permalink
Merge pull request #478 from alphagov/move-breadcrumb-outside-main
Browse files Browse the repository at this point in the history
Move breadcrumb outside the main element
  • Loading branch information
gemmaleigh authored Jun 13, 2017
2 parents 0532ec9 + e8c625a commit 8e34ec7
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 32 deletions.
4 changes: 1 addition & 3 deletions app/views/guide_alpha_beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Alpha and beta banners — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Alpha and beta banners
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Buttons — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Buttons
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_colour.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Colour — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Colour
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Data — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Data
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Errors and validation — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Errors and validation
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Form elements — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Form elements
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_icons_images.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Icons and images — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Icons and images
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Layout — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Layout
Expand Down
4 changes: 1 addition & 3 deletions app/views/guide_typography.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

{% block page_title %}Typography — GOV.UK elements{% endblock %}

{% block content %}
{% block main_content %}

<main id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<h1 class="heading-xlarge">
<span class="heading-secondary">GOV.UK elements</span>
Typography
Expand Down
5 changes: 1 addition & 4 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
GOV.UK elements
{% endblock %}

{% block content %}

{% block main_content %}
<main class="elements-index" id="content" role="main" tabindex="-1">

{% include "includes/breadcrumb.html" %}

<div class="grid-row">
<div class="column-two-thirds">

Expand Down
7 changes: 7 additions & 0 deletions app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
{% include "includes/elements_tracking.html" %}
{% endblock %}

{% block content %}
<div class="site-wrapper">
{% include "includes/breadcrumb.html" %}
{% block main_content %}{% endblock %}
</div>
{% endblock %}

{% block cookie_message %}
<p>{{cookieText | safe }}</p>
{% endblock %}
Expand Down
14 changes: 13 additions & 1 deletion assets/sass/elements-documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@

// ==========================================================================
// Elements page styles
// These are example styles, used only for the elements pages
// ==========================================================================

// These are example styles, used only for the elements pages
// Add a class to wrap the <main> element
// This is so the breadcrumb can sit outside <main>
.site-wrapper {
@extend %site-width-container;

// Override margins set on #content
// This is a kludge to prevent a breaking change to govuk_elements_sass
// where @extend %site-width-container; is set for #content, so we need to override its margins
#content {
margin: 0;
}
}

.elements-index {
// Reduce top and bottom margins
Expand Down

0 comments on commit 8e34ec7

Please sign in to comment.