Header

The header shows the NIHR logo, and optionally shows navigation entrypoints. It is an essential part of each page's NIHR branding.

Intended behaviour

The header consists of the NIHR logo and an optional Search Form. The logo is also a link back to the current site's front page. Entering a search query will return results.

When to use this component

Every site that uses the NETSCC Design System must use the Header.

Variations

Default header

open this example in its own window

<header class="pt-3 pb-3 bg-white main-header">
  <div class="container">
    <div class="row">
      <div class="col-md-8 d-flex">
        <a
          href="/"
          title="National Institute for Health and Care Research (NIHR)"
          class="main-logo"
          ><img
            src="https://www.nihr.ac.uk/layout/4.0/assets/logos/nihr-master-logo-325px.png"
            alt="The NIHR logo"
          />
        </a>
      </div>
    </div>
  </div>
</header>

Options to the header() macro

searchForm: object|null = null

The arguments to the Search Form component.

serviceTitle: string|null = null

The title of the service site.

{% from 'macros/component/header.html' import header %}

{{ header ({}) }}

Header with Search Form

open this example in its own window

Service header

open this example in its own window

<header class="pt-3 pb-3 bg-white main-header">
  <div class="container">
    <div class="row">
      <div class="col-md-8 d-flex">
        <a
          href="/"
          title="National Institute for Health and Care Research (NIHR)"
          class="main-logo"
          ><img
            src="https://www.nihr.ac.uk/layout/4.0/assets/logos/nihr-master-logo-325px.png"
            alt="The NIHR logo"
          />
        </a>
      </div>

      <div class="col-md-4">
        <form class="search-form" action="#">
          <div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
            <div class="input-group">
              <input
                type="text"
                class="form-control"
                placeholder="Search"
                value=""
                aria-label="Search"
              />
              <button
                type="button"
                class="btn-close"
                aria-label="Close"
                disabled
              >
                <span class="visually-hidden">Close</span>
              </button>
              <button type="submit" class="btn btn-btn-outline-secondary">
                <span class="visually-hidden">Search</span>
                <i class="fas fa-search" aria-hidden="true"></i>
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>

    <div class="row">
      <a href="/" class="h4 service-header-link">Funding and Awards</a>
    </div>
  </div>
</header>

Options to the header() macro

searchForm: object|null = null

The arguments to the Search Form component.

serviceTitle: string|null = null

The title of the service site.

{% from 'macros/component/header.html' import header %}

{{ header({
  'serviceTitle': 'Funding and Awards',
  'searchForm': {
    'action': '#'
  }
}) }}