Skip to content

Commit

Permalink
Ensure masthead component appears within main landmark on product layout
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Jan 15, 2024
1 parent 867d448 commit dd4024b
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions layouts/product.njk
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
{% extends "layouts/base.njk" %}

{% block main %}
{{ xGovukMasthead({
title: {
html: title | smart
} if title,
description: {
html: description | markdown("inline") | noOrphans
} if description,
startButton: {
href: startButton.href,
text: startButton.text
} if startButton,
image: {
alt: image.alt,
src: image.src
} if image,
breadcrumbs: {
classes: "govuk-!-display-none-print",
items: breadcrumbItems
} if showBreadcrumbs
}) }}
<main id="main-content" role="main" {%- if mainLang %} lang="{{ mainLang }}"{% endif %}>
{{ xGovukMasthead({
title: {
html: title | smart
} if title,
description: {
html: description | markdown("inline") | noOrphans
} if description,
startButton: {
href: startButton.href,
text: startButton.text
} if startButton,
image: {
alt: image.alt,
src: image.src
} if image,
breadcrumbs: {
classes: "govuk-!-display-none-print",
items: breadcrumbItems
} if showBreadcrumbs
}) }}
<div class="govuk-main-wrapper {%- if mainClasses %} {{ mainClasses }}{% endif %}">
<div class="govuk-width-container {%- if containerClasses %} {{ containerClasses }}{% endif %}">
{% block content %}
{{ appProseScope(content) if content }}

{{ super() }}
{% endblock %}

{% block content %}
{{ appProseScope(content) if content }}

{% include "layouts/shared/related.njk" %}
{% include "layouts/shared/related.njk" %}
{% endblock %}
</div>
</div>
</main>
{% endblock %}

0 comments on commit dd4024b

Please sign in to comment.