-
-```
-
### Header expander
The Header’s JavaScript file uses:
@@ -272,7 +105,7 @@ For example, you may want to keep social media links grouped together, visually
In these instances, you can apply `c-header-expander__item–keyline-first-item-only` to a group of list items, so the first item in that group always has a keyline above it.
-You can see an example of this in the code example above.
+You can see an example of this in the `view` template.
## Research on this component
@@ -286,4 +119,7 @@ A/B testing showed that exposing top-level navigation links in the menu increase
## Help improve this page
-If you’ve got a question, idea or suggestion about how to improve this component or guidance, post in the [#design-systems Slack channel](https://springernature.slack.com/archives/C75DHBTBP).
+If you’ve got a question, idea or suggestion about how to improve this component or guidance, post in the [#design-systems Slack channel](https://springernature.slack.com/archives/C75DHBTBP).
+
+[info-npm]: https://www.npmjs.com/package/@springernature/nature-header
+[badge-npm]: https://img.shields.io/npm/v/@springernature/nature-header.svg
diff --git a/toolkits/nature/packages/nature-header/demo/context.json b/toolkits/nature/packages/nature-header/demo/context.json
new file mode 100644
index 000000000..3bf9ad5c1
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/demo/context.json
@@ -0,0 +1,43 @@
+{
+ "exploreContent": [
+ {
+ "slug": "/some-url/",
+ "text": "link one"
+ },
+ {
+ "slug": "/some-url/",
+ "text": "link two"
+ }
+ ],
+ "aboutJournalContent": [
+ {
+ "slug": "/some-url/",
+ "text": "link one"
+ },
+ {
+ "slug": "/some-url/",
+ "text": "link two"
+ }
+ ],
+ "publishWithUsContent": [
+ {
+ "slug": "/some-url/",
+ "text": "link one"
+ },
+ {
+ "slug": "/some-url/",
+ "text": "link two"
+ }
+ ],
+ "publishWithUs": true,
+ "submissionLink": "/some-url/",
+ "facebookUri": "/some-url/",
+ "twitterUri": "/some-url/",
+ "showSubscribeButton": true,
+ "pcode": "999",
+ "alertsLink": "/some-url/",
+ "rssLink": "/some-url/",
+ "dynamicPartials": {
+ "nature-header": "./toolkits/nature/packages/nature-header/view/header.hbs"
+ }
+}
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-header/demo/dist/index.html b/toolkits/nature/packages/nature-header/demo/dist/index.html
new file mode 100644
index 000000000..f28635f90
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/demo/dist/index.html
@@ -0,0 +1,2974 @@
+
+
+
+ @springernature/nature-header
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-header/demo/index.hbs b/toolkits/nature/packages/nature-header/demo/index.hbs
new file mode 100644
index 000000000..a64a17439
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/demo/index.hbs
@@ -0,0 +1 @@
+{{> nature-header }}
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-header/demo/main.js b/toolkits/nature/packages/nature-header/demo/main.js
new file mode 100644
index 000000000..bd101876e
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/demo/main.js
@@ -0,0 +1,3 @@
+import {header} from '../js/header';
+
+header();
diff --git a/toolkits/nature/packages/nature-header/demo/main.scss b/toolkits/nature/packages/nature-header/demo/main.scss
new file mode 100644
index 000000000..33cad09ca
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/demo/main.scss
@@ -0,0 +1,17 @@
+@charset "UTF-8";
+
+// we must not add `node_modules/` to the Sass includePaths config,
+// so use relative paths here. Paths should be relative to this file.
+@import '../node_modules/@springernature/brand-context/nature/scss/core.scss';
+@import '../node_modules/@springernature/brand-context/nature/scss/enhanced.scss';
+
+// component SCSS
+@import '../scss/50-components/header';
+@import '../scss/50-components/header-expander';
+
+// Utilities
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/buttons.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/display.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/hiding.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/lists.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/spacing.scss';
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-header/view/header.hbs b/toolkits/nature/packages/nature-header/view/header.hbs
new file mode 100644
index 000000000..3f3e8712c
--- /dev/null
+++ b/toolkits/nature/packages/nature-header/view/header.hbs
@@ -0,0 +1,198 @@
+
+
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-hero/README.md b/toolkits/nature/packages/nature-hero/README.md
index 60479cef3..d75ff831f 100644
--- a/toolkits/nature/packages/nature-hero/README.md
+++ b/toolkits/nature/packages/nature-hero/README.md
@@ -1,34 +1,35 @@
# Nature Hero
+[![NPM version][badge-npm]][info-npm]
+
Hero for Nature products.
-## CSS
+## Installation
+
+To use the Hero component, enter the following command in your Terminal:
+
+```
+npm install @springernature/nature-hero
+```
+
+## Usage
-Include the SCSS in your application
+Import the installed component code in your `scss` file:
```scss
-// Include this with your settings
@import '@springernature/nature-hero/scss/10-settings/hero';
-
-// Include this with your other components
@import '@springernature/nature-hero/scss/50-components/hero';
+
+@import '@springernature/brand-context/default/scss/60-utilities/links.scss';
+@import '@springernature/brand-context/default/scss/60-utilities/positioning.scss';
+@import '@springernature/brand-context/default/scss/60-utilities/spacing.scss';
```
-## Usage
+> **NOTE** The component requires the use of the utility classes shown above
-```html
-
The ambitious observatory has arrived at its home — near a gravitationally stable spot called L2 — for a premier view of the Universe.
+
+
+
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-hero/demo/index.hbs b/toolkits/nature/packages/nature-hero/demo/index.hbs
new file mode 100644
index 000000000..d88d17faf
--- /dev/null
+++ b/toolkits/nature/packages/nature-hero/demo/index.hbs
@@ -0,0 +1 @@
+{{> nature-hero }}
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-hero/demo/main.scss b/toolkits/nature/packages/nature-hero/demo/main.scss
new file mode 100644
index 000000000..db04db16c
--- /dev/null
+++ b/toolkits/nature/packages/nature-hero/demo/main.scss
@@ -0,0 +1,15 @@
+@charset "UTF-8";
+
+// we must not add `node_modules/` to the Sass includePaths config,
+// so use relative paths here. Paths should be relative to this file.
+@import '../node_modules/@springernature/brand-context/nature/scss/core.scss';
+@import '../node_modules/@springernature/brand-context/nature/scss/enhanced.scss';
+
+// component SCSS
+@import '../scss/10-settings/hero';
+@import '../scss/50-components/hero';
+
+// Utilities
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/links.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/positioning.scss';
+@import '../node_modules/@springernature/brand-context/default/scss/60-utilities/spacing.scss';
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-hero/view/hero.hbs b/toolkits/nature/packages/nature-hero/view/hero.hbs
new file mode 100644
index 000000000..a3612c0c4
--- /dev/null
+++ b/toolkits/nature/packages/nature-hero/view/hero.hbs
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-section-heading/README.md b/toolkits/nature/packages/nature-section-heading/README.md
index 921e97d54..0e668d275 100644
--- a/toolkits/nature/packages/nature-section-heading/README.md
+++ b/toolkits/nature/packages/nature-section-heading/README.md
@@ -1,5 +1,7 @@
# Nature Section Heading
+[![NPM version][badge-npm]][info-npm]
+
The Nature Section heading is a type of heading used for titles of some subsections of pages on Nature.com.
It uses borders above and below the heading text to make it stand out from other headings on the page.
@@ -37,6 +39,8 @@ To use the Section heading component, enter the following command in your Termin
npm install @springernature/nature-section-heading
```
+## Usage
+
Then import the installed component code in your `scss` file:
```scss
@@ -48,25 +52,13 @@ Then import the installed component code in your `scss` file:
Once you’ve installed the `scss`, build your Section heading using the following HTML as a guide.
-### Section heading
-
-```html
-
Heading Text
-```
+## Template
-### Section heading as link
-
-```html
-
-```
+A configurable template can found in the [`view` folder](./view/section-heading.hbs). Example usage can be found in the `demo` folder.
## Help improve this page
If you’ve got a question, idea or suggestion about how to improve this component or guidance, post in the [#design-systems Slack channel](https://springernature.slack.com/archives/C75DHBTBP).
+
+[info-npm]: https://www.npmjs.com/package/@springernature/nature-section-heading
+[badge-npm]: https://img.shields.io/npm/v/@springernature/nature-section-heading.svg
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-section-heading/demo/context.json b/toolkits/nature/packages/nature-section-heading/demo/context.json
new file mode 100644
index 000000000..d69dac6ac
--- /dev/null
+++ b/toolkits/nature/packages/nature-section-heading/demo/context.json
@@ -0,0 +1,6 @@
+{
+ "text": "Heading Text",
+ "dynamicPartials": {
+ "nature-section-heading": "./toolkits/nature/packages/nature-section-heading/view/section-heading.hbs"
+ }
+}
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-section-heading/demo/dist/index.html b/toolkits/nature/packages/nature-section-heading/demo/dist/index.html
new file mode 100644
index 000000000..5413a234d
--- /dev/null
+++ b/toolkits/nature/packages/nature-section-heading/demo/dist/index.html
@@ -0,0 +1,1320 @@
+
+
+
+ @springernature/nature-section-heading
+
+
+
+
+
+
Heading Text
+
The ambitious observatory has arrived at its home — near a gravitationally stable spot called L2 — for a premier view of the Universe.
People abandoned thriving cities in Mesopotamia, the Indus Valley and farther afield at about the same time as a decades-long drought gripped parts of the planet.
+
+
+
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-section-heading/demo/index.hbs b/toolkits/nature/packages/nature-section-heading/demo/index.hbs
new file mode 100644
index 000000000..53c141666
--- /dev/null
+++ b/toolkits/nature/packages/nature-section-heading/demo/index.hbs
@@ -0,0 +1,7 @@
+
+ {{> nature-section-heading }}
+
The ambitious observatory has arrived at its home — near a gravitationally stable spot called L2 — for a premier view of the Universe.
+
+ {{> nature-section-heading text='Heading Text With Link' url='http://www.example.com' }}
+
People abandoned thriving cities in Mesopotamia, the Indus Valley and farther afield at about the same time as a decades-long drought gripped parts of the planet.
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-section-heading/demo/main.scss b/toolkits/nature/packages/nature-section-heading/demo/main.scss
new file mode 100644
index 000000000..715382ff4
--- /dev/null
+++ b/toolkits/nature/packages/nature-section-heading/demo/main.scss
@@ -0,0 +1,12 @@
+@charset "UTF-8";
+
+// we must not add `node_modules/` to the Sass includePaths config,
+// so use relative paths here. Paths should be relative to this file.
+@import '../node_modules/@springernature/brand-context/nature/scss/core.scss';
+@import '../node_modules/@springernature/brand-context/nature/scss/enhanced.scss';
+
+
+// component SCSS
+@import '../scss/10-settings/section-heading';
+@import '../scss/50-components/section-heading';
+
diff --git a/toolkits/nature/packages/nature-section-heading/view/section-heading.hbs b/toolkits/nature/packages/nature-section-heading/view/section-heading.hbs
new file mode 100644
index 000000000..b8bc68525
--- /dev/null
+++ b/toolkits/nature/packages/nature-section-heading/view/section-heading.hbs
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/toolkits/nature/packages/nature-sort-by/README.md b/toolkits/nature/packages/nature-sort-by/README.md
index b364f4a32..f12a9192b 100644
--- a/toolkits/nature/packages/nature-sort-by/README.md
+++ b/toolkits/nature/packages/nature-sort-by/README.md
@@ -1,7 +1,17 @@
# Nature Sort By
+[![NPM version][badge-npm]][info-npm]
+
A sort by dropdown for use on Nature product pages that contain a sortable list of content such as search results pages.
+## Installation
+
+To use the Sort By component, enter the following command in your Terminal:
+
+```
+npm install @springernature/nature-sort-by
+```
+
## Usage
Import the js and scss as follows:
@@ -13,16 +23,19 @@ sortBy();
```
```scss
-@import '../../node_modules/@springernature/nature-sort-by/scss/10-settings/sort-by';
-@import '../../node_modules/@springernature/nature-sort-by/scss/50-components/sort-by';
+@import '@springernature/nature-sort-by/scss/10-settings/sort-by';
+@import '@springernature/nature-sort-by/scss/50-components/sort-by';
-```
+@import '@springernature/brand-context/default/scss/60-utilities/flex.scss';
+@import '@springernature/brand-context/default/scss/60-utilities/hiding.scss';
+@import '@springernature/brand-context/default/scss/60-utilities/spacing.scss';
-If you plan to use utility classnames such as `u-js-hide` as shown in the examples below, ensure you import the relevant toolkit scss. For example:
-```scss
-@import '../../node_modules/@springernature/brand-context/default/scss/60-utilities/hiding';
```
+> **NOTE** The component require the use of the utility classes shown above
+
+## Configuration
+
To configure the component the following html attributes will need to be set:
| Name | Description |
@@ -37,57 +50,9 @@ This component uses Global Expander. This means you should be aware of the follo
2. You can add the classname `u-js-hide` to the target on page render. Global Expander will remove this when the menu is opened.
3. Global Expander will add the classname `is-open` to the trigger and `has-tethered` to the target when the menu has been opened. The component's styling utilises these.
-Example handlebars template
-```handlebars
-