Skip to content

Commit

Permalink
add images to dist folder and add styling to the images in guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunter08 committed Jun 11, 2024
1 parent 33311b6 commit 881b68b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export default function (eleventyConfig) {
eleventyConfig.addWatchTarget('./src/')
eleventyConfig.addWatchTarget('./docs/assets/')

// Add images to docs
eleventyConfig.addPassthroughCopy('docs/assets/images');

// Add syntax highlighting to code blocks
eleventyConfig.addPlugin(syntaxHighlight)

Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/layouts/sidebar.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>

<div class="nhsuk-grid-column-three-quarters">
<main role="main" id="maincontent" class="nhsuk-main-wrapper">
<main role="main" id="maincontent" class="nhsuk-main-wrapper app-content">
{% block main %}
{{ content | safe }}
{% endblock main %}
Expand Down
8 changes: 8 additions & 0 deletions docs/assets/css/_content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.app-content {

// So images do not break the container
img {
max-width: 100%;
}

}
1 change: 1 addition & 0 deletions docs/assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
// Import all styles specific for the design system docs
@import "docs/assets/css/components/side-navigation";
@import "docs/assets/css/tabs.scss";
@import "docs/assets/css/content.scss";
@import "docs/assets/css/example.scss";
@import "docs/assets/css/utilities.scss";
4 changes: 3 additions & 1 deletion docs/components/bottom-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags:
- component
---

![bottom nav](bottom-nav.png)
![](/assets/images/bottom-nav.png)

## When to use

Expand All @@ -23,6 +23,8 @@ The bottom navigation is not part of the web browser version of the NHS App. The

Each hub is represented by a text label and an icon. The text labels match the main heading on the respective hub page.

![](/assets/images/bottom-nav-2.png)

## Accessibility

Bear in mind that the bottom navigation can be easier for users to reach than the top navigation. This lends itself to links that users may need more frequently.
Expand Down
4 changes: 3 additions & 1 deletion docs/components/top-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags:
- component
---

[add example]
![](/assets/images/top-nav.png)

## When to use

Expand All @@ -24,6 +24,8 @@ The top navigation includes a link to the NHS App help and support pages hosted

The top also includes an ’Account and settings’ link. This opens the respective hub page.

![ ](/assets/images/top-nav-2.png)

## Accessibility

The top navigation icons do not have text labels. They have aria labels which are announced by screen readers.
Expand Down

0 comments on commit 881b68b

Please sign in to comment.