Skip to content

Commit

Permalink
Merge branch 'master' into static_pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Oct 4, 2023
2 parents 27e7865 + 6c82a11 commit 7724b76
Show file tree
Hide file tree
Showing 25 changed files with 106 additions and 43 deletions.
35 changes: 35 additions & 0 deletions cms/sass/components/_skip-to-main-content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* Back to main content button */

.skip-to-main {
position: absolute;
z-index: 10000;
display: flex;
flex-direction: row;
align-items: center;
min-width: min-content;
padding: 5px;
top: 10px;
left: 10px;
background-color: $grapefruit;

svg {
display: block;
margin: 0 auto;
stroke: $warm-black;
margin-rigth: 10px;
}
&:hover, &:focus {
svg {
margin-right: 10px;
}
}
&:hover:after, &:focus:after {
content: " Skip to main content";
color: $warm-black;
vertical-align: bottom;
-webkit-font-feature-settings: 'liga' 1;
-moz-font-feature-settings: 'liga' 1;
font-feature-settings: 'liga' 1;
transition: 0.5 smooth;
}
}
1 change: 1 addition & 0 deletions cms/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"components/review-table",
"components/select2",
"components/search-results",
"components/skip-to-main-content",
"components/stat",
"components/stretch-list",
"components/tabs",
Expand Down
19 changes: 19 additions & 0 deletions doajtest/testbook/public_site/home_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,22 @@ tests:
bottom right-hand corner.
results:
- You are returned to the top of the home page
- title: Skip to main content button (Accessibility)
context:
role: anonymous
steps:
- step: Refresh the page
- step: Click tab key on the keyboard once
results:
- Skip to the main content button is unfolded and focused
- step: Click enter
results:
- Focus is moved to the main content
- step: Turn on screen reader
- step: With the keyboard navigate to Skip to main content button
results:
- Screen reader reads the button title
- step: Click enter
results:
- Focus is moved to the main content

2 changes: 1 addition & 1 deletion portality/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Application Version information
# ~~->API:Feature~~

DOAJ_VERSION = "6.4.1"
DOAJ_VERSION = "6.4.2"
API_VERSION = "3.0.1"

######################################
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/account/forgot.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block page_title %}Reset your password{% endblock %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">
<div class="row">
<div class="col-md-6">
Expand All @@ -23,5 +23,5 @@ <h1>Reset your password</h1>
</div>
</div>
</section>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block page_title %}Login to your account{% endblock %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">
<div class="row">
<div class="col-md-6">
Expand All @@ -17,5 +17,5 @@ <h1>Login</h1>
</div>
</div>
</section>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/account/login_to_apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block page_title %}Login to apply{% endblock %}

{% block content %}
<main class="container">
<div class="container">
<div class="row">
<div class="col-md-8">
<section class="page-content" id="apply">
Expand Down Expand Up @@ -46,5 +46,5 @@ <h2 class="label">Related help</h2>
</div>
</div>
</div>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/account/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% endblock %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">
<div class="row">
<div class="col-md-6">
Expand All @@ -30,7 +30,7 @@ <h1>Register</h1>
</div>
</div>
</section>
</main>
</div>
{% endblock %}

{% block extra_js_bottom %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/account/reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block content %}

<main class="page-content">
<div class="page-content">
<section class="container">
<div class="row">
<div class="col-md-8">
Expand All @@ -20,6 +20,6 @@ <h3>Hi {{ account.name or account.email }}</h3>
</div>
</div>
</section>
</main>
</div>

{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/api/current/api_docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% endblock %}

{% block content %}
<main class="container page-content">
<div class="container page-content">
<div class="row">
<div class="col-md-4 col-md-push-8">
{# todo: this nav was bumping into swagger
Expand Down Expand Up @@ -58,7 +58,7 @@ <h1>API </h1>
</section>
</div>
</div>
</main>
</div>
{% endblock %}

{% block extra_js_bottom %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/application_form/public_application.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

{% block content scoped %}
<body id="apply">
<main class="container">
<div class="container">
{% include "application_form/_backend_validation.html" %}
<div class="row">
<div class="col-md-8">
Expand Down Expand Up @@ -64,7 +64,7 @@
</div>
</div>
</div>
</main>
</div>
</body>
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions portality/templates/application_form/readonly_journal.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{% block content scoped %}
<body id="apply">
<main class="container">
<div class="container">
<div class="row">
<div class="col-md-8">
<section class="page-content">
Expand All @@ -47,7 +47,7 @@
</div>
</div>
</div>
</main>
</div>
</body>
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions portality/templates/doaj/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{% set doi = bibjson.get_one_identifier("doi") %}
{% set normalised_doi = article.get_normalised_doi() %}

<main class="page-content">
<div class="page-content">
<div class="hero">
<header class="container">
<p class="label">
Expand Down Expand Up @@ -224,5 +224,5 @@ <h2>Published in <em>{{jtitle}}</em></h2>
</div>

</div>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/doaj/articles_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
{%- block meta_twitter_description -%}Find open access articles in DOAJ.{%- endblock -%}

{% block content %}
<main class="container page-content">
<div class="container page-content">
<div id="public-article-search"></div>
{% include "includes/search-help-modal.html" %}
</main>
</div>
{% endblock %}

{% block extra_js_bottom %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/doaj/contact.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/public_base.html" %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">

<p>Submit your feedback and questions here. Feedback submitted about a particular journal is treated as confidential.</p>
Expand Down Expand Up @@ -52,7 +52,7 @@
</form>

</section>
</main>
</div>


{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/doaj/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2 class="sr-only">DOAJ in numbers</h2>
{% endblock %}

{% block content %}
<main class="page-content">
<div class="page-content">
<!-- About -->
<section class="highlight bg-black homepage__about">
<div class="container">
Expand Down Expand Up @@ -246,6 +246,6 @@ <h2 class="label label--secondary">Recently-added journals</h2>
</div>
</div>
</section>
</main>
</div>

{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/doaj/journals_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
{%- block meta_twitter_description -%}Find open access journals in DOAJ.{%- endblock -%}

{% block content %}
<main class="container page-content">
<div class="container page-content">
<div id="public-journal-search"></div>
{% include "includes/search-help-modal.html" %}
</main>
</div>
{% endblock %}

{% block extra_js_bottom %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/doaj/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
%}

<main class="container page-content">
<div class="container page-content">
<header>
{% if journal.last_manually_updated_since(days=30) %}
<span class="label label--secondary">
Expand Down Expand Up @@ -450,7 +450,7 @@ <h3 class="label label--underlined">Journal metadata</h3>
</p>
</footer>

</main>
</div>
{% include "includes/_hotjar.html" %}

{% endblock %}
Expand Down
13 changes: 9 additions & 4 deletions portality/templates/editor/editor_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
{% endblock %}

{% block content %}
<section class="page-content">
{% block editor_content %}
{% endblock %}
</section>
<div class="container">
<h2>Editor dashboard</h2>
{% include 'editor/nav.html' %}

<section class="page-content">
{% block editor_content %}
{% endblock %}
</section>
</div>

{% include "includes/_hotjar.html" %}
{% endblock %}
5 changes: 4 additions & 1 deletion portality/templates/layouts/public_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% block base_content %}
<body class="{% block body_class %}{% endblock %}" data-spy="scroll" data-offset="70">
<a href="#maincontent" class="skip-to-main"><span aria-hidden="true" data-feather="arrow-down"></span></a>

<header class="page-header">
{% include "includes/header.html" %}
Expand All @@ -17,7 +18,9 @@
{% endif %}

{% block main_panel %}
{% block content %}{% endblock %}
<main id="maincontent">
{% block content %}{% endblock %}
</main>
{% endblock %}

{% include "includes/footer.html" %}
Expand Down
4 changes: 2 additions & 2 deletions portality/templates/layouts/single_col_page.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% extends "layouts/public_base.html" %}

{% block content %}
<main class="container page-content">
<div class="container page-content">
<section class="col-md-offset-3 col-md-6">
<h1>{% block title %}{% endblock %}</h1>

{% block single_col_content %}{% endblock %}
</section>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/openurl/404.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/public_base.html" %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">

<h2>OpenURL - no results</h2>
Expand All @@ -16,5 +16,5 @@ <h3>What next?</h3>
</ul>

</section>
</main>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions portality/templates/openurl/help.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/public_base.html" %}

{% block content %}
<main class="page-content">
<div class="page-content">
<section class="container">

<h2>Help</h2>
Expand Down Expand Up @@ -33,5 +33,5 @@ <h3>Supported OpenURL version</h3>
</p>

</section>
</main>
</div>
{% endblock %}
Loading

0 comments on commit 7724b76

Please sign in to comment.