Skip to content

Commit

Permalink
Merge pull request #200 from digital-land/refactor/removeLeftoverBrea…
Browse files Browse the repository at this point in the history
…dcrumbs

Refactor/remove leftover breadcrumbs
  • Loading branch information
GeorgeGoodall authored Oct 3, 2023
2 parents 703d79d + a3b0b72 commit 4403fad
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 62 deletions.
13 changes: 6 additions & 7 deletions application/templates/components/hero/macro.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% from "govuk_frontend_jinja/components/button/macro.html" import govukButton %}
{% from "govuk_frontend_jinja/components/phase-banner/macro.html" import govukPhaseBanner %}
{% from "govuk_frontend_jinja/components/breadcrumbs/macro.html" import govukBreadcrumbs %}

{% macro appHero(params={}) %}
<div class="app-hero{%- if params.classes %} {{ params.classes }}{% endif -%}"
Expand All @@ -16,12 +15,12 @@
},
'attributes': params.phaseBanner['attributes']
}) if params.phaseBanner }}
{{ govukBreadcrumbs({
'classes': "app-breadcrumbs--inverse" + (" " + params.breadcrumbs.classes if params.breadcrumbs.classes else ''),
'items': params.breadcrumbs.items,
'collapseOnMobile': params.breadcrumbs.collapseOnMobile,
'attributes': params.breadcrumbs.attributes
}) if params.breadcrumbs }}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{% block breadcrumbs%}
{{ dlBackButton({
"parentHref": '/'
})}}
{% endblock %}
{{- caller() if caller -}}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
Expand Down
25 changes: 6 additions & 19 deletions application/templates/dataset-backlog.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,12 @@
<meta name="generated-date" content="{{ now }}" />
{% endblock head %}

{%- block beforeContent -%}
{{ super() }}

{{- govukBreadcrumbs({
"items": [
{
"text": "Planning Data",
"href": "/"
},
{
"text": "Datasets",
"href": "/dataset/"
},
{
"text": name
}
]
}) -}}
{%- endblock -%}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{% block breadcrumbs%}
{{ dlBackButton({
"parentHref": '/'
})}}
{% endblock %}

{% block pageTitle %}{{ name }} dataset | Planning Data{% endblock %}

Expand Down
23 changes: 6 additions & 17 deletions application/templates/fact.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@

{%- block pageTitle %}{{ row_name }} | {{ pipeline_name|capitalize }} | Planning Data{% endblock -%}

{%- block breadcrumbs -%}
{{- govukBreadcrumbs({
"items": [
{
"text": "Planning Data",
"href": "/"
},
{
"text": "Fact",
"href": "/fact"
},
{
"text": fact["fact"]
}
]
}) -}}
{%- endblock -%}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{% block breadcrumbs%}
{{ dlBackButton({
"parentHref": '/'
})}}
{% endblock %}

{%- block content %}
<div class="govuk-grid-row">
Expand Down
1 change: 0 additions & 1 deletion application/templates/layouts/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "govuk_frontend_jinja/template.html" %}
{% from "govuk_frontend_jinja/components/phase-banner/macro.html" import govukPhaseBanner %}
{% from "govuk_frontend_jinja/components/breadcrumbs/macro.html" import govukBreadcrumbs %}

{%- block pageTitle %}Planning data you can find, use and trust{% endblock -%}

Expand Down
9 changes: 6 additions & 3 deletions application/templates/layouts/layout--guidance.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
{% from "components/sub-navigation/macro.jinja" import appSubNavigation %}
{% block pageTitle %}{{ pageData.pageTitle }}{% endblock %}

{%- block breadcrumbs -%}
{{- govukBreadcrumbs({ 'items': pageData.breadcrumbs }) -}}
{%- endblock -%}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{% block breadcrumbs%}
{{ dlBackButton({
"parentHref": '/'
})}}
{% endblock %}

{% block content %}

Expand Down
21 changes: 6 additions & 15 deletions application/templates/organisation_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@
<link rel="stylesheet" href="/static/stylesheets/application.css">
{% endblock head %}

{%- block beforeContent -%}
{{ super() }}

{{- govukBreadcrumbs({
"items": [
{
"text": "Planning Data",
"href": "/"
},
{
"text": "Organisations"
}
]
}) -}}
{%- endblock -%}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{% block breadcrumbs%}
{{ dlBackButton({
"parentHref": '/'
})}}
{% endblock %}

{% block pageTitle %}Organisations | Planning Data{% endblock %}

Expand Down

0 comments on commit 4403fad

Please sign in to comment.