From 257f5ab744a0d02b907c26dcc1ed5c013ab30cce Mon Sep 17 00:00:00 2001 From: Paulo Vareiro <58229468+paulovareiro29@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:35:43 +0100 Subject: [PATCH] feat: STADTKLN-134 implement skip links (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: implement skip links on homepage * feat: implement skip-links on enquiry * feat: implement skip links on blog pages * chore: revert homepage hero to random src * feat: implement skip links on apps page * Apply suggestions from code review German translations * Apply suggestions from code review missing german translations * feat: implement skip links on results pages --------- Co-authored-by: Deborah Köpfer --- src/layouts/base.twig | 6 +++++- src/pages/apps.twig | 6 ++++++ src/pages/blog-overview.twig | 6 ++++++ src/pages/blog.twig | 6 ++++++ src/pages/enquiry-all-states.twig | 17 +++++++++++++++-- src/pages/enquiry-validated.twig | 17 +++++++++++++++-- src/pages/enquiry.twig | 17 +++++++++++++++-- src/pages/homepage.twig | 11 ++++++++--- src/pages/overview-empty.twig | 6 ++++++ src/pages/overview.twig | 6 ++++++ src/pages/publisher-datasets-empty.twig | 6 ++++++ src/pages/publisher-datasets.twig | 6 ++++++ src/pages/publisher-overview.twig | 6 ++++++ src/partials/base/b_header.twig | 14 ++++++++++++-- .../cl_results-empty-state.twig | 11 +++++++++-- src/partials/content-layout/cl_results.twig | 11 +++++++++-- .../content-layout/cl_skip-links.twig | 14 ++++++++++++++ src/partials/icon-link.twig | 4 ---- src/styles/components/_header.scss | 15 ++++++++++----- src/styles/components/_index.scss | 1 + src/styles/components/_skip-links.scss | 19 +++++++++++++++++++ src/styles/styles.scss | 1 + 22 files changed, 181 insertions(+), 25 deletions(-) create mode 100644 src/partials/content-layout/cl_skip-links.twig delete mode 100644 src/partials/icon-link.twig create mode 100644 src/styles/components/_skip-links.scss diff --git a/src/layouts/base.twig b/src/layouts/base.twig index a1c1b86..4cd24d7 100644 --- a/src/layouts/base.twig +++ b/src/layouts/base.twig @@ -31,7 +31,11 @@ - {% include 'partials::base/b_header.twig' %} + {% + include 'partials::base/b_header.twig' with { + skip_links: skip_links + } + %}
{% block content %}{% endblock %} diff --git a/src/pages/apps.twig b/src/pages/apps.twig index 0befe58..e6cf9a8 100644 --- a/src/pages/apps.twig +++ b/src/pages/apps.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/blog-overview.twig b/src/pages/blog-overview.twig index b19d36e..f83dc7c 100644 --- a/src/pages/blog-overview.twig +++ b/src/pages/blog-overview.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/blog.twig b/src/pages/blog.twig index 08ba9d4..b9ee03a 100644 --- a/src/pages/blog.twig +++ b/src/pages/blog.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/enquiry-all-states.twig b/src/pages/enquiry-all-states.twig index 199902f..4550776 100644 --- a/src/pages/enquiry-all-states.twig +++ b/src/pages/enquiry-all-states.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ @@ -40,7 +46,14 @@ -
+
+ {% + include 'partials::content-layout/cl_skip-links.twig' with { + links: [ + { href: "#results", text: "Formular überspringen"} + ] + } + %}
@@ -120,7 +133,7 @@ } %} -
+

Öffentliche Datenanfragen

diff --git a/src/pages/enquiry-validated.twig b/src/pages/enquiry-validated.twig index 8726f24..a197d6e 100644 --- a/src/pages/enquiry-validated.twig +++ b/src/pages/enquiry-validated.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ @@ -40,7 +46,14 @@
-
+
+ {% + include 'partials::content-layout/cl_skip-links.twig' with { + links: [ + { href: "#results", text: "Formular überspringen"} + ] + } + %}
@@ -128,7 +141,7 @@ } %} -
+

Öffentliche Datenanfragen

diff --git a/src/pages/enquiry.twig b/src/pages/enquiry.twig index a6e676d..63656d3 100644 --- a/src/pages/enquiry.twig +++ b/src/pages/enquiry.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ @@ -40,7 +46,14 @@
-
+
+ {% + include 'partials::content-layout/cl_skip-links.twig' with { + links: [ + { href: "#results", text: "Formular überspringen"} + ] + } + %}
@@ -120,7 +133,7 @@ } %} -
+

Öffentliche Datenanfragen

diff --git a/src/pages/homepage.twig b/src/pages/homepage.twig index 660d816..ffd795c 100644 --- a/src/pages/homepage.twig +++ b/src/pages/homepage.twig @@ -1,12 +1,17 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} -
+ -
+

diff --git a/src/pages/overview-empty.twig b/src/pages/overview-empty.twig index ed40c83..9f4f8e8 100644 --- a/src/pages/overview-empty.twig +++ b/src/pages/overview-empty.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/overview.twig b/src/pages/overview.twig index ad05654..79aa696 100644 --- a/src/pages/overview.twig +++ b/src/pages/overview.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/publisher-datasets-empty.twig b/src/pages/publisher-datasets-empty.twig index 91383ec..0055789 100644 --- a/src/pages/publisher-datasets-empty.twig +++ b/src/pages/publisher-datasets-empty.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/publisher-datasets.twig b/src/pages/publisher-datasets.twig index 58d7146..76e8a72 100644 --- a/src/pages/publisher-datasets.twig +++ b/src/pages/publisher-datasets.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/pages/publisher-overview.twig b/src/pages/publisher-overview.twig index 327055a..18ce854 100644 --- a/src/pages/publisher-overview.twig +++ b/src/pages/publisher-overview.twig @@ -1,7 +1,13 @@ {% extends 'layouts::base.twig' %} {% set theme = 'default' %} +{% + set skip_links = [ + { href: '#content', text: 'Zum Inhalt' }, + ] +%} {% block content %} +
{% include 'partials::base/b_breadcrumbs.twig' with { links: [ diff --git a/src/partials/base/b_header.twig b/src/partials/base/b_header.twig index bb9644a..1d0cee2 100644 --- a/src/partials/base/b_header.twig +++ b/src/partials/base/b_header.twig @@ -1,4 +1,4 @@ -
+