Metadata-Version: 2.1
Name: wagtail-nhs-style
Version: 0.0.3
Summary: NHS Frontend Styles for Wagtail
Home-page: https://github.com/nhsuk/wagtail-nhs-style
Author: Mike Monteith
Author-email: <mike.monteith@nhs.net>
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: Wagtail (>=2.0)
Provides-Extra: testing

# Wagtail NHS Style

A wagtail implementation of the [NHS frontend v0.8.0](https://github.com/nhsuk/nhsuk-frontend) standard components.

# Installation

Install the pypi package
```
pip install wagtail-nhs-style
```

Add to your `INSTALLED_APPS` in wagtail settings
```python
INSTALLED_APPS = [
  ...

  'wagtailnhsstyle',

  ...
]
```

Use blocks in your streamfields
```python
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
from wagtail.core.models import Page
from wagtail.core.fields import StreamField

from wagtailnhsstyle.blocks import ActionLinkBlock, CalloutBlock

class HomePage(Page):
  body = StreamField([
      # Include any of the blocks you want to use.
      ('action_link', ActionLinkBlock()),
      ('callout', CalloutBlock()),
  ])

  content_panels = Page.content_panels + [
      StreamFieldPanel('body'),
  ]
```

Use templatetags
```django
{% load nhsstyle_tags %}

<html>
...
<body>
  {% breadcrumbs %}
</body>
</html>
```

Use template includes
```django
{% include 'wagtailnhsstyle/header.html' with show_search=True %}
```

See the [component documentation](./docs/components/) for a list of components you can use.

Include the CSS in your base template
```html
  <link rel="stylesheet" type="text/css" href="{% static 'wagtailnhsstyle/css/nhsuk-wagtail.min.css' %}">
```

Include the Javascript in your base template
```html
  <script type="text/javascript" src="{% static 'wagtailnhsstyle/js/nhsuk-0.8.0.min.js' %}" defer></script>
```

# Further reading

See more [documentation](./docs/)


