From 8cc863261f60b180b7872101553ab43962ac86f5 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Thu, 12 Oct 2023 17:12:57 +0300 Subject: [PATCH 1/9] fix: More dark mode fixes This first commit increases contrast of the leftmenu text. --- ietf/static/css/ietf.scss | 4 +- ietf/templates/base/menu.html | 90 +++++++++++++++--------------- ietf/templates/base/menu_user.html | 50 ++++++++--------- ietf/templates/base/menu_wg.html | 2 +- 4 files changed, 73 insertions(+), 73 deletions(-) diff --git a/ietf/static/css/ietf.scss b/ietf/static/css/ietf.scss index 06a0de80b24..9a749b5a54a 100644 --- a/ietf/static/css/ietf.scss +++ b/ietf/static/css/ietf.scss @@ -205,8 +205,8 @@ pre { --#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg}; --#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y}; --#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow}; - --#{$prefix}dropdown-link-color: #{$dropdown-link-color}; - --#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color}; + --#{$prefix}dropdown-link-color: #{$nav-link-color}; + --#{$prefix}dropdown-link-hover-color: #{$nav-link-hover-color}; --#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg}; --#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color}; --#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg}; diff --git a/ietf/templates/base/menu.html b/ietf/templates/base/menu.html index 2f88aadca8f..f373d00f34e 100644 --- a/ietf/templates/base/menu.html +++ b/ietf/templates/base/menu.html @@ -22,7 +22,7 @@ {% if flavor == 'top' %}{% endif %} {% wg_menu flavor %}
  • - Other @@ -31,19 +31,19 @@ {% if flavor == 'top' %}
  • {% endif %}
  • New work
  • - Chartering groups
  • - BOFs
  • - BOF Requests @@ -51,13 +51,13 @@ {% if flavor == 'top' %}
  • {% endif %}
  • Other groups
  • - Concluded groups
  • - Non-WG lists @@ -81,32 +81,32 @@
  • {% endif %}
  • - Search
  • - Recent I-Ds
  • - I-D submission
  • - IESG dashboard
  • {% if user and user.is_authenticated %}
  • - My tracked docs @@ -114,7 +114,7 @@ {% if user|has_role:"Area Director,Secretariat" %} {% if flavor == 'top' %}
  • {% endif %}
  • - RFC status changes @@ -122,7 +122,7 @@ {% endif %} {% if flavor == 'top' %}
  • {% endif %}
  • - IRSG ballot status @@ -131,14 +131,14 @@ {% if flavor == 'top' %}
  • {% endif %}
  • Manage
  • - Approve an I-D
  • {% for g in user|docman_groups %}
  • - {{ g.acronym }} {{ g.type.slug }} docs @@ -146,7 +146,7 @@ {% endfor %} {% for g in user|matman_groups %}
  • - {{ g.acronym }} {{ g.type.slug }} meetings @@ -163,7 +163,7 @@
  • {% for g in user|managed_review_groups %}
  • - {{ g.acronym }} reviews @@ -180,7 +180,7 @@
  • {% for nomcom in nomcoms %}
  • - {{ nomcom|capfirst }} @@ -196,25 +196,25 @@ RFC streams
  • - IAB
  • - IRTF
  • - ISE
  • - Editorial @@ -240,43 +240,43 @@
  • {% endif %}
  • - Agenda
  • - Materials
  • - Floor plan
  • - Registration
  • - Important dates
  • - Request a session
  • - Session requests @@ -291,7 +291,7 @@
  • {% endif %}
  • - Upcoming meetings @@ -306,13 +306,13 @@
  • {% endif %}
  • - Past meetings
  • - Meeting proceedings @@ -338,56 +338,56 @@
  • {% endif %}
  • - IPR disclosures
  • - Liaison statements
  • - IESG agenda
  • - NomComs
  • - Downref registry
  • - Statistics
  • - Tutorials
  • - API Help
  • - Release notes @@ -418,7 +418,7 @@
  • {% endif %}
  • - diff --git a/ietf/templates/base/menu_user.html b/ietf/templates/base/menu_user.html index 9e6bbde56a7..e731307f2b4 100644 --- a/ietf/templates/base/menu_user.html +++ b/ietf/templates/base/menu_user.html @@ -23,7 +23,7 @@ {% url 'django.contrib.auth.views.logout' as logout_url %} {% if request.get_full_path == logout_url %}
  • - Sign in @@ -34,14 +34,14 @@
  • {% csrf_token %} -
  • - Account info @@ -49,35 +49,35 @@
  • {% if user and user.person %}
  • - Public profile page
  • {% endif %}
  • - Preferences
  • - API keys
  • - Change password
  • - Change username @@ -85,21 +85,21 @@
  • {% else %}
  • - Sign in
  • - Password reset
  • - Preferences @@ -109,7 +109,7 @@ {% endif %} {% if not request.user.is_authenticated %}
  • - New account @@ -117,7 +117,7 @@ {% endif %} {% if user|has_role:"Reviewer" %}
  • - My reviews @@ -127,31 +127,31 @@ {% if flavor == "top" %}
  • {% endif %}
  • AD dashboard
  • - My docs
  • - Next telechat
  • - Discusses
  • - Milestone review
  • - Last Call docs @@ -163,31 +163,31 @@ IETF secretariat
  • - Telechat dates
  • - Management items
  • - Milestones
  • - Sync discrepancies
  • - Account allowlist @@ -202,7 +202,7 @@ IANA
  • - Sync discrepancies @@ -217,7 +217,7 @@ RFC Editor
  • - Sync discrepancies diff --git a/ietf/templates/base/menu_wg.html b/ietf/templates/base/menu_wg.html index 3ab7ca399bf..09fef8c7b00 100644 --- a/ietf/templates/base/menu_wg.html +++ b/ietf/templates/base/menu_wg.html @@ -3,7 +3,7 @@ {% origin %} {% for p in parents %}
  • - {{ p.short_name }} From 99b3c416e286e97fad617ccdf10d146f52ac61fc Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Thu, 12 Oct 2023 17:19:29 +0300 Subject: [PATCH 2/9] Fix own ballot position highlight in dark mode --- ietf/static/css/ietf.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/static/css/ietf.scss b/ietf/static/css/ietf.scss index 9a749b5a54a..e1c9e9b837c 100644 --- a/ietf/static/css/ietf.scss +++ b/ietf/static/css/ietf.scss @@ -407,7 +407,7 @@ th, } .ballot-icon table .my { - border: calc(2 * $table-border-width) solid #000; + border: calc(2 * $table-border-width) solid var(--bs-emphasis-color); } // See https://getbootstrap.com/docs/5.1/customize/color/#all-colors From b7a9f68dc80b1b54c1dbb5dc67c113649098a7d9 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Thu, 12 Oct 2023 17:22:21 +0300 Subject: [PATCH 3/9] Fix dark mode axis color in timeline diagrams --- ietf/static/css/ietf.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/static/css/ietf.scss b/ietf/static/css/ietf.scss index e1c9e9b837c..90d77fa5d7e 100644 --- a/ietf/static/css/ietf.scss +++ b/ietf/static/css/ietf.scss @@ -351,7 +351,7 @@ th, .axis path, .axis line { fill: none; - stroke: black; + stroke: var(--bs-body-color); } .axis.y path, @@ -368,7 +368,7 @@ th, } .bar text { - fill: black; + fill: var(--bs-body-color); dominant-baseline: central; pointer-events: none; } From ce7af257f60a5b31a7475a7585590cfc8f0d9791 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 13 Oct 2023 18:06:31 +0300 Subject: [PATCH 4/9] Enable highcharts dark mode --- ietf/static/css/highcharts.scss | 1 + ietf/static/js/highcharts.js | 10 +--------- ietf/static/js/highstock.js | 9 +++++++++ ietf/templates/doc/stats/highstock.html | 2 ++ ietf/templates/group/active_areas.html | 3 +++ ietf/templates/group/group_about.html | 1 + ietf/templates/person/profile.html | 1 + ietf/templates/stats/document_stats.html | 1 + ietf/templates/stats/meeting_stats.html | 1 + ietf/templates/stats/review_stats.html | 1 + package.json | 1 + 11 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 ietf/static/css/highcharts.scss diff --git a/ietf/static/css/highcharts.scss b/ietf/static/css/highcharts.scss new file mode 100644 index 00000000000..c556f4e1186 --- /dev/null +++ b/ietf/static/css/highcharts.scss @@ -0,0 +1 @@ +@import "npm:highcharts/css/highcharts.css"; diff --git a/ietf/static/js/highcharts.js b/ietf/static/js/highcharts.js index 0b99f87a59f..268f96e50fb 100644 --- a/ietf/static/js/highcharts.js +++ b/ietf/static/js/highcharts.js @@ -13,17 +13,9 @@ Highcharts_Accessibility(Highcharts); Highcharts_Sunburst(Highcharts); Highcharts.setOptions({ - // use colors from https://colorbrewer2.org/#type=qualitative&scheme=Paired&n=12 - colors: ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', - '#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', - '#ffff99', '#b15928' - ], chart: { height: "100%", - style: { - fontFamily: getComputedStyle(document.body) - .getPropertyValue('--bs-body-font-family') - } + styledMode: true, }, credits: { enabled: false diff --git a/ietf/static/js/highstock.js b/ietf/static/js/highstock.js index e1965acb625..15ddb5ef9cb 100644 --- a/ietf/static/js/highstock.js +++ b/ietf/static/js/highstock.js @@ -10,4 +10,13 @@ Highcharts_Offline_Exporting(Highcharts); Highcharts_Export_Data(Highcharts); Highcharts_Accessibility(Highcharts); +Highcharts.setOptions({ + chart: { + styledMode: true, + }, + credits: { + enabled: false + }, +}); + window.Highcharts = Highcharts; diff --git a/ietf/templates/doc/stats/highstock.html b/ietf/templates/doc/stats/highstock.html index d6a36f58e1f..517dcf4b57e 100644 --- a/ietf/templates/doc/stats/highstock.html +++ b/ietf/templates/doc/stats/highstock.html @@ -3,6 +3,8 @@ {% load origin %} {% load static %} {% load ietf_filters %} + +{% endblock %} {% block js %}