Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page template #236

Open
davidhunter08 opened this issue Jan 28, 2025 · 1 comment
Open

Page template #236

davidhunter08 opened this issue Jan 28, 2025 · 1 comment
Labels
style Add or improve a design style

Comments

@davidhunter08
Copy link
Collaborator

A page template combines boilerplate markup and components needed for all pages.

This includes:

  • JavaScript that adds a js-enabled class, which components with JavaScript behaviour need
  • the skip link, header and footer components
  • favicons, and other page metadata
Image

NHS design system guidance on page templates

@davidhunter08 davidhunter08 added the style Add or improve a design style label Jan 28, 2025
@davidhunter08
Copy link
Collaborator Author

Problem

The current NHS App page template mark-up doesn't use the nhsuk frontend page template classes:

<main id="maincontent" class="webLayout">
    <div class="nhsuk-width-container">

        [content goes here]

    </div>
</main>

Relying on the last item on the page for bottom spacing:

Image

When the last item on the page has no bottom margin the spacing is incorrect:

Image

Solution

Refactor the page template mark-up to use the nhsuk frontend page template classes:

<div class="nhsuk-width-container">
    <main class="nhsuk-main-wrapper " id="maincontent" role="main">
      <div class="nhsuk-grid-row">
        <div class="nhsuk-grid-column-two-thirds">

          [content goes here]

        </div>
      </div>
    </main>
</div>
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
style Add or improve a design style
Projects
Development

No branches or pull requests

1 participant