From 0c39fbd90ed3a9f6e0fb116dc97ff1c75df7467c Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 29 Sep 2022 12:29:59 -0400 Subject: [PATCH] css: Upgrade to Bootstrap 5 to be able to use offcanvas for filters on small screens #241 --- data_registry/templates/base.html | 18 ++-- data_registry/templates/detail.html | 54 +++++------ data_registry/templates/header.html | 6 +- .../templates/includes/check_icon.html | 4 +- .../templates/includes/checkboxes.html | 8 +- .../templates/includes/radiobuttons.html | 8 +- data_registry/templates/index.html | 14 +-- data_registry/templates/search.html | 18 ++-- package-lock.json | 76 ++++++++++++--- package.json | 2 +- src/scss/_custom.scss | 20 +++- src/scss/main.scss | 95 +++++++------------ 12 files changed, 178 insertions(+), 145 deletions(-) diff --git a/data_registry/templates/base.html b/data_registry/templates/base.html index 7ae1b198..f6969292 100644 --- a/data_registry/templates/base.html +++ b/data_registry/templates/base.html @@ -23,7 +23,7 @@ {% block content %}{% endblock %} -
+
@@ -32,30 +32,30 @@
-
+

{% translate "Contact" %}

- + engage@open-contracting.org

@@ -138,7 +138,7 @@

{% translate "Open Contracting Partnership" %} {% now "Y" %} - {% translate "Terms" %} + {% translate "Terms" %}

diff --git a/data_registry/templates/detail.html b/data_registry/templates/detail.html index a973367d..0636aefc 100644 --- a/data_registry/templates/detail.html +++ b/data_registry/templates/detail.html @@ -52,8 +52,8 @@ {% block content %}
@@ -82,23 +82,23 @@

{{ collection.country }}: {{ collection.title }}

{# No stretch #}

{% translate "Available formats:" %}

-
+
{% include "includes/check_icon.html" with checked=files.jsonl.years size="24px" only %} JSON
-
+
{% include "includes/check_icon.html" with checked=files.xlsx.years size="24px" only %} Excel
-
+
{% include "includes/check_icon.html" with checked=files.csv.years size="24px" only %} CSV
@@ -134,7 +134,7 @@

{% translate "Overview" %}

{% if collection.license_custom %} {{ collection.license_custom.name }} -
+
{{ collection.license_custom.description|markdownify }}
{% else %} @@ -158,21 +158,21 @@

{% translate "Data avaliable" %}

{% include "includes/check_icon.html" with checked=job.parties_count only %}{% translate "Parties" %}

-
+
{% translate "Count of parties:" %}
{{ job.parties_count|intcomma }}

{% include "includes/check_icon.html" with checked=job.plannings_count only %}{% translate "Plannings" %}

-
+
{% translate "Count of planning activities:" %}
{{ job.plannings_count|intcomma }}

{% include "includes/check_icon.html" with checked=job.tenders_count only %}{% translate "Tenders" %}

-
+
{% translate "Count of tenders:" %}
{{ job.tenders_count|intcomma }} @@ -185,7 +185,7 @@

{% include "includes/check_icon.html" with checked=job.tenders_co

{% include "includes/check_icon.html" with checked=job.awards_count only %}{% translate "Awards" %}

-
+
{% translate "Count of awards:" %}
{{ job.awards_count|intcomma }} @@ -198,7 +198,7 @@

{% include "includes/check_icon.html" with checked=job.awards_cou

{% include "includes/check_icon.html" with checked=job.contracts_count only %}{% translate "Contracts" %}

-
+
{% translate "Count of contracts:" %}
{{ job.contracts_count|intcomma }} @@ -211,35 +211,35 @@

{% include "includes/check_icon.html" with checked=job.contracts_

{% include "includes/check_icon.html" with checked=job.documents_count only %}{% translate "Documents" %}

-
+
{% translate "Count of documents:" %}
{{ job.documents_count|intcomma }}

{% include "includes/check_icon.html" with checked=job.milestones_count only %}{% translate "Milestones" %}

-
+
{% translate "Count of milestones:" %}
{{ job.milestones_count|intcomma }}

{% include "includes/check_icon.html" with checked=job.amendments_count only %}{% translate "Amendments" %}

-
+
{% translate "Count of amendments:" %}
{{ job.amendments_count|intcomma }}
{% else %} -

+

{% translate "This dataset has not yet been retrieved." %}

{% endif %} {% if collection.additional_data %} -
-
+
+
{# https://icons.getbootstrap.com/icons/gem/ #} @@ -261,7 +261,7 @@

{% translate "Data quality" %}

{% translate "Summary" %}

-
+
{% if collection.summary %}
{{ collection.summary|markdownify }} @@ -272,7 +272,7 @@

{% translate "Summary" %}

{% if collection.last_reviewed %} -

+

{% translate "Last reviewed:" %} {{ collection.last_reviewed|date:"M Y" }}

{% endif %} @@ -284,7 +284,7 @@

{% translate "Issues found" %}

{% for issue in collection.issues %}
  • {# https://icons.getbootstrap.com/icons/exclamation-circle/ #} - + @@ -297,7 +297,7 @@

    {% translate "Issues found" %}

  • -
    +

    {% translate "Access data" %}

    {% translate "This OCDS dataset is available for download in JSON, Excel or CSV format. You can download the data for contracting processes in a specific year or for all time." %}

    @@ -349,11 +349,11 @@

    CSV

    -
    +
    diff --git a/data_registry/templates/header.html b/data_registry/templates/header.html index 7c3afb5a..f91e3400 100644 --- a/data_registry/templates/header.html +++ b/data_registry/templates/header.html @@ -19,11 +19,11 @@
    -
    +
    {# https://docs.djangoproject.com/en/4.0/topics/i18n/translation/#the-set-language-redirect-view #}
    - {% for language in languages %}
    diff --git a/data_registry/templates/includes/check_icon.html b/data_registry/templates/includes/check_icon.html index bc57c2e9..f069c3fe 100644 --- a/data_registry/templates/includes/check_icon.html +++ b/data_registry/templates/includes/check_icon.html @@ -1,13 +1,13 @@ {% spaceless %} {% if checked %} {# https://icons.getbootstrap.com/icons/check-circle/ #} - + {% else %} {# https://icons.getbootstrap.com/icons/x-circle/ #} - + diff --git a/data_registry/templates/includes/checkboxes.html b/data_registry/templates/includes/checkboxes.html index 4962f431..f02c06b5 100644 --- a/data_registry/templates/includes/checkboxes.html +++ b/data_registry/templates/includes/checkboxes.html @@ -3,12 +3,12 @@

    {{ title }}

    {% for value, label in items %} -
    - -