-
Notifications
You must be signed in to change notification settings - Fork 9
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 #26 from nhsevidence/gw-32-updates
GW-32 Minor styling updates & bug fixes
- Loading branch information
Showing
18 changed files
with
159 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% extends "layouts/_layout.njk" %} | ||
{% set title = "Page header" %} | ||
{% from "page-header/page-header.njk" import pageHeader %} | ||
|
||
{% block body %} | ||
|
||
<div class="container"> | ||
|
||
<h1>Page header</h1> | ||
|
||
<h2>Default</h2> | ||
|
||
{{ pageHeader({ heading: "Breast cancer", lead: "Everything NICE has produced on the topic of breast cancer. Includes related guidelines, NICE Pathways, quality standards and advice." }) }} | ||
|
||
<h2>With CTA</h2> | ||
|
||
{{ pageHeader({ heading: "Breast cancer", lead: "Everything NICE has produced on the topic of breast cancer. Includes related guidelines, NICE Pathways, quality standards and advice.", cta: { text: "Register as a stakeholder", href: "/register" } }) }} | ||
|
||
</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
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
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
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,47 @@ | ||
//// | ||
/// @group components | ||
//// | ||
|
||
/// Page header component. | ||
/// Used at the top of a page to contain an h1 and optional | ||
/// lead intro paragraph and call-to-action. | ||
/// | ||
/// @example html | ||
/// <header class="page-header"> | ||
/// <h1 class="page-header__heading"> | ||
/// Breast cancer | ||
/// </h1> | ||
/// <p class="page-header__lead"> | ||
/// Everything NICE has produced on the topic of breast cancer. | ||
/// Includes related guidelines, NICE Pathways, quality standards and advice. | ||
/// </p> | ||
/// <p class="page-header__cta"> | ||
/// <a href="/some-action.html">Register as a stakeholder</a> | ||
/// </p> | ||
/// </header> | ||
/// @since 0.4.0 | ||
.page-header { | ||
margin: rem(0 0 $spacing-x-large 0); | ||
|
||
&__heading { | ||
@include font-size(h1); | ||
margin: rem(0 0 $spacing-small 0); | ||
} | ||
|
||
&__lead { | ||
@include font-size(lead); | ||
margin: rem(0 0 $spacing-small 0); | ||
} | ||
|
||
&__cta { | ||
@include font-size(p); | ||
display: block; | ||
margin: 0; | ||
} | ||
|
||
@media print { | ||
&__cta { | ||
display: none; | ||
} | ||
} | ||
} |
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,15 @@ | ||
{% macro pageHeader(pageHeader) %} | ||
<div class="page-header"> | ||
<h1 class="page-header__heading"> | ||
{{ pageHeader.heading }} | ||
</h1> | ||
<p class="page-header__lead"> | ||
{{ pageHeader.lead }} | ||
</p> | ||
{% if pageHeader.cta %} | ||
<p class="page-header__cta"> | ||
<a href="{{ pageHeader.cta.href }}">{{ pageHeader.cta.text }}</a> | ||
</p> | ||
{% endif %} | ||
</div> | ||
{% endmacro %} |
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
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
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
Oops, something went wrong.