From c5efd8662efd092a73c229507052486e13c34c73 Mon Sep 17 00:00:00 2001 From: Jay Guo Date: Thu, 24 Jul 2025 17:07:23 -0400 Subject: [PATCH 1/2] Update Virginia branding bar --- .../extended_themes/virginiaogda/templates/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/page.html b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/page.html index c58c0c5..65c9cae 100644 --- a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/page.html +++ b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/page.html @@ -2,5 +2,5 @@ {%- block scripts %} {{ super() }} - + {% endblock -%} From 4800679589d5e6336778c6123b850b55983ec355 Mon Sep 17 00:00:00 2001 From: Jay Guo Date: Mon, 28 Jul 2025 18:13:57 -0400 Subject: [PATCH 2/2] Improve a11y of Virginia homepage --- .../virginiaogda/public/css/custom.css | 56 ++++++++++++------- .../virginiaogda/public/css/custom.scss | 36 ++++++------ .../templates/home/snippets/package_item.html | 4 +- .../templates/home/snippets/stats.html | 31 ++++++---- .../opengov_custom_css/assets/css/theme.css | 3 + 5 files changed, 80 insertions(+), 50 deletions(-) diff --git a/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.css b/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.css index 5e6615e..ea35862 100644 --- a/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.css +++ b/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.css @@ -7,20 +7,30 @@ html, body { line-height: 1.5; } +body .va-agency-bar-container { + z-index: 10 !important; + direction: ltr !important; +} +.navbar-static-top { + z-index: 1 !important; +} +.site-footer .og-attribution .pull-left { + float: left !important; +} + h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 300 !important; font-family: "Montserrat", sans-serif !important; } /* - @media (min-width: 768px) { - #content.container { - width: 750px!important; - max-width: 100%!important; - } + #content.container { + width: 750px!important; + max-width: 100%!important; } - */ +} +*/ @media (min-width: 980px) { .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { max-width: 1200px !important; @@ -33,9 +43,9 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { width: 1170px!important; max-width: 1170px!important; } - } */ + .main-browse.stats { background: url(/img/networkparticles.svg); background-position: center; @@ -59,12 +69,17 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { border-radius: 40px; background-color: #77C5EB; padding: 12px; - margin: 1rem auto; + margin: 1rem; display: flex; align-items: center; justify-content: center; flex-direction: column; } +@media (max-width: 768px) { + .main-browse .module-content .cards .card { + margin: 1rem auto; + } +} .main-browse .module-content .cards .card .card-img-top { max-width: 100%; max-height: 128px; @@ -80,22 +95,21 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { padding: 0 15px; text-align: center; } -.main-browse .module-content .cards .card .card-body .card-title { +.main-browse .module-content .cards .card .card-body .card-text { position: relative; color: #000000; - font-size: 36px; - font-weight: lighter; margin: 0; } -.main-browse .module-content .cards .card .card-body .card-title span { - font-weight: lighter; +.main-browse .module-content .cards .card .card-body .card-text.stat-number { + font-weight: normal; + font-size: 36px; } -.main-browse .module-content .cards .card .card-body .card-text { - font-size: 21px; +.main-browse .module-content .cards .card .card-body .card-text.stat-label { font-weight: bold; - margin: 0; + font-size: 21px; } + /* Main Containers */ .main-browse .container .module-content h2, .main-featured .container .module-content h2, @@ -158,6 +172,10 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .main-showcase .container .module-content section .dataset-list .dataset-item:nth-child(n+3) { margin: 0; } +.main-featured .dataset-content, +.main-popular .dataset-content { + min-height: 235px; +} .main-browse .container .module-content section .dataset-list .dataset-item .dataset-content, .main-featured .container .module-content section .dataset-list .dataset-item .dataset-content, .main-popular .container .module-content section .dataset-list .dataset-item .dataset-content, @@ -186,7 +204,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .main-featured .container .module-content section .dataset-list .dataset-item .dataset-content h3.dataset-heading a:hover, .main-popular .container .module-content section .dataset-list .dataset-item .dataset-content h3.dataset-heading a:hover, .main-showcase .container .module-content section .dataset-list .dataset-item .dataset-content h3.dataset-heading a:hover { - color: rgba(255, 255, 255, 0.25); + text-decoration: underline; } .main-browse .container .module-content section .dataset-list .dataset-item .dataset-content h3.dataset-heading::after, .main-featured .container .module-content section .dataset-list .dataset-item .dataset-content h3.dataset-heading::after, @@ -249,7 +267,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin: 0 auto; } .main-groups .container .module-content .groups-wrapper .group-wrapper a.browse-group:hover { - text-decoration: none; + text-decoration: underline; color: #075A83; } .main-groups .container .module-content .groups-wrapper .group-wrapper a.browse-group img.browse-group-image { @@ -265,7 +283,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .main-groups .container .module-content .groups-wrapper .group-wrapper a.browse-group .browse-group-title { text-align: center; color: #206b82; - font-size: 30px; + font-size: 24px; } aside.secondary .module-narrow .context-info .module-content h1 { diff --git a/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.scss b/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.scss index ac60b57..6385793 100644 --- a/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.scss +++ b/ckanext/opendata_theme/extended_themes/virginiaogda/public/css/custom.scss @@ -3,40 +3,38 @@ /*Overwrite */ html, body { - font-family: 'Montserrat', sans-serif!important; - font-size: 16px; - font-weight: normal; - line-height: 1.5; + font-family: 'Montserrat', sans-serif!important; + font-size: 16px; + font-weight: normal; + line-height: 1.5; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { - font-weight: 300!important; - font-family: 'Montserrat', sans-serif!important; + font-weight: 300!important; + font-family: 'Montserrat', sans-serif!important; } -/* +/* @media (min-width: 768px) { #content.container { - width: 750px!important; - max-width: 100%!important; + width: 750px!important; + max-width: 100%!important; } - } - */ +} +*/ @media (min-width: 980px) { .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { max-width: 1200px!important; width: 100%!important; } } - /* - @media (min-width: 1200px) { +/* +@media (min-width: 1200px) { #content.container { - width: 1170px!important; - max-width: 1170px!important; + width: 1170px!important; + max-width: 1170px!important; } - - } - */ - +} +*/ .main-browse .module-content .cards { display: flex; diff --git a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/package_item.html b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/package_item.html index ca69ce7..4aebb4b 100644 --- a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/package_item.html +++ b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/package_item.html @@ -13,7 +13,7 @@

{% endif %} {% endblock %} {% block heading_title %} - {{ h.link_to(h.truncate(package.get('title'), 35), h.url_for('dataset.read', id=package.get('name'))) }} + {{ h.link_to(h.truncate(package.get('title'), 45), h.url_for('dataset.read', id=package.get('name'))) }} {% endblock %} {% block heading_meta %} {% if package.get('state', '').startswith('draft') %} @@ -23,7 +23,7 @@

{% endif %} {% endblock %}

-

{{ h.truncate(package.get('notes'), 80) }}

+

{{ h.truncate(package.get('notes'), 90) }}

{% endblock %} {% endblock %} diff --git a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/stats.html b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/stats.html index 892921d..abe845b 100644 --- a/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/stats.html +++ b/ckanext/opendata_theme/extended_themes/virginiaogda/templates/home/snippets/stats.html @@ -7,26 +7,37 @@
-
+
Data mine icon
-
{{ h.SI_number_span(stats.dataset_count) }}
-

Datasets Available

+ +
-
+
Data analysis icon
-
{{ h.SI_number_span(data.get('total_resources')) }}
-

Total Resources

+ +
- -
+
Data icon
-
{{ h.SI_number_span(stats.organization_count) }}
-

Total Organizations

+ +
diff --git a/ckanext/opendata_theme/opengov_custom_css/assets/css/theme.css b/ckanext/opendata_theme/opengov_custom_css/assets/css/theme.css index 76a3104..e8efb0b 100644 --- a/ckanext/opendata_theme/opengov_custom_css/assets/css/theme.css +++ b/ckanext/opendata_theme/opengov_custom_css/assets/css/theme.css @@ -54,6 +54,9 @@ p a, .btn.og-login { background-color: #165cab !important; } +.context-info .description { + word-break: break-word; +} .stages { color: #616365; }