From a8e904400d35208b09cb39c70f74eb0bc55d3355 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 23 Aug 2023 17:43:03 +0300 Subject: [PATCH] fix: Color agenda table row based on AD position (#6192) Fixes #6184 --- ietf/static/css/ietf.scss | 86 +++++++++++++---- .../doc/search/search_result_row.html | 96 +++++++++---------- ietf/templates/doc/search/status_columns.html | 2 +- 3 files changed, 116 insertions(+), 68 deletions(-) diff --git a/ietf/static/css/ietf.scss b/ietf/static/css/ietf.scss index 4f26a12df..06a0de80b 100644 --- a/ietf/static/css/ietf.scss +++ b/ietf/static/css/ietf.scss @@ -12,8 +12,28 @@ $popover-max-width: 100%; // Override default fonts -$font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -$font-family-monospace: "Noto Sans Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +$font-family-sans-serif: "Inter", +system-ui, +-apple-system, +"Segoe UI", +Roboto, +"Helvetica Neue", +"Noto Sans", +"Liberation Sans", +Arial, +sans-serif, +"Apple Color Emoji", +"Segoe UI Emoji", +"Segoe UI Symbol", +"Noto Color Emoji"; +$font-family-monospace: "Noto Sans Mono", +SFMono-Regular, +Menlo, +Monaco, +Consolas, +"Liberation Mono", +"Courier New", +monospace; // Enable color modes $color-mode-type: data; @@ -506,29 +526,57 @@ td.position-empty { border: none !important; } -tr.position-moretime-row, -tr.position-notready-row, -tr.position-discuss-row, -tr.position-block-row { - background-color: tint-color($color-discuss, 85%); +[data-bs-theme="light"] { + + tr.position-moretime-row, + tr.position-notready-row, + tr.position-discuss-row, + tr.position-block-row { + background-color: tint-color($color-discuss, 85%); + } + + tr.position-yes-row { + background-color: tint-color($color-yes, 75%); + } + + tr.position-noobj-row { + background-color: tint-color($color-noobj, 50%); + } + + tr.position-abstain-row { + background-color: tint-color($color-abstain, 85%); + } + + tr.position-recuse-row { + background-color: tint-color($color-recuse, 85%); + } } -tr.position-yes-row { - background-color: tint-color($color-yes, 75%); -} +[data-bs-theme="dark"] { -tr.position-noobj-row { - background-color: tint-color($color-noobj, 50%); -} + tr.position-moretime-row, + tr.position-notready-row, + tr.position-discuss-row, + tr.position-block-row { + background-color: shade-color($color-discuss, 85%); + } -tr.position-abstain-row { - background-color: tint-color($color-abstain, 85%); -} + tr.position-yes-row { + background-color: shade-color($color-yes, 75%); + } -tr.position-recuse-row { - background-color: tint-color($color-recuse, 85%); -} + tr.position-noobj-row { + background-color: shade-color($color-noobj, 75%); + } + tr.position-abstain-row { + background-color: shade-color($color-abstain, 85%); + } + + tr.position-recuse-row { + background-color: shade-color($color-recuse, 85%); + } +} /* === Edit Meeting Schedule ====================================== */ diff --git a/ietf/templates/doc/search/search_result_row.html b/ietf/templates/doc/search/search_result_row.html index b67d4ca58..9f2b12e9f 100644 --- a/ietf/templates/doc/search/search_result_row.html +++ b/ietf/templates/doc/search/search_result_row.html @@ -7,7 +7,7 @@ {% load person_filters %} {% load django_bootstrap5 %} - + {% if user.is_authenticated %} {% endfor %} - + {% if doc.pages %}{{ doc.pages }} page{{ doc.pages|pluralize }}{% endif %}
@@ -105,50 +105,50 @@
{% endif %} - - {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} - {% if doc.rev != "00" %} - - {% elif doc.replaces %} - - {% endif %} - {% endif %} - {% if doc.get_state_slug == "rfc" %} - {{ doc.latest_revision_date|date:"Y-m" }} - {% else %} - {{ doc.latest_revision_date|date:"Y-m-d" }} - {% endif %} - {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} - {% if doc.rev != "00" or doc.replaces %}{% endif %} - {% endif %} - {% if doc.latest_revision_date|timesince_days|new_enough:request %} -
-
- New -
- {% endif %} - {% if doc.get_state_slug == "active" and doc.expirable and doc.expires|timesince_days|expires_soon:request %} -
- Expires soon - {% endif %} - - {% include "doc/search/status_columns.html" %} - - {% if doc.related_ipr %} - - {{ doc.related_ipr|length }} - - {% endif %} - - {% if ad_name == None or ad_name != doc.ad.plain_name %} - - {% if doc.ad %} - {% person_link doc.ad title="Area Director" %} - {% endif %} -
- {% if doc.shepherd %} - {% email_person_link doc.shepherd title="Shepherd" class="small text-body-secondary" %} - {% endif %} - + + {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} + {% if doc.rev != "00" %} + + {% elif doc.replaces %} + {% endif %} - \ No newline at end of file + {% endif %} + {% if doc.get_state_slug == "rfc" %} + {{ doc.latest_revision_date|date:"Y-m" }} + {% else %} + {{ doc.latest_revision_date|date:"Y-m-d" }} + {% endif %} + {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} + {% if doc.rev != "00" or doc.replaces %}{% endif %} + {% endif %} + {% if doc.latest_revision_date|timesince_days|new_enough:request %} +
+
+ New +
+ {% endif %} + {% if doc.get_state_slug == "active" and doc.expirable and doc.expires|timesince_days|expires_soon:request %} +
+ Expires soon + {% endif %} + + {% include "doc/search/status_columns.html" %} + + {% if doc.related_ipr %} + + {{ doc.related_ipr|length }} + + {% endif %} + + {% if ad_name == None or ad_name != doc.ad.plain_name %} + + {% if doc.ad %} + {% person_link doc.ad title="Area Director" %} + {% endif %} +
+ {% if doc.shepherd %} + {% email_person_link doc.shepherd title="Shepherd" class="small text-body-secondary" %} + {% endif %} + + {% endif %} + \ No newline at end of file diff --git a/ietf/templates/doc/search/status_columns.html b/ietf/templates/doc/search/status_columns.html index aa0f04975..a126cc1a2 100644 --- a/ietf/templates/doc/search/status_columns.html +++ b/ietf/templates/doc/search/status_columns.html @@ -2,7 +2,7 @@ {% load origin %} {% origin %} {% load ietf_filters ballot_icon person_filters %} - +
{% ballot_icon doc %}
{% if not doc.get_state_slug == "rfc" %} {% if '::' in doc.friendly_state %}