From 9a668b1939910167e845523369aa44d1ca5dd453 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Fri, 11 Jun 2021 15:54:23 +0200
Subject: [PATCH 1/7] Load all roboto variants in the head.

---
 aleksis/core/settings.py              | 7 ++++++-
 aleksis/core/templates/core/base.html | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/aleksis/core/settings.py b/aleksis/core/settings.py
index 4929c4004..d12b55988 100644
--- a/aleksis/core/settings.py
+++ b/aleksis/core/settings.py
@@ -526,7 +526,12 @@ ANY_JS = {
     },
     "sortablejs": {"js_url": JS_URL + "/sortablejs/Sortable.min.js"},
     "jquery-sortablejs": {"js_url": JS_URL + "/jquery-sortablejs/jquery-sortable.js"},
-    "Roboto": {"css_url": JS_URL + "/@fontsource/roboto/index.css"},
+    "Roboto100": {"css_url": JS_URL + "/@fontsource/roboto/100.css"},
+    "Roboto300": {"css_url": JS_URL + "/@fontsource/roboto/300.css"},
+    "Roboto400": {"css_url": JS_URL + "/@fontsource/roboto/400.css"},
+    "Roboto500": {"css_url": JS_URL + "/@fontsource/roboto/500.css"},
+    "Roboto700": {"css_url": JS_URL + "/@fontsource/roboto/700.css"},
+    "Roboto900": {"css_url": JS_URL + "/@fontsource/roboto/900.css"},
 }
 
 merge_app_settings("ANY_JS", ANY_JS, True)
diff --git a/aleksis/core/templates/core/base.html b/aleksis/core/templates/core/base.html
index 95712b2ab..a8c5c86fc 100644
--- a/aleksis/core/templates/core/base.html
+++ b/aleksis/core/templates/core/base.html
@@ -18,7 +18,12 @@
 
   {# CSS #}
   {% include_css "material-design-icons" %}
-  {% include_css "Roboto" %}
+  {% include_css "Roboto100" %}
+  {% include_css "Roboto300" %}
+  {% include_css "Roboto400" %}
+  {% include_css "Roboto500" %}
+  {% include_css "Roboto700" %}
+  {% include_css "Roboto900" %}
   <link rel="stylesheet" href="{% sass_src 'style.scss' %}">
 
   {# Add JS URL resolver #}
-- 
GitLab


From 49b280020471e4a94db246e4fdd04100047a6280 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Fri, 11 Jun 2021 15:55:15 +0200
Subject: [PATCH 2/7] Use h1 as the main heading in the base template

---
 aleksis/core/templates/core/base.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/core/templates/core/base.html b/aleksis/core/templates/core/base.html
index a8c5c86fc..14e455c97 100644
--- a/aleksis/core/templates/core/base.html
+++ b/aleksis/core/templates/core/base.html
@@ -116,7 +116,7 @@
   {% endif %}
 
   {% block no_page_title %}
-    <h4>{% block page_title %}{% endblock %}</h4>
+    <h1>{% block page_title %}{% endblock %}</h1>
   {% endblock %}
 
   {% block content %}{% endblock %}
-- 
GitLab


From a9b7b9f1b556c34f1fee50a8895e8ba8f645ec8b Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Fri, 11 Jun 2021 15:55:34 +0200
Subject: [PATCH 3/7] Style h1 and h2 elements to better fit aleksis

---
 aleksis/core/static/style.scss | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/aleksis/core/static/style.scss b/aleksis/core/static/style.scss
index bb8af0da2..90906b995 100644
--- a/aleksis/core/static/style.scss
+++ b/aleksis/core/static/style.scss
@@ -271,6 +271,23 @@ ul.footer-ul {
   fill: white;
 }
 
+//////////////
+// HEADINGS //
+//////////////
+
+h1 {
+  font-weight: 200;
+  font-style: normal;
+  font-size: 3.6rem;
+  line-height: 110%;
+  margin: 1.4rem 0 1.68rem 0;
+}
+
+h2 {
+  font-weight: 300;
+  font-size: 3.0rem;
+}
+
 /* Collections */
 
 ul.collection .collection-item .title {
-- 
GitLab


From 820a05ef37de4a052ffeb34a2816a4bc2ea84b30 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Fri, 11 Jun 2021 15:56:21 +0200
Subject: [PATCH 4/7] Replace all heading tags with semantic correct
 alternatives

---
 aleksis/core/templates/core/edit_dashboard.html      |  6 +++---
 aleksis/core/templates/core/group/child_groups.html  |  2 +-
 aleksis/core/templates/core/group/full.html          |  8 ++++----
 aleksis/core/templates/core/group/list.html          |  4 ++--
 aleksis/core/templates/core/index.html               |  4 ++--
 aleksis/core/templates/core/person/full.html         | 12 ++++++------
 aleksis/core/templates/core/person/list.html         |  4 ++--
 .../templates/oauth2_provider/application_list.html  |  2 +-
 aleksis/core/templates/search/search.html            |  2 +-
 .../core/templates/socialaccount/connections.html    |  2 +-
 .../templates/two_factor/core/backup_tokens.html     |  2 +-
 .../templates/two_factor/core/phone_register.html    |  2 +-
 aleksis/core/templates/two_factor/core/setup.html    |  2 +-
 .../templates/two_factor/core/setup_complete.html    |  2 +-
 .../core/templates/two_factor/profile/disable.html   |  2 +-
 .../core/templates/two_factor/profile/profile.html   | 10 +++++-----
 16 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/aleksis/core/templates/core/edit_dashboard.html b/aleksis/core/templates/core/edit_dashboard.html
index 09d9afd97..da50adeea 100644
--- a/aleksis/core/templates/core/edit_dashboard.html
+++ b/aleksis/core/templates/core/edit_dashboard.html
@@ -45,20 +45,20 @@
     {% include "core/partials/save_button.html" %}
   </form>
 
-  <h5>{% trans "Available widgets" %}</h5>
+  <h2>{% trans "Available widgets" %}</h2>
   <div class="row card-panel grey lighten-3" id="not-used-widgets">
     {% for widget in not_used_widgets %}
       {% include "core/partials/edit_dashboard_widget.html" %}
     {% endfor %}
   </div>
 
-  <h5>
+  <h2>
     {% if not default_dashboard %}
       {% trans "Your dashboard" %}
     {% else %}
       {% trans "Default dashboard" %}
     {% endif %}
-  </h5>
+  </h2>
 
   <div class="row card-panel grey lighten-3" id="widgets">
     {% for widget in widgets %}
diff --git a/aleksis/core/templates/core/group/child_groups.html b/aleksis/core/templates/core/group/child_groups.html
index bb5a429f6..900df71a5 100644
--- a/aleksis/core/templates/core/group/child_groups.html
+++ b/aleksis/core/templates/core/group/child_groups.html
@@ -36,7 +36,7 @@
       </a>
     </form>
 
-    <h5>{% trans "Currently selected groups" %}</h5>
+    <h2>{% trans "Currently selected groups" %}</h2>
 
     {% for group in filter.qs %}
       <div class="chip">
diff --git a/aleksis/core/templates/core/group/full.html b/aleksis/core/templates/core/group/full.html
index 32a3791d2..65d94ad13 100644
--- a/aleksis/core/templates/core/group/full.html
+++ b/aleksis/core/templates/core/group/full.html
@@ -9,7 +9,7 @@
 {% block browser_title %}{{ group.name }}{% endblock %}
 
 {% block content %}
-  <h4>{{ group.name }} <small class="grey-text">{{ group.short_name }}</small></h4>
+  <h1>{{ group.name }} <small class="grey-text">{{ group.short_name }}</small></h1>
 
   {% has_perm 'core.edit_group_rule' user group as can_change_group %}
   {% has_perm 'core.change_group_preferences_rule' user group as can_change_group_preferences %}
@@ -61,7 +61,7 @@
   </table>
 
   {% if can_view_group_stats %}
-    <h5>{% blocktrans %}Statistics{% endblocktrans %}</h5>
+    <h2>{% blocktrans %}Statistics{% endblocktrans %}</h2>
     <ul>
       <li>
         {% trans "Count of members" %}: {{ stats.members }}
@@ -79,10 +79,10 @@
     </ul>
   {% endif %}
 
-  <h5>{% blocktrans %}Owners{% endblocktrans %}</h5>
+  <h2>{% blocktrans %}Owners{% endblocktrans %}</h2>
   {% render_table owners_table %}
 
-  <h5>{% blocktrans %}Members{% endblocktrans %}</h5>
+  <h2>{% blocktrans %}Members{% endblocktrans %}</h2>
   {% render_table members_table %}
 
 {% endblock %}
diff --git a/aleksis/core/templates/core/group/list.html b/aleksis/core/templates/core/group/list.html
index 436b193e7..9fe2c925f 100644
--- a/aleksis/core/templates/core/group/list.html
+++ b/aleksis/core/templates/core/group/list.html
@@ -14,7 +14,7 @@
     {% trans "Create group" %}
   </a>
 
-  <h5>{% trans "Filter groups" %}</h5>
+  <h2>{% trans "Filter groups" %}</h2>
   <form method="get">
     {% form form=groups_filter.form %}{% endform %}
     {% trans "Search" as caption %}
@@ -25,6 +25,6 @@
     </button>
   </form>
 
-  <h5>{% trans "Selected groups" %}</h5>
+  <h2>{% trans "Selected groups" %}</h2>
   {% render_table groups_table %}
 {% endblock %}
diff --git a/aleksis/core/templates/core/index.html b/aleksis/core/templates/core/index.html
index 6bbbab8ec..9a0e1fc3c 100644
--- a/aleksis/core/templates/core/index.html
+++ b/aleksis/core/templates/core/index.html
@@ -58,7 +58,7 @@
   {% if activities or notifications %}
     <div class="row">
       <div class="col s12 m6">
-        <h5>{% blocktrans %}Last activities{% endblocktrans %}</h5>
+        <h2>{% blocktrans %}Last activities{% endblocktrans %}</h2>
 
         {% if activities %}
           <ul class="collection">
@@ -81,7 +81,7 @@
       </div>
 
       <div class="col s12 m6">
-        <h5>{% blocktrans %}Recent notifications{% endblocktrans %}</h5>
+        <h2>{% blocktrans %}Recent notifications{% endblocktrans %}</h2>
 
         {% if notifications %}
           <ul class="collection">
diff --git a/aleksis/core/templates/core/person/full.html b/aleksis/core/templates/core/person/full.html
index 2b2ba3fb0..6d4819466 100644
--- a/aleksis/core/templates/core/person/full.html
+++ b/aleksis/core/templates/core/person/full.html
@@ -8,7 +8,7 @@
 {% block browser_title %}{{ person.first_name }} {{ person.last_name }}{% endblock %}
 
 {% block content %}
-  <h4>{{ person.first_name }} {{ person.last_name }}</h4>
+  <h1>{{ person.first_name }} {{ person.last_name }}</h1>
 
   {% has_perm 'core.edit_person_rule' user person as can_change_person %}
   {% has_perm 'core.change_person_preferences_rule' user person as can_change_person_preferences %}
@@ -47,7 +47,7 @@
     </p>
   {% endif %}
 
-  <h5>{% blocktrans %}Contact details{% endblocktrans %}</h5>
+  <h2>{% blocktrans %}Contact details{% endblocktrans %}</h2>
   <div class="row">
     <div class="col s12 m4">
       {% has_perm 'core.view_photo_rule' user person as can_view_photo %}
@@ -117,7 +117,7 @@
     </div>
     {% if person.description %}
       <div class="col s12 m12">
-        <h5>{% trans "Description" %}</h5>
+        <h2>{% trans "Description" %}</h2>
         <p>
           {{ person.description }}
         </p>
@@ -127,21 +127,21 @@
 
   {% if person.children.all and can_view_personal_details %}
     <div class="col s12 m12">
-      <h5>{% trans "Children" %}</h5>
+      <h2>{% trans "Children" %}</h2>
       {% include "core/person/collection.html" with persons=person.children.all %}
     </div>
   {% endif %}
 
   {% if person.guardians.all and can_view_personal_details %}
     <div class="col s12 m12">
-      <h5>{% trans "Guardians / Parents" %}</h5>
+      <h2>{% trans "Guardians / Parents" %}</h2>
       {% include "core/person/collection.html" with persons=person.guardians.all %}
     </div>
   {% endif %}
 
   {% has_perm 'core.view_person_groups_rule' user person as can_view_groups %}
   {% if can_view_groups %}
-    <h5>{% blocktrans %}Groups{% endblocktrans %}</h5>
+    <h2>{% blocktrans %}Groups{% endblocktrans %}</h2>
     {% render_table groups_table %}
   {% endif %}
 {% endblock %}
diff --git a/aleksis/core/templates/core/person/list.html b/aleksis/core/templates/core/person/list.html
index f91e2ef05..ca441cac4 100644
--- a/aleksis/core/templates/core/person/list.html
+++ b/aleksis/core/templates/core/person/list.html
@@ -18,7 +18,7 @@
     </a>
   {% endif %}
 
-  <h5>{% trans "Filter persons" %}</h5>
+  <h2>{% trans "Filter persons" %}</h2>
   <form method="get">
     {% form form=persons_filter.form %}{% endform %}
     {% trans "Search" as caption %}
@@ -29,6 +29,6 @@
     </button>
   </form>
 
-  <h5>{% trans "Selected persons" %}</h5>
+  <h2>{% trans "Selected persons" %}</h2>
   {% render_table persons_table %}
 {% endblock %}
diff --git a/aleksis/core/templates/oauth2_provider/application_list.html b/aleksis/core/templates/oauth2_provider/application_list.html
index 8893f3476..4b999bef2 100644
--- a/aleksis/core/templates/oauth2_provider/application_list.html
+++ b/aleksis/core/templates/oauth2_provider/application_list.html
@@ -5,7 +5,7 @@
 {% block browser_title %}{% blocktrans %}OAuth2 Applications{% endblocktrans %}{% endblock %}
 
 {% block content %}
-  <h4>{% blocktrans %}OAuth2 applications{% endblocktrans %}</h4>
+  <h1>{% blocktrans %}OAuth2 applications{% endblocktrans %}</h1>
   <a href="{% url "oauth2_provider:register" %}" class="btn green waves-effect
   waves-light">
     <i class="material-icons left">add</i>
diff --git a/aleksis/core/templates/search/search.html b/aleksis/core/templates/search/search.html
index 514661df4..5af1e55cc 100644
--- a/aleksis/core/templates/search/search.html
+++ b/aleksis/core/templates/search/search.html
@@ -23,7 +23,7 @@
       </button>
     </p>
 
-    <h5>{% trans "Results" %}</h5>
+    <h2>{% trans "Results" %}</h2>
 
     {% if query %}
       <div class="collection">
diff --git a/aleksis/core/templates/socialaccount/connections.html b/aleksis/core/templates/socialaccount/connections.html
index 1ff2c2eb6..2339be7e0 100644
--- a/aleksis/core/templates/socialaccount/connections.html
+++ b/aleksis/core/templates/socialaccount/connections.html
@@ -34,7 +34,7 @@
     <p>{% trans 'You currently have no third-party accounts connected to this account.' %}</p>
   {% endif %}
 
-  <h5>{% trans 'Add a Third-party Account' %}</h5>
+  <h2>{% trans 'Add a Third-party Account' %}</h2>
 
   {% include "socialaccount/snippets/provider_list.html" with process="connect" %}
 
diff --git a/aleksis/core/templates/two_factor/core/backup_tokens.html b/aleksis/core/templates/two_factor/core/backup_tokens.html
index 84d6ef680..b85450747 100644
--- a/aleksis/core/templates/two_factor/core/backup_tokens.html
+++ b/aleksis/core/templates/two_factor/core/backup_tokens.html
@@ -6,7 +6,7 @@
 {% endblock %}
 
 {% block content %}
-  <h4>{% block title %}{% trans "Backup Tokens" %}{% endblock %}</h4>
+  <h1>{% block title %}{% trans "Backup Tokens" %}{% endblock %}</h1>
 
   <div class="alert info">
     <p>
diff --git a/aleksis/core/templates/two_factor/core/phone_register.html b/aleksis/core/templates/two_factor/core/phone_register.html
index 4eae9ebfa..620cdd07b 100644
--- a/aleksis/core/templates/two_factor/core/phone_register.html
+++ b/aleksis/core/templates/two_factor/core/phone_register.html
@@ -6,7 +6,7 @@
 {% endblock %}
 
 {% block content %}
-  <h4>{% block title %}{% trans "Add Backup Phone" %}{% endblock %}</h4>
+  <h1>{% block title %}{% trans "Add Backup Phone" %}{% endblock %}</h1>
 
   {% if wizard.steps.current == 'setup' %}
     <p>{% blocktrans %}You'll be adding a backup phone number to your
diff --git a/aleksis/core/templates/two_factor/core/setup.html b/aleksis/core/templates/two_factor/core/setup.html
index 804840396..a0e30472d 100644
--- a/aleksis/core/templates/two_factor/core/setup.html
+++ b/aleksis/core/templates/two_factor/core/setup.html
@@ -2,7 +2,7 @@
 {% load i18n %}
 
 {% block content %}
-  <h4>{% block title %}{% trans "Enable Two-Factor Authentication" %}{% endblock %}</h4>
+  <h1>{% block title %}{% trans "Enable Two-Factor Authentication" %}{% endblock %}</h1>
 
   {% if wizard.steps.current == 'welcome' %}
     <p class="flow-text">
diff --git a/aleksis/core/templates/two_factor/core/setup_complete.html b/aleksis/core/templates/two_factor/core/setup_complete.html
index 6520694bb..df3f5e93a 100644
--- a/aleksis/core/templates/two_factor/core/setup_complete.html
+++ b/aleksis/core/templates/two_factor/core/setup_complete.html
@@ -6,7 +6,7 @@
 {% endblock %}
 
 {% block content %}
-  <h4>{% block title %}{% trans "Two-Factor Authentication successfully enabled" %}{% endblock %}</h4>
+  <h1>{% block title %}{% trans "Two-Factor Authentication successfully enabled" %}{% endblock %}</h1>
 
   <div class="alert success">
     <p>
diff --git a/aleksis/core/templates/two_factor/profile/disable.html b/aleksis/core/templates/two_factor/profile/disable.html
index 36fa472b7..56bf20164 100644
--- a/aleksis/core/templates/two_factor/profile/disable.html
+++ b/aleksis/core/templates/two_factor/profile/disable.html
@@ -6,7 +6,7 @@
 {% endblock %}
 
 {% block content %}
-  <h4>{% block title %}{% trans "Disable Two-Factor Authentication" %}{% endblock %}</h4>
+  <h1>{% block title %}{% trans "Disable Two-Factor Authentication" %}{% endblock %}</h1>
 
   <p class="flow-text">
     {% blocktrans trimmed %}
diff --git a/aleksis/core/templates/two_factor/profile/profile.html b/aleksis/core/templates/two_factor/profile/profile.html
index 4161becad..eaaa0ff6a 100644
--- a/aleksis/core/templates/two_factor/profile/profile.html
+++ b/aleksis/core/templates/two_factor/profile/profile.html
@@ -6,9 +6,9 @@
 {% endblock %}
 
 {% block content %}
-  <h4>
+  <h1>
     {% block title %}{% trans "Account Security" %}{% endblock %}
-  </h4>
+  </h1>
 
   {% if default_device %}
     {% if default_device_type == 'TOTPDevice' %}
@@ -20,7 +20,7 @@
     {% endif %}
 
     {% if available_phone_methods %}
-      <h5>{% trans "Backup Phone Numbers" %}</h5>
+      <h2>{% trans "Backup Phone Numbers" %}</h2>
       <p>{% blocktrans %}If your primary method is not available, we are able to
         send backup tokens to the phone numbers listed below.{% endblocktrans %}</p>
       <ul class="collection">
@@ -43,7 +43,7 @@
       </p>
     {% endif %}
 
-    <h5>{% trans "Backup Tokens" %}</h5>
+    <h2>{% trans "Backup Tokens" %}</h2>
     <p>
       {% blocktrans %}If you don't have any device with you, you can access
         your account using backup tokens.{% endblocktrans %}
@@ -60,7 +60,7 @@
       </a>
     </p>
 
-    <h5>{% trans "Disable Two-Factor Authentication" %}</h5>
+    <h2>{% trans "Disable Two-Factor Authentication" %}</h2>
     <p>
       {% blocktrans %}
         However we strongly discourage you to do so, you can
-- 
GitLab


From 5898192170e2d9136548ddc3b64a1f64796db30f Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Fri, 11 Jun 2021 21:57:47 +0200
Subject: [PATCH 5/7] Adjust font-weight

---
 aleksis/core/static/style.scss | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/core/static/style.scss b/aleksis/core/static/style.scss
index 90906b995..8ba916f94 100644
--- a/aleksis/core/static/style.scss
+++ b/aleksis/core/static/style.scss
@@ -276,7 +276,7 @@ ul.footer-ul {
 //////////////
 
 h1 {
-  font-weight: 200;
+  font-weight: 300;
   font-style: normal;
   font-size: 3.6rem;
   line-height: 110%;
-- 
GitLab


From e2a827cb7887ccf14bc66468f6d83dcc120e6397 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Thu, 17 Jun 2021 18:09:26 +0200
Subject: [PATCH 6/7] Update CHANGELOG.rst

---
 CHANGELOG.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index cf73b2ef1..7750d9878 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,7 @@ Changed
 * Add verbose names for all openid connect scopes and show them in grant
   view.
 * Include public dashboard in navigation
+* Use semantically correct html elements for headings and alerts.
 
 Fixed
 ~~~~~
-- 
GitLab


From 3bc5a44d56b08e861e77d4a5d6b7627ffd48fb00 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Fri, 18 Jun 2021 12:21:32 +0200
Subject: [PATCH 7/7] Use correct Roboto font variants in base_print.html

---
 aleksis/core/templates/core/base_print.html | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/aleksis/core/templates/core/base_print.html b/aleksis/core/templates/core/base_print.html
index 9539808f9..7691cdf80 100644
--- a/aleksis/core/templates/core/base_print.html
+++ b/aleksis/core/templates/core/base_print.html
@@ -15,7 +15,12 @@
   </title>
 
   {% include_css "material-design-icons" %}
-  {% include_css "Roboto" %}
+  {% include_css "Roboto100" %}
+  {% include_css "Roboto300" %}
+  {% include_css "Roboto400" %}
+  {% include_css "Roboto500" %}
+  {% include_css "Roboto700" %}
+  {% include_css "Roboto900" %}
   {% include_css "paper-css" %}
   <link rel="stylesheet" href="{% sass_src 'style.scss' %}"/>
   <link rel="stylesheet" href="{% static "print.css" %}"/>
-- 
GitLab