Skip to content

Commit

Permalink
add new pages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunter08 committed Sep 13, 2024
1 parent 7d05b1c commit f62bd2f
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 96 deletions.
20 changes: 10 additions & 10 deletions docs/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- from 'header/macro.njk' import header -%}
{%- from 'footer/macro.njk' import footer -%}
{% from 'header/macro.njk' import header %}
{% from 'footer/macro.njk' import footer %}
{% from 'breadcrumb/macro.njk' import breadcrumb %}
{%- from 'skip-link/macro.njk' import skipLink -%}
{% from 'skip-link/macro.njk' import skipLink %}

<!DOCTYPE html>
<html lang="en">
Expand All @@ -28,14 +28,14 @@

{% block header %}
{{ header({
"service": {
"name": "App design resources"
service: {
name: "App design system"
},
"showNav": "false",
"showSearch": "false",
"homeHref": baseUrl,
"classes": "app-header",
"ariaLabel": "NHS App design resources homepage"
showNav: "false",
showSearch: "false",
homeHref: baseUrl,
classes: "app-header",
ariaLabel: "NHS App design system homepage"
}) }}
{% endblock %}

Expand Down
37 changes: 37 additions & 0 deletions docs/_includes/layouts/community.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% extends "./sidebar.njk" %}

{%- from "./partials/side-navigation.njk" import appSideNavigation %}

{% block breadcrumb %}
{% if title === "Community" %}
{{ breadcrumb({
href: "/",
text: "Home"
}) }}
{% else %}
{{ breadcrumb({
items: [
{
href: "/",
text: "Home"
}
],
href: "/community",
text: "Community"
}) }}
{% endif %}
{% endblock %}

{% set sidebar %}
{{ appSideNavigation({
currentPath: page.url,
items: collections.community | sort(attribute="data.title")
}) }}
{% endset %}

{% block main %}
<h1 class="nhsuk-heading-xl nhsuk-u-margin-bottom-7">
{{ title }}
</h1>
{{ content | safe }}
{% endblock %}
10 changes: 3 additions & 7 deletions docs/_includes/layouts/component.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- from "./partials/side-navigation.njk" import appSideNavigation %}

{% block breadcrumb %}
{% if title === "NHS App design components" %}
{% if title === "Components" %}
{{ breadcrumb({
href: "/",
text: "Home"
Expand All @@ -27,11 +27,6 @@
currentPath: page.url,
items: collections.component | sort(attribute="data.title")
}) }}
{{ appSideNavigation({
currentPath: page.url,
items: collections.componentGuidance | sort(attribute="data.title"),
classes: 'app-side-navigation--section'
}) }}
{% endset %}

{% block main %}
Expand All @@ -41,7 +36,8 @@
<p class="nhsuk-body-l nhsuk-u-margin-bottom-7">{{ description }}</p>
{{ content | safe }}
{% if tags and "component" in tags %}
{% include "./partials/feedback-section.njk" %}
{% include "layouts/partials/feedback-section.njk" %}
{% else %}
{% endif %}

{% endblock %}
37 changes: 37 additions & 0 deletions docs/_includes/layouts/get-started.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% extends "./sidebar.njk" %}

{%- from "./partials/side-navigation.njk" import appSideNavigation %}

{% block breadcrumb %}
{% if title === "Get started" %}
{{ breadcrumb({
href: "/",
text: "Home"
}) }}
{% else %}
{{ breadcrumb({
items: [
{
href: "/",
text: "Home"
}
],
href: "/get-started",
text: "Get started"
}) }}
{% endif %}
{% endblock %}

{% set sidebar %}
{{ appSideNavigation({
currentPath: page.url,
items: collections.getStarted | sort(attribute="data.title")
}) }}
{% endset %}

{% block main %}
<h1 class="nhsuk-heading-xl nhsuk-u-margin-bottom-7">
{{ title }}
</h1>
{{ content | safe }}
{% endblock %}
6 changes: 6 additions & 0 deletions docs/_includes/layouts/partials/get-help.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="app-callout">
<div class="app-callout__content">
<h2 class="nhsuk-heading-m">Get help</h2>
<p>The NHS App Design System Team provides support for users of the NHS App Design System. <a href="/help-and-feedback/">Contact us</a> to ask for help.</p>
</div>
</div>
4 changes: 4 additions & 0 deletions docs/_includes/layouts/sidebar.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
{{ sidebar | safe }}
</div>
{% endblock %}

<hr class="nhsuk-u-margin-top-0">
{% include "layouts/partials/get-help.njk" %}
<div class="nhsuk-u-padding-top-6"></div>
</div>
</div>
</div>
Expand Down
30 changes: 30 additions & 0 deletions docs/assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@import "docs/assets/css/components/header";
@import "docs/assets/css/components/hero";
@import "docs/assets/css/components/side-navigation";
@import "docs/assets/css/components/callout";
@import "docs/assets/css/tabs";
@import "docs/assets/css/content";
@import "docs/assets/css/example";
Expand Down Expand Up @@ -48,3 +49,32 @@ pre {
word-break: break-word;
}
}

// Frontend button colour overrides
.nhsuk-button--reverse {
color: $color_nhsuk-black;

&:visited {
color: $color_nhsuk-black;
}
}

// Home page section
.app-section {
:last-child {
margin-bottom: 0;
}

&--white {
background-color: white;
}

&--with-bottom-border {
border-bottom: 2px solid $color_nhsuk-grey-4;
}
}

.app-section-break {
border-width: 2px;
border-color: $color_nhsuk-grey-4;
}
15 changes: 15 additions & 0 deletions docs/assets/css/components/_callout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Custom component for the NHS App deign system documentation
.app-callout {
@include nhsuk-responsive-margin(5,"bottom");
@include nhsuk-responsive-padding(4);

border: nhsuk-spacing(1) solid $color_nhsuk-blue;

&__content {
@include reading-width();

:last-child {
margin-bottom: 0;
}
}
}
23 changes: 23 additions & 0 deletions docs/assets/css/components/_header.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Header overrides
// Fixes service name placement and style
.app-header {
.nhsuk-header__logo {
max-width: 100%;
}

.nhsuk-header__link--service {
align-items: center;
color: $color_nhsuk-white;
Expand Down Expand Up @@ -36,3 +40,22 @@
}
}
}

// Bump the border-bottom size up from 4px to 6px
// - this gives the 'current' item more visual weight
.nhsuk-header__navigation-link,
.nhsuk-header__navigation-link:active,
.nhsuk-header__navigation-link:focus {
border-bottom-width: 6px;
}

// A style to highlight the current section the user is in
.app-header__navigation-link--current {
text-decoration: none;
border-bottom-color: $nhsuk-border-color;
}

// Hide home nav link
.nhsuk-header__navigation-item--home {
display: none;
}
6 changes: 6 additions & 0 deletions docs/community/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: layouts/community.njk
title: Community
---

The NHS App Design System supports the design, build, and delivery of accessible and consistent services. It does this by helping people, teams, professions, and communities across the NHS App to learn from the experiences of each other, contribute and share knowledge, and reuse as much as possible.
14 changes: 5 additions & 9 deletions docs/components/index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
---
layout: layouts/component.njk
isIndex: true
title: NHS App design components
title: Components
description: These are components designed specifically for the needs of NHS App users. They are not yet in the NHS design system.
---

## Finding the component you need

Check the [NHS design system](https://service-manual.nhs.uk/design-system) to see if the component you need is already being used across the NHS.

If you can't find what you need in the NHS design system or the NHS App design components, you can:
If you can't find what you need in the NHS design system or the NHS App design system, you can:

- [check the NHS design system backlog](https://github.com/nhsuk/nhsuk-service-manual-community-backlog/projects/1) to see if it is being worked on by other teams across the NHS and add your findings
- [check NHS App component backlog](https://github.com/orgs/nhsuk/projects/8) to see if it is being worked on by the NHS App and add your findings
- [check the NHS community backlog](https://github.com/nhsuk/nhsuk-service-manual-community-backlog/projects/1)
- [check NHS App design system backlog](https://github.com/orgs/nhsuk/projects/8)

## Using code snippets in prototypes

Each component includes coded examples. You will need to install [NHS App frontend](/components/install-nhsapp-frontend-in-your-prototype) to use components with specific NHS App code not yet supported by the NHS Prototype Kit.
Each component includes coded examples. You will need to install [NHS App frontend](/get-started/prototyping) to use components with specific NHS App code not yet supported by the NHS Prototype Kit.

Find out how to [set up the prototype kit](https://nhsuk-prototype-kit.azurewebsites.net/docs).

## Get help

The NHS App Design System Team provides support for users of the NHS App design resources. [Contact us](/help-and-feedback/) to ask for help.
27 changes: 27 additions & 0 deletions docs/get-started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: layouts/get-started.njk
title: Get started
---

To make your service consistent with the NHS, you should start by checking what exists in the [NHS Design System](https://service-manual.nhs.uk/design-system).

If something is not in the NHS Design System, you should check what exists in the:

- NHS App design system
- [gov department pattern libraries](https://github.com/ctdesign/gov-design-systems-list)
- [NHS community backlog](https://github.com/nhsuk/nhsuk-service-manual-community-backlog)

Reuse as much as possible and iterate based on user needs.

## Using the design system

The NHS App design system brings together [components and patterns](/components/) created by designers and developers on the NHS App.

To use these components and patterns you can either:

- copy the HTML code
- copy the Nunjucks code (if you are using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [NHS prototype kit](https://nhsuk-prototype-kit.azurewebsites.net/docs))

## Contributing to the design system

You can contribute your research findings, designs or code to the NHS App design system by commenting on [existing issues](https://github.com/orgs/nhsuk/projects/8) or starting a [new issue](https://github.com/nhsuk/nhsapp-frontend/issues/new/choose) on GitHub.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
layout: layouts/component.njk
title: Install NHS App frontend in your prototype
layout: layouts/get-started.njk
title: Prototyping
tags:
- componentGuidance
- getStarted
---

While most NHS App components are created to automatically work with the NHS prototype kit, some patterns have been created with specific NHS App styles.

This guide explains how to install NHS App frontend to support these styles. You will only have to follow these steps once for your prototype. You must use version 4.0.0 or later of the NHS prototype kit for these to work.

## Step 1
Expand Down
Loading

0 comments on commit f62bd2f

Please sign in to comment.