Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Update usage docs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashdoughty committed Mar 6, 2020
1 parent 6f8c9fc commit 569fca9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
![Master](https://github.com/tomdoughty/banner/workflows/Push%20to%20master/badge.svg?event=push)

In house solution for managing the emergency banner and feedback banners on [nhs.uk](https://www.nhs.uk).
Please note the nhsuk frontend team will be working towards better practices for consuming this code.
In the future it should be consumed via NPM. Draft documentation on the NPM solution is in [WIP-README.md](WIP-README.md).

## Standard usage
Please note the nhsuk frontend team will be working towards better practices for consuming this code. In the future it should be consumed via NPM. Draft documentation on the NPM solution is in [WIP-README.md](WIP-README.md).

## Usage

### Compiled files
Add the compiled CSS and JS files to your application.
```
dist/banner.css
dist/banner.js
```

### SCSS Imports
If you already include nhsuk-frontend core then you only need to add the following files:
If you already include nhsuk-frontend core SCSS then you only need to add the following files to add the styles to your CSS.
```
/src/scss/emergency-alert
/src/scss/feedback-banner
```
This will prevent you from including duplicate CSS in your application.

### No JavaScript solution
The NHS.UK policy for JavaScript is progressive enhancement. As a non JavaScript solution we display a link to a content managed page which makes the alert API request server side.
The nhs.uk policy for JavaScript is progressive enhancement. As a non JavaScript solution we display a link to a content managed page which makes the alert API request server side.
Include the following code below your header to include this functionality in your application.
```
<noscript>
Expand Down

0 comments on commit 569fca9

Please sign in to comment.