-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from nhsuk/rationalise-layouts
Rationalise layouts
- Loading branch information
Showing
6 changed files
with
91 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,26 @@ | ||
{% extends "./base.njk" %} | ||
{% extends "./sidebar.njk" %} | ||
|
||
{%- from "./partials/side-navigation.njk" import appSideNavigation %} | ||
|
||
{% block content %} | ||
<div class="nhsuk-width-container"> | ||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-one-third"> | ||
{{ appSideNavigation({ | ||
currentPath: page.url | url, | ||
classes: 'app-side-navigation--desktop nhsuk-u-padding-top-6', | ||
sections: [ | ||
{ | ||
heading: { | ||
text: "Components" | ||
}, | ||
items: collections.component | ||
} | ||
] | ||
}) }} | ||
</div> | ||
<div class="nhsuk-grid-column-two-thirds"> | ||
<main id="main-content" class="nhsuk-main-wrapper" role="main"> | ||
<h1 class="nhsuk-heading-xl"> | ||
{% if not isIndex %}<span class="nhsuk-caption-xl">Components</span>{% endif %} | ||
{{ title }} | ||
</h1> | ||
{{ content | safe }} | ||
{% set sidebar %} | ||
{{ appSideNavigation({ | ||
classes: 'nhsuk-u-padding-top-6', | ||
currentPath: page.url | url, | ||
sections: [ | ||
{ | ||
heading: { | ||
text: "Components" | ||
}, | ||
items: collections.component | ||
} | ||
] | ||
}) }} | ||
{% endset %} | ||
|
||
{{ appSideNavigation({ | ||
classes: 'app-side-navigation--mobile', | ||
currentPath: page.url | url, | ||
sections: [ | ||
{ | ||
heading: { | ||
text: "Components" | ||
}, | ||
items: collections.component | ||
} | ||
] | ||
}) }} | ||
</main> | ||
</div> | ||
</div> | ||
</div> | ||
{% block main %} | ||
<h1 class="nhsuk-heading-xl"> | ||
{% if tags and "component" in tags %}<span class="nhsuk-caption-xl">Components</span>{% endif %} | ||
{{ title }} | ||
</h1> | ||
{{ content | safe }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{% extends "./base.njk" %} | ||
|
||
{% block content %} | ||
<h1>{{ title }}</h1> | ||
{% block body %} | ||
<main role="main"> | ||
{% block main %} | ||
<h1>{{ title }}</h1> | ||
|
||
{{ content | safe }} | ||
{{ content | safe }} | ||
{% endblock %} | ||
</main> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% extends "./base.njk" %} | ||
|
||
{% block container %} | ||
<div class="nhsuk-width-container"> | ||
<div class="nhsuk-grid-row"> | ||
<div class="nhsuk-grid-column-one-third"> | ||
{% block sidebar_desktop %} | ||
<div class="app-side-navigation--desktop"> | ||
{{ sidebar | safe }} | ||
</div> | ||
{% endblock %} | ||
</div> | ||
|
||
<div class="nhsuk-grid-column-two-thirds"> | ||
<main role="main" id="maincontent" class="nhsuk-main-wrapper"> | ||
{% block main %} | ||
{{ content | safe }} | ||
{% endblock main %} | ||
</main> | ||
|
||
{# Sidebar nav is at the bottom for mobile #} | ||
{% block sidebar_mobile %} | ||
<div class="app-side-navigation--mobile"> | ||
{{ sidebar | safe }} | ||
</div> | ||
{% endblock %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters