-
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.
- Loading branch information
1 parent
996ae71
commit cb3352b
Showing
12 changed files
with
301 additions
and
50 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,30 @@ | ||
{% extends "layouts/_layout.njk" %} | ||
{% set title = "CTA bar" %} | ||
{% from "card/card.njk" import card %} | ||
|
||
{% block body %} | ||
|
||
<div class="container"> | ||
|
||
<h1>Card</h1> | ||
|
||
{{ card({ heading: { text: "This is a card heading" }, href: "https://www.nice.org.uk/", metadata: [ { key: "Published date", value: "March 2015", datetime: "2015-03" }, { key: "Metadata key", value: "Metadata value" } ] }) }} | ||
|
||
<h2>Card with tag</h2> | ||
|
||
{{ card({ heading: { text: "This is another heading" }, href: "https://www.nice.org.uk/", tag: { modifier: "new", label: "New" }, metadata: [ { key: "Published date", value: "March 2015", datetime: "2015-03" }, { key: "Metadata key", value: "Metadata value" } ] }) }} | ||
|
||
<h2>List of cards</h1> | ||
|
||
<ul class="list list--unstyled"> | ||
<li> | ||
{{ card({ heading: { text: "This is a card heading" }, href: "https://www.nice.org.uk/", metadata: [ { key: "Published date", value: "March 2015", datetime: "2015-03" }, { key: "Metadata key", value: "Metadata value" } ] }) }} | ||
</li> | ||
<li> | ||
{{ card({ heading: { text: "This is a card heading" }, href: "https://www.nice.org.uk/", metadata: [ { key: "Published date", value: "March 2015", datetime: "2015-03" }, { key: "Metadata key", value: "Metadata value" } ] }) }} | ||
</li> | ||
</ul> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% extends "layouts/_layout.njk" %} | ||
{% set title = "CTA bar" %} | ||
{% from "cta-bar/cta-bar.njk" import ctaBar %} | ||
|
||
{% block body %} | ||
|
||
{{ ctaBar({ title: "This is a title", body: "This is some body copy", cta: { text: "Button text", href: "/button-href" } }) }} | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends "layouts/_layout.njk" %} | ||
{% set title = "Tag" %} | ||
|
||
{% block body %} | ||
|
||
<div class="container"> | ||
|
||
<h1>Tag</h1> | ||
|
||
<h2>Types of tag</h2> | ||
|
||
<ul> | ||
<li>Tag <span class="tag">Tag</span></li> | ||
<li>New <span class="tag tag--new">New</span></li> | ||
<li>Updated <span class="tag tag--updated">Updated</span></li> | ||
<li>Alpha <span class="tag tag--alpha">Alpha</span></li> | ||
<li>Beta <span class="tag tag--beta">Beta</span></li> | ||
<li>Live <span class="tag tag--live">Live</span></li> | ||
<li>Impact <span class="tag tag--impact">Impact</span></li> | ||
</ul> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//// | ||
/// @group components | ||
//// | ||
|
||
/// Card | ||
/// @since 0.3.1 | ||
.card { | ||
border-bottom: 1px solid $colour-border; | ||
padding: em($spacing-small 0); | ||
|
||
&__header { | ||
} | ||
|
||
&__heading { | ||
@include font-size(0); | ||
font-weight: bold; | ||
margin: 0; | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
&__icon { | ||
margin: em(0 $spacing-x-small 0 0); | ||
} | ||
|
||
&__tag { | ||
@include font-size(-1) | ||
margin-left: em($spacing-x-small); | ||
} | ||
|
||
&__metadata { | ||
@include font-size(-1); | ||
color: $colour-nice-dark-grey; | ||
margin: em($spacing-x-small 0 0); | ||
overflow: hidden; | ||
|
||
dt { | ||
clear: both; | ||
float: left; | ||
margin: em(0 $spacing-x-small 0 0); | ||
} | ||
dd { | ||
float: left; | ||
margin: em(0 $spacing-medium 0 0); | ||
} | ||
|
||
@include mq($from: md) { | ||
dt { | ||
clear: 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,33 @@ | ||
{% macro card(card) %} | ||
<article class="card"> | ||
<header class="card__header"> | ||
<h{{ (card.heading.level if card.heading.level else "4") }} class="card__heading"> | ||
<a href="{{ card.href }}"> | ||
{% if card.heading.icon %} | ||
<span class="card__icon icon icon--{{ card.heading.icon }}" aria-hidden="false"></span> | ||
{% endif %} | ||
|
||
{{ card.heading.text }} | ||
|
||
{% if card.tag %} | ||
<span class="card__tag tag tag--{{ card.tag.modifier }}">{{ card.tag.label }}</span> | ||
{% endif %} | ||
</a> | ||
</h{{ card.heading.level if card.heading.level else "4" }}> | ||
</header> | ||
{% if card.metadata %} | ||
<dl class="card__metadata"> | ||
{% for item in card.metadata %} | ||
<dt>{{ item.key }}:</dt> | ||
<dd> | ||
{% if item.datetime %} | ||
<time datetime="{{ item.datetime }}">{{ item.value }}</time> | ||
{% else %} | ||
{{ item.value }} | ||
{% endif %} | ||
</dd> | ||
{% endfor %} | ||
</dl> | ||
{% endif %} | ||
</article> | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//// | ||
/// @group components | ||
//// | ||
|
||
/// CTA bar | ||
/// @since 0.3.1 | ||
.cta-bar { | ||
@include links-inverse; | ||
background: $colour-nice-cool-teal; | ||
color: $colour-text-inverse; | ||
margin: em($spacing-large 0); | ||
padding: em($spacing-small 0); | ||
|
||
&__container { | ||
@extend %container; | ||
} | ||
|
||
&__inner { | ||
@include grid; | ||
} | ||
|
||
&__text { | ||
@include grid-item($middle: true); | ||
margin-bottom: em($spacing-medium); | ||
} | ||
|
||
&__title { | ||
@include font-size(3); | ||
margin: em(0 0 $spacing-x-small); | ||
} | ||
|
||
&__intro { | ||
margin: 0; | ||
} | ||
|
||
&__actions { | ||
@include grid-item($middle: true); | ||
} | ||
|
||
&__cta { | ||
|
||
} | ||
|
||
@include mq($from: md) { | ||
&__text { | ||
margin-bottom: 0; | ||
width: percentage(3/4); | ||
} | ||
|
||
&__actions { | ||
text-align: right; | ||
width: percentage(1/4); | ||
} | ||
} | ||
|
||
@media print { | ||
@include important(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,17 @@ | ||
{% macro ctaBar(ctaBar) %} | ||
|
||
<div class="cta-bar"> | ||
<div class="cta-bar__container"> | ||
<div class="cta-bar__inner"> | ||
<div class="cta-bar__text"> | ||
<h2 class="cta-bar__title">{{ ctaBar.title }}</h2> | ||
<p class="cta-bar__intro">{{ ctaBar.body }} test test test test test test</p> | ||
</div> | ||
<div class="cta-bar__actions"> | ||
<a href="{{ ctaBar.cta.href }}" class="btn btn--inverse">{{ ctaBar.cta.text }}</a> | ||
</div> | ||
</div> | ||
</div> | ||
</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
Oops, something went wrong.