diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_join_logic.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_join_logic.py index 57dca8770d..f112a51759 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_join_logic.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_join_logic.py @@ -37,7 +37,7 @@ def _fetch_org_list_metadata(self): if len(self.all_org_list) > 0: for o in self.all_org_list: - if not o.get('closed_organization'): + if not o.get('closed_organization') and o.get('request_membership') != 'false': self.active_org_dict[o.get('id')] = o.get('display_name') else: self.inactive_org_dict[o.get('id')] = o.get('display_name') diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_request_logic.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_request_logic.py index 7433952e8a..b34e524293 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_request_logic.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/controller_logic/organization_request_logic.py @@ -17,15 +17,15 @@ @validator_args -def request_new_organization_schema(not_empty, ignore_missing, hdx_url_validator): +def request_new_organization_schema(not_empty, ignore_missing): schema = { 'name': [not_empty, unicode_safe], 'description': [not_empty, unicode_safe], - 'website': [ignore_missing, unicode_safe, hdx_url_validator], + 'website': [ignore_missing, unicode_safe], 'role': [not_empty, unicode_safe], 'data_type': [not_empty, unicode_safe], 'data_already_available': [not_empty, unicode_safe], - 'data_already_available_link': [ignore_missing, unicode_safe, hdx_url_validator], + 'data_already_available_link': [ignore_missing, unicode_safe], } return schema diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/plugin.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/plugin.py index a5f1412ee6..96dff80b48 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/plugin.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/plugin.py @@ -108,7 +108,8 @@ def get_validators(self): def _modify_group_schema(self, schema): schema.update({ 'description': [tk.get_validator('not_empty')], - 'org_url': [tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')], + 'org_url': [tk.get_validator('not_missing'), tk.get_validator('hdx_url_validator'), + tk.get_converter('convert_to_extras')], 'fts_id': [tk.get_validator('hdx_org_keep_prev_value_if_empty_unless_sysadmin'), tk.get_validator('ignore_missing'), tk.get_converter('convert_to_extras')], diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_auth.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_auth.py index 6e28b20cb1..11fb6dc233 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_auth.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_auth.py @@ -195,7 +195,7 @@ def test_new_org_request(self): self._get_action('hdx_send_new_org_request')( {'model': model, 'session': model.Session}, {'title': 'Org Title', 'description': 'Org Description', - 'org_url': 'http://test-org.com/', + 'org_url': 'https://test-org.com/', 'your_name': 'Some Name', 'your_email': 'test@test.com'} ) assert False, 'anon user should not be allowed to send new org request' diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_org_custom_fields.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_org_custom_fields.py index bdaf01f1fb..084378e796 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_org_custom_fields.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_org_custom_fields.py @@ -34,7 +34,7 @@ def test_create_org_api(self): new_org_dict = { 'name': 'test_org_dd', 'title': 'Test Org D', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -48,7 +48,7 @@ def test_create_org_api(self): 'id': org_dict.get('id'), 'name': 'test_org_dd', 'title': 'Test Org DD', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -65,7 +65,7 @@ def test_fts_id_api(self): 'name': 'test_org_d', 'title': 'Test Org D', 'fts_id': '123456', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -163,7 +163,7 @@ def test_fts_is_controller(self): 'name': 'test_org_d', 'title': 'Test Org D', 'fts_id': '123456', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -189,7 +189,7 @@ def test_fts_is_controller(self): 'id': org_dict.get('id'), 'name': 'test_org_d', 'title': 'Test Org E', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -207,7 +207,7 @@ def test_fts_is_controller(self): 'name': 'test_org_d', 'title': 'Test Org E', 'fts_id': '789', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -240,7 +240,7 @@ def test_create_org_api(self): new_org_dict = { 'name': 'test_org_dd', 'title': 'Test Org D', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -254,7 +254,7 @@ def test_create_org_api(self): 'id': org_dict.get('id'), 'name': 'test_org_dd', 'title': 'Test Org DD', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -271,7 +271,7 @@ def test_user_survey_url_api(self): 'name': 'test_org_d', 'title': 'Test Org D', 'user_survey_url': self.USER_SURVEY_URL, - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -372,7 +372,7 @@ def test_user_survey_url_controller(self): 'name': 'test_org_d', 'title': 'Test Org D', 'user_survey_url': self.USER_SURVEY_URL, - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -398,7 +398,7 @@ def test_user_survey_url_controller(self): 'id': org_dict.get('id'), 'name': 'test_org_d', 'title': 'Test Org E', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -418,7 +418,7 @@ def test_user_survey_url_controller(self): 'name': 'test_org_d', 'title': 'Test Org E', 'user_survey_url': self.USER_SURVEY_UPDATED_URL, - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'save': 'save' @@ -452,7 +452,7 @@ def test_create_org_api(self): new_org_dict = { 'name': 'test_org_dd', 'title': 'Test Org D', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -467,7 +467,7 @@ def test_create_org_api(self): 'id': org_dict.get('id'), 'name': 'test_org_dd', 'title': 'Test Org DD', - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } @@ -486,7 +486,7 @@ def test_closed_organization_api(self): 'name': 'test_org_d', 'title': 'Test Org D', 'closed_organization': True, - 'org_url': 'www.exampleorganization.org', + 'org_url': 'https://www.exampleorganization.org', 'description': 'just a simple description', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1] } diff --git a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_request_organization.py b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_request_organization.py index e829b9ac27..d8b55ebb77 100644 --- a/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_request_organization.py +++ b/ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_request_organization.py @@ -133,16 +133,16 @@ def test_request_organization(self, _mail_new_membership_request, _check_request new_wrong_org_dict['data_already_available_link'] = 'www.no.com123' result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True) assert result.status_code == 200 - assert result.body.count('Please provide a valid URL') == 2 + assert result.body.count('Please provide a valid URL') == 0 new_wrong_org_dict['website'] = 'http://www.no.com' new_wrong_org_dict['data_already_available_link'] = 'http://www.no.com' result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True) assert result.status_code == 200 - assert result.body.count('Please provide a valid URL') == 2 + assert result.body.count('Please provide a valid URL') == 0 new_wrong_org_dict['website'] = 'no.com' new_wrong_org_dict['data_already_available_link'] = 'no.com' result = app.post(url, data=new_wrong_org_dict, extra_environ=auth_user, follow_redirects=True) assert result.status_code == 200 - assert result.body.count('Please provide a valid URL') == 2 + assert result.body.count('Please provide a valid URL') == 0 diff --git a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_create.py b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_create.py index cf06d7c79c..c02815de65 100644 --- a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_create.py +++ b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_create.py @@ -26,7 +26,7 @@ 'title': 'Hdx Test Org', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'org_acronym': 'HTO', - 'org_url': 'http://test-org.test', + 'org_url': 'https://test-org.test', 'description': 'This is a test organization', 'users': [{'name': 'testsysadmin'}, {'name': 'janedoe3'}] } @@ -130,7 +130,7 @@ def test_create_with_group(self): def test_create_dataset_as_normal_user(self): normal_user = factories.User() - org = factories.Organization(user=normal_user, org_url='http://test.local/', hdx_org_type='donor') + org = factories.Organization(user=normal_user, org_url='https://test.local/', hdx_org_type='donor') package = { 'package_creator': 'test function', diff --git a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_update.py b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_update.py index 2f36c72b2f..24e28d8f14 100644 --- a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_update.py +++ b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_package_update.py @@ -28,7 +28,7 @@ 'title': 'Hdx Test Org', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'org_acronym': 'HTO', - 'org_url': 'http://test-org.test', + 'org_url': 'https://test-org.test', 'description': 'This is a test organization', 'users': [{'name': 'testsysadmin', 'capacity': 'admin'}, {'name': 'joeadmin', 'capacity': 'admin'}] } diff --git a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_requestable_package_requests.py b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_requestable_package_requests.py index b1a999da2c..c68f6ebecb 100644 --- a/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_requestable_package_requests.py +++ b/ckanext-hdx_package/ckanext/hdx_package/tests/test_actions/test_requestable_package_requests.py @@ -47,7 +47,7 @@ 'title': 'Hdx Test Org', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'org_acronym': 'HTO', - 'org_url': 'http://test-org.test', + 'org_url': 'https://test-org.test', 'description': 'This is a test organization', 'users': [{'name': 'testsysadmin'}, {'name': 'tester', 'capacity': 'member'}] } diff --git a/ckanext-hdx_package/ckanext/hdx_package/tests/test_aws/hdx_s3_test_base.py b/ckanext-hdx_package/ckanext/hdx_package/tests/test_aws/hdx_s3_test_base.py index c0cafaff22..6773756f9f 100644 --- a/ckanext-hdx_package/ckanext/hdx_package/tests/test_aws/hdx_s3_test_base.py +++ b/ckanext-hdx_package/ckanext/hdx_package/tests/test_aws/hdx_s3_test_base.py @@ -115,7 +115,7 @@ def _create_package_by_user(cls, pkg_name, user, create_org_and_group=True): :rtype: str ''' if create_org_and_group: - factories.Organization(name='test_owner_org', org_url='http://example.org/', + factories.Organization(name='test_owner_org', org_url='https://example.org/', hdx_org_type=ORGANIZATION_TYPE_LIST[0][1], users=[{'name': 'testsysadmin', 'capacity': 'admin'}] ) diff --git a/ckanext-hdx_package/ckanext/hdx_package/tests/test_controller/test_contribute_flow.py b/ckanext-hdx_package/ckanext/hdx_package/tests/test_controller/test_contribute_flow.py index 42e432e792..460d2958c9 100644 --- a/ckanext-hdx_package/ckanext/hdx_package/tests/test_controller/test_contribute_flow.py +++ b/ckanext-hdx_package/ckanext/hdx_package/tests/test_controller/test_contribute_flow.py @@ -42,7 +42,7 @@ def _create_test_data(cls): 'title': 'Hdx Test Org', 'hdx_org_type': ORGANIZATION_TYPE_LIST[0][1], 'org_acronym': 'HTO', - 'org_url': 'http://test-org.test', + 'org_url': 'https://test-org.test', 'description': 'This is a test organization', 'users': [{'name': 'testsysadmin'}, {'name': 'janedoe3'}] } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.css index 1fd03d2d80..98f6aa24f2 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.css @@ -53,10 +53,22 @@ background: #1ebfb3; } #carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item { - width: 215px; + width: calc(100% - 50px); margin: auto; float: none; } +#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-image { + height: auto; +} +#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-image .graphic { + width: 100%; + height: auto; + aspect-ratio: 1.5; + border-radius: 6px; +} +#carousel-config-main .carousel-item .thumbnail-preview .thumbnail-container .sub-item .sub-item-action { + border-radius: 6px; +} #carousel-config-main .carousel-item .sub-item { width: 215px; margin-right: 40px; @@ -116,6 +128,8 @@ #carousel-config-main .carousel-item .sub-item .sub-item-caption { text-align: left; color: #fff; + height: 40px; + overflow: hidden; } #carousel-config-main .carousel-item .sub-item .sub-item-caption .description { font-family: 'Gotham-Book', sans-serif; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.js index e5dacd2568..79fc5ac10e 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.js +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/admin/carousel.js @@ -74,7 +74,7 @@ var html = this.template(template_data); this.$el.html(html); - this.$el.attr("class", this.model.attributes.tab_open ? 'col-12' : 'col-4'); + this.$el.attr("class", this.model.attributes.tab_open ? 'col-12' : 'col-6'); this.$el.find("select").select2(); return this; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/hdx-logo.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/hdx-logo.css index 8a2bf0f069..c215552f9f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/hdx-logo.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/hdx-logo.css @@ -15,12 +15,11 @@ display: block; } .hdxLogo .logo .logo-img { - background-image: url("/images/homepage/logo-hdx.svg"); + background-image: url("/images/homepage/logo-hdx-accr-blk.svg"); background-repeat: no-repeat; - background-size: 126px 31px; + background-position: left center; width: 126px; - height: 31px; - min-width: 126px; - min-height: 31px; + height: 30px; + margin-top: 1px; } /* END HDX Version display */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/_global-components.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/_global-components.css index 9596750b39..2a9eca9690 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/_global-components.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/_global-components.css @@ -1422,6 +1422,11 @@ ul.dataset-resources li + li.label-icons { font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -1454,6 +1459,16 @@ ul.dataset-resources li + li.label-icons { #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/util.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/util.css index 8304dc102d..b93c3902f3 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/util.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/components/header/util.css @@ -64,6 +64,11 @@ font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -96,6 +101,16 @@ #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/footer.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/footer.css index 04629e2a15..d4301a9b13 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/footer.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/footer.css @@ -64,11 +64,11 @@ line-height: 20px; } .hdx-footer .logo-gray { - height: 40px; + height: 30px; margin-bottom: 10px; } .hdx-footer .match-logo-margin { - margin-top: 50px; + margin-top: 40px; } @media (max-width: 768px) { .hdx-footer .match-logo-margin { @@ -76,7 +76,7 @@ } } .hdx-footer .other-services img { - max-height: 40px; + max-height: 30px; max-width: 100%; } .hdx-footer .other-services img.logo-hdx { diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css index 3b05fb8578..029eaa41e8 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css @@ -1728,6 +1728,11 @@ ul.dataset-resources li + li.label-icons { font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -1760,6 +1765,16 @@ ul.dataset-resources li + li.label-icons { #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { @@ -3207,11 +3222,11 @@ ul.list-horizontal li:first-child:before { line-height: 20px; } .hdx-footer .logo-gray { - height: 40px; + height: 30px; margin-bottom: 10px; } .hdx-footer .match-logo-margin { - margin-top: 50px; + margin-top: 40px; } @media (max-width: 768px) { .hdx-footer .match-logo-margin { @@ -3219,7 +3234,7 @@ ul.list-horizontal li:first-child:before { } } .hdx-footer .other-services img { - max-height: 40px; + max-height: 30px; max-width: 100%; } .hdx-footer .other-services img.logo-hdx { @@ -4161,13 +4176,12 @@ ul.list-horizontal li:first-child:before { display: block; } .hdxLogo .logo .logo-img { - background-image: url("/images/homepage/logo-hdx.svg"); + background-image: url("/images/homepage/logo-hdx-accr-blk.svg"); background-repeat: no-repeat; - background-size: 126px 31px; + background-position: left center; width: 126px; - height: 31px; - min-width: 126px; - min-height: 31px; + height: 30px; + margin-top: 1px; } /* END HDX Version display */ /* HEADER Search Widget */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/card.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/card.css new file mode 100644 index 0000000000..af2cb29ecd --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/card.css @@ -0,0 +1,54 @@ +.bem-card { + border-radius: 8px !important; + border: 1px solid #E1E4ED !important; + box-shadow: 0 1px 4px 0 #D1D5DB; +} +.bem-card__body { + padding: 28px 32px; +} +.bem-card__title { + font-family: 'Gotham-Bold', sans-serif; + font-weight: 400; + font-size: 20px; + font-style: normal; + line-height: 28px; +} +.bem-card__text { + color: #000; + font-family: 'Source Sans Pro', sans-serif; + font-size: 18px; + font-weight: 400; + line-height: 24px; +} +.bem-card__badge { + padding: 6px 12px; + font-size: 13px; + font-weight: normal; + font-family: 'Inter', sans-serif; + border-radius: 12px; + text-wrap: initial; +} +.bem-card__badge.text-bg-info { + background-color: #BCE3FE !important; +} +.bem-card__button { + font-family: 'Inter', sans-serif; + font-size: 16px; + font-weight: 600; + color: #007CE1; + text-decoration: none; +} +.bem-card__button:hover { + color: #0162DD; +} +.bem-card_type-slim { + border-radius: 0 !important; + border: 0 !important; + box-shadow: none; +} +.bem-card_type-slim .bem-card__body { + padding: 0; +} +.bem-card_type-slim .bem-card__title { + font-size: 18px; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/faq.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/faq.css new file mode 100644 index 0000000000..0dc39528ee --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/faq.css @@ -0,0 +1,26 @@ +.bem-faq__item { + border-top: 0; + border-left: 0; + border-right: 0; + border-radius: 0 !important; + border-bottom: 1px solid #000; +} +.bem-faq__question { + color: #000 !important; + font-family: 'Source Sans Pro', sans-serif; + font-size: 18px; + font-weight: 600; + line-height: 24px; + box-shadow: none !important; + background-color: transparent !important; + border-radius: 0 !important; +} +.bem-faq__question::after { + display: none; +} +.bem-faq__answer { + color: #000; + font-family: 'Source Sans Pro', sans-serif; + font-size: 16px; + line-height: 22px; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/heading.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/heading.css index e152c34e9e..6aaa3d2662 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/heading.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/heading.css @@ -1,12 +1,17 @@ -.heading__title { - color: #0F172A; - line-height: 1.2; +.heading h1 { font-size: 48px; - font-family: 'Gotham-Bold', sans-serif; - font-weight: 400; } @media (max-width: 768px) { - .heading__title { + .heading h1 { font-size: 36px; } } +.heading h3 { + font-size: 30px; +} +.heading__title { + color: #0F172A; + line-height: 1.2; + font-family: 'Gotham-Bold', sans-serif; + font-weight: 400; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/hero.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/hero.css new file mode 100644 index 0000000000..512868303f --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/hero.css @@ -0,0 +1,59 @@ +.bem-hero { + background-color: #FBF9F8; +} +.bem-hero__title { + color: #000; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 48px; + line-height: 48px; +} +@media (max-width: 992px) { + .bem-hero__title { + font-size: 36px; + line-height: 36px; + } +} +.bem-hero__text { + color: #000; + font-family: 'Source Sans Pro', sans-serif; + font-size: 20px; + font-weight: 400; + line-height: 28px; +} +@media (max-width: 992px) { + .bem-hero__text { + font-size: 18px; + } +} +.bem-hero__text a { + color: #007CE1; +} +.bem-hero__text a:hover { + color: #0162DD; +} +.bem-hero__label { + color: #000; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 20px; + line-height: 28px; +} +.bem-hero__sections { + color: #000; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 18px; + line-height: 24px; +} +@media (max-width: 992px) { + .bem-hero__sections { + font-size: 16px; + } +} +.bem-hero__sections a { + color: #007CE1; +} +.bem-hero__sections a:hover { + color: #0162DD; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/paragraph.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/paragraph.css index 73740738a4..4b1e188687 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/paragraph.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/paragraph.css @@ -6,6 +6,9 @@ .paragraph__text_font-size-big { font-size: 20px; } +.paragraph__text_font-size-medium { + font-size: 18px; +} .paragraph__text_font_size-small { font-size: 12px; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partner.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partner.css new file mode 100644 index 0000000000..6c313d871c --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partner.css @@ -0,0 +1,8 @@ +.bem-partner__image { + background: red; +} +@media (max-width: 768px) { + .bem-partner__image { + max-height: 50px; + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partners.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partners.css new file mode 100644 index 0000000000..d1af0b5cf5 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/partners.css @@ -0,0 +1,9 @@ +.bem-partners__image { + max-width: 100px; +} +.bem-partners__indicators { + bottom: -2rem; +} +.bem-partners__indicators [data-bs-target] { + background-color: #000; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/select2_field.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/select2_field.css index 2a2a2205c2..0c7af3adb9 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/select2_field.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/select2_field.css @@ -1,3 +1,11 @@ +.background-color-snow { + background-color: #FBF9F8; +} +.fa-icon::before { + display: inline-block; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} .select2-field__label { color: #4B5563; font-weight: 600; @@ -24,6 +32,22 @@ font-weight: 500; line-height: 30px; } +.select2-field .select2-container .select2-dropdown .select2-search::after { + font: var(--fa-font-solid); + content: '\f002'; + color: #CCCCCC; + position: absolute; + top: 18px; + right: 30px; +} +.select2-field .select2-container .select2-dropdown .select2-search::after::before { + display: inline-block; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} +.select2-field .select2-container .select2-dropdown .select2-search .select2-search__field { + padding-right: 30px; +} .select2-field .select2-container .select2-dropdown .select2-search .select2-search__field:focus { box-shadow: none; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/stepper.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/stepper.css index 9010ec7cab..b719544c76 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/stepper.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/stepper.css @@ -1,3 +1,6 @@ +.background-color-snow { + background-color: #FBF9F8; +} .fa-icon::before { display: inline-block; text-rendering: auto; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.css index 68fb63c50b..3dca2f7451 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.css @@ -36,6 +36,13 @@ font-size: 16px; margin-bottom: 8px; } +.textarea-field__label-guideline { + color: #4B5563; + font-weight: 400; + font-size: 14px; + margin-bottom: 8px; + line-height: 22px; +} .textarea-field__required { color: #F2645A; font-weight: 600; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.js new file mode 100644 index 0000000000..8f30ac2be5 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/textarea_field.js @@ -0,0 +1,14 @@ +$(document).ready(function () { + + $('.textarea-field__character-count').each(function () { + var $characterCountElement = $(this); + var $textareaElement = $characterCountElement.parent().find('textarea'); + $characterCountElement.text('0 characters'); + $textareaElement.on('keyup change input', function () { + var textLength = $(this).val().length; + var textCharacters = textLength !== 1 ? ' characters' : ' character'; + $characterCountElement.text(textLength.toString() + textCharacters); + }); + }); + +}); diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/utilities.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/utilities.css new file mode 100644 index 0000000000..9b30df184f --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/utilities.css @@ -0,0 +1,8 @@ +.background-color-snow { + background-color: #FBF9F8; +} +.fa-icon::before { + display: inline-block; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage-responsive.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage-responsive.css index 4e5f9a35b2..9a6baa1ddb 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage-responsive.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage-responsive.css @@ -29,75 +29,36 @@ padding: 0 15px; width: 100%; } + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 24px; + } } @media (max-width: 992px) { - body.home .homepage-main .hero-section { - margin-bottom: 0; - } body.home .homepage-main .hero-section .section-title { width: 100%; } - body.home .homepage-main .hero-section .hero-section-content { - flex-direction: column; - align-items: center; - } body.home .homepage-main .hero-section .hero-description { - margin-bottom: 50px; text-align: center; + width: 100%; } body.home .homepage-main .hero-section .hero-description .section-title { text-align: center; } - body.home .homepage-main .hero-section .hero-boxes { - flex-direction: column; - align-items: center; - justify-content: space-evenly; - margin-bottom: 50px; - } - body.home .homepage-main .hero-section .hero-boxes .action-box ~ .action-box { - margin-left: 0; - margin-top: 30px; - } - body.home .homepage-main .carousel { - bottom: auto; - margin-bottom: 30px; - position: relative; - } - body.home .homepage-main .carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel { - display: block; - min-height: 295px; - overflow: hidden; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { + body.home .homepage-main .hero-section .hero-boxes-container { + width: 100%; display: flex; - left: 45px; - position: absolute; - overflow: unset; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item { - margin-right: 45px; - width: 215px; - display: block; + float: none; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic { - width: 215px; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic img, - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic iframe { - height: 100%; - width: 100%; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes { + width: 50%; + margin: 50px auto 28px; } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators { - display: none; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box ~ .action-box { + margin-left: 0; + margin-top: 30px; } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators [data-bs-target] { - width: 20px; + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 30px; } } @media (max-width: 768px) { @@ -115,11 +76,8 @@ body.home .homepage-main .homepage-section .section-title { font-size: 40px; } - body.home .homepage-main .homepage-section .hero-boxes .action-box { - width: 380px; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 15px; + body.home .homepage-main .homepage-section .hero-boxes { + width: 100% !important; } } @media (max-width: 425px) { @@ -168,16 +126,46 @@ body.home .homepage-main .homepage-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .action { font-size: 12px; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 80px; - } } @media (max-width: 320px) { body.home .homepage-main .homepage-section .section-title { font-size: 28px; line-height: 1.3; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 37px; +} +@media (max-height: 1050px) { + .homepage-main .hero-section { + padding-top: 150px; + } + .homepage-main .carousel-section { + margin-top: 150px; + margin-bottom: 150px; + } +} +@media (max-height: 1024px) { + .homepage-main .hero-section { + padding-top: 140px; + } + .homepage-main .carousel-section { + margin-top: 140px; + margin-bottom: 140px; + } +} +@media (max-height: 900px) { + .homepage-main .hero-section { + padding-top: 100px; + } + .homepage-main .carousel-section { + margin-top: 100px; + margin-bottom: 100px; + } +} +@media (max-height: 800px) { + .homepage-main .hero-section { + padding-top: 65px; + } + .homepage-main .carousel-section { + margin-top: 65px; + margin-bottom: 65px; } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage.css index 35a07e6959..8eb4463364 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/homepage/homepage.css @@ -30,6 +30,7 @@ font-family: 'Gotham-Bold', sans-serif; font-weight: 400; position: relative; + min-height: calc(100vh - 100px); } .homepage-main .homepage-section .section-content { padding-bottom: 0; @@ -45,8 +46,6 @@ color: white; text-align: center; line-height: 1.05; - margin-top: 60px; - margin-bottom: 30px; } .homepage-main .homepage-section .section-title .dotted { text-decoration: underline dotted; @@ -73,7 +72,7 @@ flex-direction: column; align-items: center; background-color: #1ebfb3; - padding-top: 50px; + padding-top: 160px; } .homepage-main .hero-section .btn-faq { font-family: 'Gotham-Bold', sans-serif; @@ -89,13 +88,14 @@ display: block; } .homepage-main .hero-section .hero-section-content { - display: flex; - align-items: center; + margin-left: -12px; + margin-right: -12px; } .homepage-main .hero-section .hero-description { color: #fff; - flex-basis: 50%; - text-align: left; + width: calc(100% - 469px); + display: inline-block; + padding: 0 12px; font-family: 'Source Sans Pro', sans-serif; font-weight: 400; font-size: 18px; @@ -104,24 +104,31 @@ text-align: left; width: 440px; } -.homepage-main .hero-section .hero-boxes { - display: flex; - flex-direction: column; - flex-basis: 50%; - align-items: flex-end; - flex-shrink: 1; +.homepage-main .hero-section .hero-description .section-subtitle { + margin-top: 22px; + margin-bottom: 22px; } -.homepage-main .hero-section .hero-boxes .action-box { - width: 445px; +.homepage-main .hero-section .hero-boxes-container { + display: inline-block; + width: 469px; + padding: 0 12px; + float: right; +} +.homepage-main .hero-section .hero-boxes-container .hero-boxes { + width: 100%; + float: right; +} +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box { + width: 100%; min-height: 200px; background-color: #eeeeee; border-radius: 6px; overflow: hidden; } -.homepage-main .hero-section .hero-boxes .action-box ~ .action-box { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box ~ .action-box { margin-top: 20px; } -.homepage-main .hero-section .hero-boxes .action-box .box-header { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .box-header { background-color: #fff; border-top-left-radius: 6px; border-top-right-radius: 6px; @@ -131,37 +138,37 @@ text-transform: uppercase; line-height: 1; } -.homepage-main .hero-section .hero-boxes .action-box .box-header.orange { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .box-header.orange { color: #f2645a; } -.homepage-main .hero-section .hero-boxes .action-box .first-search { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .first-search { padding: 20px; } -.homepage-main .hero-section .hero-boxes .action-box .first-search .form-search { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .first-search .form-search { position: relative; } -.homepage-main .hero-section .hero-boxes .action-box .first-search .form-search .search-ahead { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .first-search .form-search .search-ahead { width: 125%; font-family: 'Source Sans Pro', sans-serif; font-weight: 400; font-size: 18px; } @media (max-width: 767px) { - .homepage-main .hero-section .hero-boxes .action-box .first-search .form-search .search-ahead { + .homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .first-search .form-search .search-ahead { width: 100%; } } -.homepage-main .hero-section .hero-boxes .action-box .count-items { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items { text-align: center; padding: 0 20px 20px; } -.homepage-main .hero-section .hero-boxes .action-box .count-items .col-4 { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .col-4 { border-right: 1px solid #cccccc; } -.homepage-main .hero-section .hero-boxes .action-box .count-items .col-4:last-child { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .col-4:last-child { border-right: none; } -.homepage-main .hero-section .hero-boxes .action-box .count-items .item-count a { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .item-count a { font-family: 'Gotham-Light', sans-serif; font-display: auto; font-weight: 400; @@ -169,35 +176,35 @@ color: #888888; line-height: 1; } -.homepage-main .hero-section .hero-boxes .action-box .count-items .item-count a:focus, -.homepage-main .hero-section .hero-boxes .action-box .count-items .item-count a:hover { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .item-count a:focus, +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .item-count a:hover { text-decoration: none; color: #888888; } -.homepage-main .hero-section .hero-boxes .action-box .count-items .item-name { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .count-items .item-name { font-family: 'Gotham-Light', sans-serif; font-display: auto; font-weight: 400; font-size: 12px; text-transform: uppercase; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions { display: flex; justify-content: space-between; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions .add-data-item { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions .add-data-item { margin: 20px; cursor: pointer; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content { display: flex; flex-direction: column; align-items: center; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content img { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content img { height: 50px; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .description { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .description { margin: 5px 0; font-family: 'Source Sans Pro', sans-serif; font-weight: 400; @@ -205,11 +212,11 @@ text-align: center; color: #888888; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .action { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .action { color: #f2645a; text-transform: uppercase; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-footer { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-footer { background-color: #f2645a; padding: 10px 15px; font-family: 'Source Sans Pro', sans-serif; @@ -217,18 +224,18 @@ font-size: 14px; color: #eeeeee; } -.homepage-main .hero-section .hero-boxes .action-box .add-data-footer a, -.homepage-main .hero-section .hero-boxes .action-box .add-data-footer a:focus, -.homepage-main .hero-section .hero-boxes .action-box .add-data-footer a:hover { +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-footer a, +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-footer a:focus, +.homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box .add-data-footer a:hover { color: #eeeeee; text-decoration: underline; } .homepage-main .carousel-section { background-color: #1ebfb3; - padding-bottom: 41px; + margin-top: 160px; + margin-bottom: 160px; } .homepage-main .carousel-section .carousel-title { - margin-top: 40px; margin-bottom: 30px; text-align: center; color: #fff; @@ -237,35 +244,16 @@ font-weight: 400; font-size: 24px; } -.homepage-main .carousel-section .carousel { - width: 100%; -} -.homepage-main .carousel-section .carousel .carousel-inner { - padding-bottom: 40px; -} -.homepage-main .carousel-section .carousel .carousel-indicators { - bottom: 0; -} -.homepage-main .carousel-section .carousel .carousel-indicators li { - background-color: #cccccc; -} -.homepage-main .carousel-section .carousel .carousel-indicators li.active { - background-color: #fff; -} -.homepage-main .carousel-section .carousel .carousel-item .item-center { - margin: auto; - width: 980px; -} -.homepage-main .carousel-section .carousel .carousel-item .sub-item { +.homepage-main .carousel-section .carousel-items .sub-item { width: 215px; margin-right: 40px; float: left; position: relative; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item:last-child { +.homepage-main .carousel-section .carousel-items .sub-item:last-child { margin-right: 0; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .title { +.homepage-main .carousel-section .carousel-items .sub-item .title { font-family: 'Gotham-Bold', sans-serif; font-weight: 400; font-size: 8px; @@ -280,18 +268,18 @@ transform: translateX(-50%); white-space: nowrap; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image { position: relative; height: 215px; margin-bottom: 5px; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image:hover.disabled .sub-item-action { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image:hover.disabled .sub-item-action { display: none; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image:hover .sub-item-action { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image:hover .sub-item-action { display: block; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image .sub-item-action { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image .sub-item-action { display: none; position: absolute; height: 100%; @@ -300,29 +288,49 @@ left: 0; background: rgba(0, 0, 0, 0.3); } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image .sub-item-action a { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image .sub-item-action a { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background-color: #f2645a; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-image .graphic { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image .graphic { height: 215px; width: 215px; object-fit: cover; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-caption { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-caption { text-align: left; color: #fff; + height: 40px; + overflow: hidden; } -.homepage-main .carousel-section .carousel .carousel-item .sub-item .sub-item-caption .description { +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-caption .description { font-family: 'Gotham-Book', sans-serif; font-display: block; font-weight: 400; font-size: 12px; margin: 0; } +.homepage-main .carousel-section .carousel-items .sub-item { + float: none; + width: 100%; + margin-right: 0; + margin-bottom: 20px; +} +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image { + height: auto; +} +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-image .graphic { + height: auto; + width: 100%; + aspect-ratio: 1.5; + border-radius: 6px; +} +.homepage-main .carousel-section .carousel-items .sub-item .sub-item-action { + border-radius: 6px; +} .homepage-main .learn-section { background-color: #333333; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/dataset/dataset-light.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/dataset/dataset-light.css index d7a42600dd..0b262e593d 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/dataset/dataset-light.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/dataset/dataset-light.css @@ -147,6 +147,7 @@ margin-bottom: 3px; border: 1px solid #eeeeee; padding: 0; + width: 100%; } .dataset-light .resource-list .resource-item.in-review { opacity: 60%; @@ -163,10 +164,12 @@ max-height: 0; } .dataset-light .resource-list .resource-item .resource-item-title { - padding: 10px; display: flex; flex-direction: row; align-items: center; + height: 1em; + flex-grow: 1; + padding-right: 5px; height: 40px; } .dataset-light .resource-list .resource-item .spacer { @@ -179,15 +182,16 @@ color: #007CE0; } .dataset-light .resource-list .resource-item .heading { + width: calc(100% - 70px); +} +.dataset-light .resource-list .resource-item .heading .resource-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - flex-grow: 0; } .dataset-light .resource-list .resource-item .format-label { position: initial; - min-width: 32px; - margin: 2px 0 0 -20px; + margin: 2px 0 0 -10px; } .dataset-light .resource-list .resource-item .content { border-top: 1px solid #eeeeee; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-extra-light.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-extra-light.css index 250a5eacee..9d3208d4a2 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-extra-light.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-extra-light.css @@ -336,6 +336,11 @@ body { font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -368,6 +373,16 @@ body { #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { @@ -664,11 +679,11 @@ hr.dotted { line-height: 20px; } .hdx-footer .logo-gray { - height: 40px; + height: 30px; margin-bottom: 10px; } .hdx-footer .match-logo-margin { - margin-top: 50px; + margin-top: 40px; } @media (max-width: 768px) { .hdx-footer .match-logo-margin { @@ -676,7 +691,7 @@ hr.dotted { } } .hdx-footer .other-services img { - max-height: 40px; + max-height: 30px; max-width: 100%; } .hdx-footer .other-services img.logo-hdx { @@ -1618,13 +1633,12 @@ hr.dotted { display: block; } .hdxLogo .logo .logo-img { - background-image: url("/images/homepage/logo-hdx.svg"); + background-image: url("/images/homepage/logo-hdx-accr-blk.svg"); background-repeat: no-repeat; - background-size: 126px 31px; + background-position: left center; width: 126px; - height: 31px; - min-width: 126px; - min-height: 31px; + height: 30px; + margin-top: 1px; } /* END HDX Version display */ /* Style breadcrumbs */ @@ -1724,75 +1738,36 @@ hr.dotted { padding: 0 15px; width: 100%; } + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 24px; + } } @media (max-width: 992px) { - body.home .homepage-main .hero-section { - margin-bottom: 0; - } body.home .homepage-main .hero-section .section-title { width: 100%; } - body.home .homepage-main .hero-section .hero-section-content { - flex-direction: column; - align-items: center; - } body.home .homepage-main .hero-section .hero-description { - margin-bottom: 50px; text-align: center; + width: 100%; } body.home .homepage-main .hero-section .hero-description .section-title { text-align: center; } - body.home .homepage-main .hero-section .hero-boxes { - flex-direction: column; - align-items: center; - justify-content: space-evenly; - margin-bottom: 50px; - } - body.home .homepage-main .hero-section .hero-boxes .action-box ~ .action-box { - margin-left: 0; - margin-top: 30px; - } - body.home .homepage-main .carousel { - bottom: auto; - margin-bottom: 30px; - position: relative; - } - body.home .homepage-main .carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel { - display: block; - min-height: 295px; - overflow: hidden; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { + body.home .homepage-main .hero-section .hero-boxes-container { + width: 100%; display: flex; - left: 45px; - position: absolute; - overflow: unset; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item { - margin-right: 45px; - width: 215px; - display: block; + float: none; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic { - width: 215px; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes { + width: 50%; + margin: 50px auto 28px; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic img, - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic iframe { - height: 100%; - width: 100%; - } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators { - display: none; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box ~ .action-box { + margin-left: 0; + margin-top: 30px; } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators [data-bs-target] { - width: 20px; + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 30px; } } @media (max-width: 768px) { @@ -1810,11 +1785,8 @@ hr.dotted { body.home .homepage-main .homepage-section .section-title { font-size: 40px; } - body.home .homepage-main .homepage-section .hero-boxes .action-box { - width: 380px; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 15px; + body.home .homepage-main .homepage-section .hero-boxes { + width: 100% !important; } } @media (max-width: 425px) { @@ -1863,16 +1835,46 @@ hr.dotted { body.home .homepage-main .homepage-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .action { font-size: 12px; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 80px; - } } @media (max-width: 320px) { body.home .homepage-main .homepage-section .section-title { font-size: 28px; line-height: 1.3; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 37px; +} +@media (max-height: 1050px) { + .homepage-main .hero-section { + padding-top: 150px; + } + .homepage-main .carousel-section { + margin-top: 150px; + margin-bottom: 150px; + } +} +@media (max-height: 1024px) { + .homepage-main .hero-section { + padding-top: 140px; + } + .homepage-main .carousel-section { + margin-top: 140px; + margin-bottom: 140px; + } +} +@media (max-height: 900px) { + .homepage-main .hero-section { + padding-top: 100px; + } + .homepage-main .carousel-section { + margin-top: 100px; + margin-bottom: 100px; + } +} +@media (max-height: 800px) { + .homepage-main .hero-section { + padding-top: 65px; + } + .homepage-main .carousel-section { + margin-top: 65px; + margin-bottom: 65px; } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-light.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-light.css index 9fdbf2252a..52c1c62e09 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-light.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/light/page-light.css @@ -1506,6 +1506,11 @@ ul.dataset-resources li + li.label-icons { font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -1538,6 +1543,16 @@ ul.dataset-resources li + li.label-icons { #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { @@ -3239,11 +3254,11 @@ ul.list-horizontal li:first-child:before { line-height: 20px; } .hdx-footer .logo-gray { - height: 40px; + height: 30px; margin-bottom: 10px; } .hdx-footer .match-logo-margin { - margin-top: 50px; + margin-top: 40px; } @media (max-width: 768px) { .hdx-footer .match-logo-margin { @@ -3251,7 +3266,7 @@ ul.list-horizontal li:first-child:before { } } .hdx-footer .other-services img { - max-height: 40px; + max-height: 30px; max-width: 100%; } .hdx-footer .other-services img.logo-hdx { @@ -4193,13 +4208,12 @@ ul.list-horizontal li:first-child:before { display: block; } .hdxLogo .logo .logo-img { - background-image: url("/images/homepage/logo-hdx.svg"); + background-image: url("/images/homepage/logo-hdx-accr-blk.svg"); background-repeat: no-repeat; - background-size: 126px 31px; + background-position: left center; width: 126px; - height: 31px; - min-width: 126px; - min-height: 31px; + height: 30px; + margin-top: 1px; } /* END HDX Version display */ /* HEADER Search Widget */ @@ -4271,75 +4285,36 @@ label.terms-of-service:after { padding: 0 15px; width: 100%; } + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 24px; + } } @media (max-width: 992px) { - body.home .homepage-main .hero-section { - margin-bottom: 0; - } body.home .homepage-main .hero-section .section-title { width: 100%; } - body.home .homepage-main .hero-section .hero-section-content { - flex-direction: column; - align-items: center; - } body.home .homepage-main .hero-section .hero-description { - margin-bottom: 50px; text-align: center; + width: 100%; } body.home .homepage-main .hero-section .hero-description .section-title { text-align: center; } - body.home .homepage-main .hero-section .hero-boxes { - flex-direction: column; - align-items: center; - justify-content: space-evenly; - margin-bottom: 50px; - } - body.home .homepage-main .hero-section .hero-boxes .action-box ~ .action-box { - margin-left: 0; - margin-top: 30px; - } - body.home .homepage-main .carousel { - bottom: auto; - margin-bottom: 30px; - position: relative; - } - body.home .homepage-main .carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel { - display: block; - min-height: 295px; - overflow: hidden; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel { - display: none; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { + body.home .homepage-main .hero-section .hero-boxes-container { + width: 100%; display: flex; - left: 45px; - position: absolute; - overflow: unset; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item { - margin-right: 45px; - width: 215px; - display: block; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic { - width: 215px; + float: none; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic img, - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner .carousel-item .graphic iframe { - height: 100%; - width: 100%; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes { + width: 50%; + margin: 50px auto 28px; } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators { - display: none; + body.home .homepage-main .hero-section .hero-boxes-container .hero-boxes .action-box ~ .action-box { + margin-left: 0; + margin-top: 30px; } - body.home .homepage-main .carousel.mobile-carousel .carousel-indicators [data-bs-target] { - width: 20px; + body.home .homepage-main .homepage-section .hero-boxes .action-box .count-items .item-count a { + font-size: 30px; } } @media (max-width: 768px) { @@ -4357,11 +4332,8 @@ label.terms-of-service:after { body.home .homepage-main .homepage-section .section-title { font-size: 40px; } - body.home .homepage-main .homepage-section .hero-boxes .action-box { - width: 380px; - } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 15px; + body.home .homepage-main .homepage-section .hero-boxes { + width: 100% !important; } } @media (max-width: 425px) { @@ -4410,17 +4382,47 @@ label.terms-of-service:after { body.home .homepage-main .homepage-section .hero-boxes .action-box .add-data-actions .add-data-item .add-data-item-content .action { font-size: 12px; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 80px; - } } @media (max-width: 320px) { body.home .homepage-main .homepage-section .section-title { font-size: 28px; line-height: 1.3; } - body.home .homepage-main .carousel.mobile-carousel .mobile-carousel-inner { - left: 37px; +} +@media (max-height: 1050px) { + .homepage-main .hero-section { + padding-top: 150px; + } + .homepage-main .carousel-section { + margin-top: 150px; + margin-bottom: 150px; + } +} +@media (max-height: 1024px) { + .homepage-main .hero-section { + padding-top: 140px; + } + .homepage-main .carousel-section { + margin-top: 140px; + margin-bottom: 140px; + } +} +@media (max-height: 900px) { + .homepage-main .hero-section { + padding-top: 100px; + } + .homepage-main .carousel-section { + margin-top: 100px; + margin-bottom: 100px; + } +} +@media (max-height: 800px) { + .homepage-main .hero-section { + padding-top: 65px; + } + .homepage-main .carousel-section { + margin-top: 65px; + margin-bottom: 65px; } } /* Footer Homepage */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/organization_/base/organization.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/organization_/base/organization.css index 5cbf7ce07c..f75119b993 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/organization_/base/organization.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/organization_/base/organization.css @@ -1855,6 +1855,11 @@ ul.dataset-resources li + li.label-icons { font-weight: 400; font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} .sspBold16 { font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -1887,6 +1892,16 @@ ul.dataset-resources li + li.label-icons { #homepage-alerts .flash-messages { background-color: transparent; } +#homepage-alerts .paddingRowHack { + margin-left: 0; + margin-right: 0; +} +#homepage-alerts .paddingRowHack .paddingLeftHack { + padding-left: 0; +} +#homepage-alerts .paddingRowHack .paddingRightHack { + padding-right: 0; +} /* END Style Bootstrap Flash messages*/ /* Common Classes */ .mTop60 { @@ -3334,11 +3349,11 @@ ul.list-horizontal li:first-child:before { line-height: 20px; } .hdx-footer .logo-gray { - height: 40px; + height: 30px; margin-bottom: 10px; } .hdx-footer .match-logo-margin { - margin-top: 50px; + margin-top: 40px; } @media (max-width: 768px) { .hdx-footer .match-logo-margin { @@ -3346,7 +3361,7 @@ ul.list-horizontal li:first-child:before { } } .hdx-footer .other-services img { - max-height: 40px; + max-height: 30px; max-width: 100%; } .hdx-footer .other-services img.logo-hdx { @@ -4288,13 +4303,12 @@ ul.list-horizontal li:first-child:before { display: block; } .hdxLogo .logo .logo-img { - background-image: url("/images/homepage/logo-hdx.svg"); + background-image: url("/images/homepage/logo-hdx-accr-blk.svg"); background-repeat: no-repeat; - background-size: 126px 31px; + background-position: left center; width: 126px; - height: 31px; - min-width: 126px; - min-height: 31px; + height: 30px; + margin-top: 1px; } /* END HDX Version display */ /* HEADER Search Widget */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource-list.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource-list.css index d1df30c3b4..ad779b263a 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource-list.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource-list.css @@ -2,6 +2,17 @@ .resource-list { list-style: none; } +.resource-item .heading { + display: flex; +} +.resource-item .heading .resource-name { + max-width: 400px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; + margin-right: 5px; +} .resource-item .update-date { margin-bottom: 7px; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml index 3db5e087da..6a9234a277 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml @@ -129,6 +129,11 @@ bem-blocks-styles: contents: - bem.blocks/bem_fonts.css - bem.blocks/stepper.css + - bem.blocks/hero.css + - bem.blocks/faq.css + - bem.blocks/card.css + - bem.blocks/partners.css + - bem.blocks/utilities.css - bem.blocks/heading.css - bem.blocks/paragraph.css - bem.blocks/input_field.css @@ -149,6 +154,7 @@ bem-blocks-scripts: - hdx_theme/hdx-show-more contents: - bem.blocks/select2_field.js + - bem.blocks/textarea_field.js hdx-form-validator: <<: *common-js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-accr-blk.svg b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-accr-blk.svg new file mode 100644 index 0000000000..0c6d251b78 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-accr-blk.svg @@ -0,0 +1,14 @@ + + + + + + + + + \ No newline at end of file diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-gray.svg b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-gray.svg new file mode 100644 index 0000000000..6b72f61a5c --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/homepage/logo-hdx-gray.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/acled.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/acled.png new file mode 100644 index 0000000000..e27a6bafb6 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/acled.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/european_comission.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/european_comission.png new file mode 100644 index 0000000000..51ba41c65d Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/european_comission.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/idmc.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/idmc.png new file mode 100644 index 0000000000..be6c9d348e Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/idmc.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/inform.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/inform.png new file mode 100644 index 0000000000..91aae25113 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/inform.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ipc.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ipc.png new file mode 100644 index 0000000000..89e00c01ab Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ipc.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ocha.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ocha.png new file mode 100644 index 0000000000..eaa6db8b47 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ocha.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ophi.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ophi.png new file mode 100644 index 0000000000..199f2a26db Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/ophi.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unchr.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unchr.png new file mode 100644 index 0000000000..f8643f2083 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unchr.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unfpa.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unfpa.png new file mode 100644 index 0000000000..26291f2bf1 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/unfpa.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/wfp.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/wfp.png new file mode 100644 index 0000000000..7b079eeb53 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/wfp.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/admin/carousel.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/admin/carousel.less index 418d5819d1..affd53c3e0 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/admin/carousel.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/admin/carousel.less @@ -74,9 +74,21 @@ background: @greenColor; .sub-item{ - width: 215px; + width: calc(100% - 50px); margin: auto; float: none; + .sub-item-image { + height: auto; + .graphic { + width: 100%; + height: auto; + aspect-ratio: 3/2; + border-radius: 6px; + } + } + .sub-item-action { + border-radius: 6px; + } } } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/hdx-logo.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/hdx-logo.less index 26f6e3e9cd..3bf412410d 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/hdx-logo.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/hdx-logo.less @@ -1,6 +1,6 @@ @import "_mixins"; -@hdxLogoUrl: "@{imagePath}/homepage/logo-hdx.svg"; +@hdxLogoUrl: "@{imagePath}/homepage/logo-hdx-accr-blk.svg"; /* HDX Version display */ .hdxLogo { @@ -19,16 +19,13 @@ display: block; } - @logoImageHeight: 31px; - @logoImageWidth: 126px; .logo-img { background-image: url(@hdxLogoUrl); background-repeat: no-repeat; - background-size: @logoImageWidth @logoImageHeight; - width: @logoImageWidth; - height: @logoImageHeight; - min-width: @logoImageWidth; - min-height: @logoImageHeight; + background-position: left center; + width: 126px; + height: 30px; + margin-top: 1px; } } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/header/util.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/header/util.less index 789aee3b50..c2b914a7f1 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/header/util.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/components/header/util.less @@ -79,6 +79,12 @@ font-size: 14px; } +.sspRegular16 { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; +} + .sspBold16{ font-family: 'Source Sans Pro', sans-serif; font-weight: 700; @@ -116,10 +122,24 @@ } } } + #homepage-alerts { .flash-messages { background-color: transparent; } + + .paddingRowHack { + margin-left: 0; + margin-right: 0; + + .paddingLeftHack { + padding-left: 0; + } + + .paddingRightHack { + padding-right: 0; + } + } } /* END Style Bootstrap Flash messages*/ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/footer.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/footer.less index a8781f21a8..2355e806a2 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/footer.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/base/footer.less @@ -17,7 +17,7 @@ line-height: 20px; } - @logo-gray-height: 40px; + @logo-gray-height: 30px; @logo-gray-margin: 10px; .logo-gray { height: @logo-gray-height; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/bem_variables.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/bem_variables.less index 0008fa079c..820453f9f1 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/bem_variables.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/bem_variables.less @@ -4,12 +4,15 @@ @blue-dark-color: #0F172A; @blue-light-color: #007CE1; @blue-extra-light-color: #EDF6FD; +@cyan-light-color: #BCE3FE; @grey-color: #CCCCCC; @grey-dark-color: #888; @grey-extra-dark-color: #4B5563; @grey-light-color: #D1D5DB; +@grey-extra-light-color: #E1E4ED; @red-color: #F2645A; @green-color: #10B981; +@snow-color: #FBF9F8; @white-color: #FFF; @breakpoint-sm: 576px; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/card.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/card.less new file mode 100644 index 0000000000..8aa529d284 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/card.less @@ -0,0 +1,67 @@ +@import "bem_variables"; + +.bem-card { + border-radius: 8px !important; + border: 1px solid @grey-extra-light-color !important; + box-shadow: 0 1px 4px 0 @grey-light-color; + + &__body { + padding: 28px 32px; + } + + &__title { + font-family: 'Gotham-Bold', sans-serif; + font-weight: 400; + font-size: 20px; + font-style: normal; + line-height: 28px; + } + + &__text { + color: @black-color; + font-family: 'Source Sans Pro', sans-serif; + font-size: 18px; + font-weight: 400; + line-height: 24px; + } + + &__badge { + padding: 6px 12px; + font-size: 13px; + font-weight: normal; + font-family: 'Inter', sans-serif; + border-radius: 12px; + text-wrap: initial; + + &.text-bg-info { + background-color: @cyan-light-color !important; + } + } + + &__button { + font-family: 'Inter', sans-serif; + font-size: 16px; + font-weight: 600; + color: @blue-light-color; + text-decoration: none; + + &:hover { + color: @blue-color; + } + } + + + &_type-slim { + border-radius: 0 !important; + border: 0 !important; + box-shadow: none; + + .bem-card__body { + padding: 0; + } + + .bem-card__title { + font-size: 18px; + } + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/faq.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/faq.less new file mode 100644 index 0000000000..147ee34adf --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/faq.less @@ -0,0 +1,34 @@ +@import "bem_variables"; + +.bem-faq { + + &__item { + border-top: 0; + border-left: 0; + border-right: 0; + border-radius: 0 !important; + border-bottom: 1px solid @black-color; + } + + &__question { + color: @black-color !important; + font-family: 'Source Sans Pro', sans-serif; + font-size: 18px; + font-weight: 600; + line-height: 24px; + box-shadow: none !important; + background-color: transparent !important; + border-radius: 0 !important; + + &::after { + display: none; + } + } + + &__answer { + color: @black-color; + font-family: 'Source Sans Pro', sans-serif; + font-size: 16px; + line-height: 22px; + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/heading.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/heading.less index 1bd511b628..a19a113b7e 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/heading.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/heading.less @@ -1,14 +1,19 @@ @import "bem_variables"; .heading { + h1 { + font-size: 48px; + @media (max-width: @breakpoint-md) { + font-size: 36px; + } + } + h3 { + font-size: 30px; + } &__title { color: @blue-dark-color; line-height: 1.2; - font-size: 48px; font-family: 'Gotham-Bold', sans-serif; font-weight: 400; - @media (max-width: @breakpoint-md) { - font-size: 36px; - } } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/hero.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/hero.less new file mode 100644 index 0000000000..ebb924867c --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/hero.less @@ -0,0 +1,63 @@ +@import "bem_variables"; + +.bem-hero { + background-color: @snow-color; + + &__title { + color: @black-color; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 48px; + line-height: 48px; + @media (max-width: @breakpoint-lg) { + font-size: 36px; + line-height: 36px; + } + } + + &__text { + color: @black-color; + font-family: 'Source Sans Pro', sans-serif; + font-size: 20px; + font-weight: 400; + line-height: 28px; + @media (max-width: @breakpoint-lg) { + font-size: 18px; + } + + a { + color: @blue-light-color; + + &:hover { + color: @blue-color; + } + } + } + + &__label { + color: @black-color; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 20px; + line-height: 28px; + } + + &__sections { + color: @black-color; + font-weight: 400; + font-family: 'Gotham-Bold', sans-serif; + font-size: 18px; + line-height: 24px; + @media (max-width: @breakpoint-lg) { + font-size: 16px; + } + + a { + color: @blue-light-color; + + &:hover { + color: @blue-color; + } + } + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/paragraph.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/paragraph.less index 76f262419f..a2bd255c65 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/paragraph.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/paragraph.less @@ -10,6 +10,10 @@ font-size: 20px; } + &_font-size-medium { + font-size: 18px; + } + &_font_size-small { font-size: 12px; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/partners.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/partners.less new file mode 100644 index 0000000000..c3106cfd05 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/partners.less @@ -0,0 +1,16 @@ +@import "bem_variables"; + +.bem-partners { + + &__image { + max-width: 100px; + } + + &__indicators { + bottom: -2rem; + + [data-bs-target] { + background-color: @black-color; + } + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/select2_field.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/select2_field.less index 0c0a192d37..378cbd779b 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/select2_field.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/select2_field.less @@ -1,4 +1,5 @@ @import "bem_variables"; +@import "utilities"; .select2-field { &__label { @@ -38,7 +39,17 @@ .select2-dropdown { .select2-search { + &::after { + .fa-icon; + font: var(--fa-font-solid); + content: '\f002'; + color: @grey-color; + position: absolute; + top: 18px; // (50px .select2-search - 14px .fa-icon) / 2 + right: 30px; + } .select2-search__field { + padding-right: 30px; &:focus { box-shadow: none; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/stepper.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/stepper.less index fd874cb051..f9e859b63f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/stepper.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/stepper.less @@ -1,12 +1,5 @@ @import "bem_variables"; - -.fa-icon { - &::before { - display: inline-block; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - } -} +@import "utilities"; .stepper { display: flex; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/textarea_field.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/textarea_field.less index 30bd908f28..13c993be64 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/textarea_field.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/textarea_field.less @@ -37,6 +37,14 @@ margin-bottom: 8px; } + &__label-guideline { + color: @grey-extra-dark-color; + font-weight: 400; + font-size: 14px; + margin-bottom: 8px; + line-height: 22px; + } + &__required { color: @red-color; font-weight: 600; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/utilities.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/utilities.less new file mode 100644 index 0000000000..e64af2379f --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/utilities.less @@ -0,0 +1,13 @@ +@import "bem_variables"; + +.background-color-snow { + background-color: @snow-color; +} + +.fa-icon { + &::before { + display: inline-block; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-carousel.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-carousel.less index 7f2b9c850c..6c5736980e 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-carousel.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-carousel.less @@ -105,6 +105,8 @@ .sub-item-caption { text-align: left; color: @whiteColor; + height: 40px; // 2 lines + overflow: hidden; .description { .gothamBookFont(12px); margin: 0; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-responsive.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-responsive.less index efbcc5a723..842c63c83f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-responsive.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage-responsive.less @@ -46,6 +46,21 @@ padding: 0 15px; width: 100%; } + + .homepage-main { + .homepage-section { + .hero-boxes { + .action-box { + .count-items { + + .item-count a { + font-size: 24px; + } + } + } + } + } + } } } } @@ -55,48 +70,45 @@ &.home{ .homepage-main { .hero-section { - margin-bottom: 0; - .section-title { width: 100%; } - .hero-section-content { - flex-direction: column; - align-items: center; - } .hero-description { - margin-bottom: 50px; text-align: center; + width: 100%; .section-title { text-align: center; } } + .hero-boxes-container { + width: 100%; + display: flex; + float: none; + .hero-boxes { + width: 50%; + margin: 50px auto 28px; + + .action-box ~ .action-box { + margin-left: 0; + margin-top: 30px; + } + } + } + } + + .homepage-section { .hero-boxes { - flex-direction: column; - align-items: center; - justify-content: space-evenly; - margin-bottom: 50px; - - .action-box ~ .action-box { - margin-left: 0; - margin-top: 30px; + .action-box { + .count-items { + + .item-count a { + font-size: 30px; + } + } } } } - .carousel{ - bottom: auto; - margin-bottom: 30px; - position: relative; - } - - .carousel{ - display: none; - &.mobile-carousel{ - @import "mobile-carousel"; - .mobile-carousel-style(); - } - } } } } @@ -125,17 +137,7 @@ font-size: 40px; } .hero-boxes { - .action-box { - width: 380px; - } - } - } - - .carousel{ - &.mobile-carousel{ - .mobile-carousel-inner{ - left: @carousel-left-pos; - } + width: 100% !important; } } } @@ -199,13 +201,6 @@ } } } - .carousel{ - &.mobile-carousel{ - .mobile-carousel-inner{ - left: @carousel-left-pos; - } - } - } } } } @@ -222,14 +217,54 @@ line-height: 1.3; } } - .carousel{ - &.mobile-carousel{ - .mobile-carousel-inner{ - left: @carousel-left-pos; - } - } - } } } } } + +@media (max-height: 1050px) { + .homepage-main { + .hero-section { + padding-top: 150px; + } + .carousel-section { + margin-top: 150px; + margin-bottom: 150px; + } + } +} +@media (max-height: 1024px) { + .homepage-main { + .hero-section { + padding-top: 140px; + } + .carousel-section { + margin-top: 140px; + margin-bottom: 140px; + } + } +} + +@media (max-height: 900px) { + .homepage-main { + .hero-section { + padding-top: 100px; + } + .carousel-section { + margin-top: 100px; + margin-bottom: 100px; + } + } +} + +@media (max-height: 800px) { + .homepage-main { + .hero-section { + padding-top: 65px; + } + .carousel-section { + margin-top: 65px; + margin-bottom: 65px; + } + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage.less index 770f96bfab..be32d182f8 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/homepage/homepage.less @@ -15,6 +15,7 @@ font-family: @gothamBoldFont; font-weight: 400; position: relative; //used by #hdx-warning + min-height: calc(100vh - 100px); // viewport - header .homepage-section { @@ -31,9 +32,6 @@ color: white; text-align: center; line-height: 1.05; - margin-top: 60px; - margin-bottom: 30px; - //margin: 0;/ .dotted { text-decoration: underline dotted; @@ -65,7 +63,7 @@ flex-direction: column; align-items: center; background-color: @greenColor; - padding-top: 50px; + padding-top: 160px; .btn-faq { .gothamBoldFont(14px); @@ -81,165 +79,201 @@ } .hero-section-content { - display: flex; - align-items: center; + margin-left: -12px; // .row + margin-right: -12px; // .row } .hero-description { color: @whiteColor; - flex-basis: 50%; - text-align: left; + width: calc(100% - 469px); + display: inline-block; + padding: 0 12px; // .col .sourceSansProFont(400, 18px); .section-title { text-align: left; width: 440px; } + .section-subtitle { + margin-top: 22px; + margin-bottom: 22px; + } } - .hero-boxes { - display: flex; - flex-direction: column; - flex-basis: 50%; - align-items: flex-end; - flex-shrink: 1; - - @searchBoxPadding: 20px; - @searchBoxRadius: 6px; - @searchBoxSize: 405px; //size of the actual search box inside the whole widget - .action-box { - width: @searchBoxSize + 2*@searchBoxPadding; - min-height: 200px; //actual content will enlarge/shrink - background-color: @extraLightGrayColor; - border-radius: @searchBoxRadius; - overflow: hidden; - - ~ .action-box { - margin-top: 20px; - } + .hero-boxes-container { + display: inline-block; + width: 469px; + padding: 0 12px; // .col + float: right; + .hero-boxes { + width: 100%; + float: right; + + @searchBoxPadding: 20px; + @searchBoxRadius: 6px; + @searchBoxSize: 405px; //size of the actual search box inside the whole widget + .action-box { + width: 100%; + min-height: 200px; //actual content will enlarge/shrink + background-color: @extraLightGrayColor; + border-radius: @searchBoxRadius; + overflow: hidden; + + ~ .action-box { + margin-top: 20px; + } - .box-header { - background-color: @whiteColor; - border-top-left-radius: @searchBoxRadius; - border-top-right-radius: @searchBoxRadius; - padding: @searchBoxPadding; + .box-header { + background-color: @whiteColor; + border-top-left-radius: @searchBoxRadius; + border-top-right-radius: @searchBoxRadius; + padding: @searchBoxPadding; - color: @blueColor; - font-size: 16px; - text-transform: uppercase; - line-height: 1; + color: @blueColor; + font-size: 16px; + text-transform: uppercase; + line-height: 1; - &.orange { - color: @orangeColor; + &.orange { + color: @orangeColor; + } } - } - .first-search { - padding: @searchBoxPadding; - .form-search{ - position: relative; - .search-ahead { - width: 125%; - .sourceSansProFont(400, 18px); + .first-search { + padding: @searchBoxPadding; + + .form-search { + position: relative; - } - @media(max-width: 767px) { .search-ahead { - width: 100%; + width: 125%; + .sourceSansProFont(400, 18px); + + } + + @media (max-width: 767px) { + .search-ahead { + width: 100%; + } } } } - } - .count-items { - text-align: center; - padding: 0 @searchBoxPadding @searchBoxPadding; + .count-items { + text-align: center; + padding: 0 @searchBoxPadding @searchBoxPadding; + + .col-4 { + border-right: 1px solid @lightGrayColor; - .col-4 { - border-right: 1px solid @lightGrayColor; - &:last-child { - border-right: none; + &:last-child { + border-right: none; + } } - } - .item-count a{ - .gothamLightFont(30px); - color: @grayColor; - line-height: 1; - &:focus, &:hover { - text-decoration: none; + .item-count a { + .gothamLightFont(30px); color: @grayColor; + line-height: 1; + + &:focus, &:hover { + text-decoration: none; + color: @grayColor; + } } - } - .item-name{ - .gothamLightFont(12px); - text-transform: uppercase; + .item-name { + .gothamLightFont(12px); + text-transform: uppercase; + } } - } - .add-data-actions { - display: flex; - justify-content: space-between; + .add-data-actions { + display: flex; + justify-content: space-between; - .add-data-item { - margin: 20px; - cursor: pointer; + .add-data-item { + margin: 20px; + cursor: pointer; - .add-data-item-content { - display: flex; - flex-direction: column; - align-items: center; + .add-data-item-content { + display: flex; + flex-direction: column; + align-items: center; - img { - height: 50px; - } + img { + height: 50px; + } - .description { - //width: 160px; - margin: 5px 0; - .sourceSansProFont(400, 14px); - text-align: center; + .description { + //width: 160px; + margin: 5px 0; + .sourceSansProFont(400, 14px); + text-align: center; - color: @grayColor; - } + color: @grayColor; + } - .action { - color: @orangeColor; - text-transform: uppercase; + .action { + color: @orangeColor; + text-transform: uppercase; + } } } } - } - .add-data-footer { - background-color: @orangeColor; - padding: 10px 15px; - .sourceSansProFont(400, 14px); - color: @extraLightGrayColor; - a { - &, &:focus, &:hover { - color: @extraLightGrayColor; - text-decoration: underline; + + .add-data-footer { + background-color: @orangeColor; + padding: 10px 15px; + .sourceSansProFont(400, 14px); + color: @extraLightGrayColor; + + a { + &, &:focus, &:hover { + color: @extraLightGrayColor; + text-decoration: underline; + } } } } - } + } } } .carousel-section { background-color: @greenColor; - padding-bottom: 41px; + margin-top: 160px; + margin-bottom: 160px; .carousel-title { - margin-top: 40px; margin-bottom: 30px; text-align: center; color: @whiteColor; .gothamBookFont(24px); } - .homepage-carousel(); + // .homepage-carousel(); + .carousel-items { + .homepage-carousel-sub-item(); + .sub-item { + float: none; + width: 100%; + margin-right: 0; + margin-bottom: 20px; + .sub-item-image { + height: auto; + .graphic { + height: auto; + width: 100%; + aspect-ratio: 3/2; + border-radius: 6px; + } + } + .sub-item-action { + border-radius: 6px; + } + } + } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/light/dataset/dataset-light.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/light/dataset/dataset-light.less index 02fb053c7d..c9ac3ceeff 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/light/dataset/dataset-light.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/light/dataset/dataset-light.less @@ -5,8 +5,8 @@ .dataset-light { .nav-tabs { - margin: 0 -@gutterSmallSize; - padding: 0 @gutterSmallSize; + margin: 0 -(@gutterSmallSize); + padding: 0 (@gutterSmallSize); } .table-condensed > tbody > tr { @@ -37,6 +37,7 @@ margin-bottom: 3px; border: 1px solid @extraLightGrayColor; padding: 0; + width: 100%; &.in-review { opacity: 60%; @@ -57,10 +58,12 @@ } .resource-item-title { - padding: @resourceItemPadding; display: flex; flex-direction: row; align-items: center; + height: 1em; + flex-grow: 1; + padding-right: 5px; height: 40px; } @@ -74,16 +77,17 @@ } } .heading { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - flex-grow: 0; + width: calc(100% - 70px); + .resource-title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } .format-label { //transform: scale(0.6); position: initial; - min-width: 32px; - margin: 2px 0 0 -20px; + margin: 2px 0 0 -10px; } .content { @@ -103,8 +107,8 @@ .tab-content { background-color: #fafafa; - margin: 0 -@gutterSmallSize; - padding: 5px @gutterSmallSize 15px @gutterSmallSize; + margin: 0 -(@gutterSmallSize); + padding: 5px (@gutterSmallSize) 15px (@gutterSmallSize); .tab-pane-background { margin: @resourceItemPadding 0; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/resource-list.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/resource-list.less index 9477c25d9c..859e6e13e3 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/resource-list.less +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/resource-list.less @@ -2,39 +2,57 @@ @import "base/mixins"; /* Style Resources List */ -.resource-list{ +.resource-list { list-style: none; } .resource-item { - .update-date{ + .heading { + display: flex; + .resource-name { + max-width: 400px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; + margin-right: 5px; + } + } + + .update-date { margin-bottom: 7px; + .icn-txt-p-code { vertical-align: text-bottom; margin-right: 3px; } } + .description { text-align: justify; max-width: 450px; } } -.format-filesize-label{ +.format-filesize-label { font-size: 14px; font-weight: normal; color: #000; } + /* END Style Resources List*/ .data-check-modal.modal.show { .modal-dialog { width: @containerSize + 2*@gutterSize; max-width: none; + .modal-content { height: 90vh; + .modal-body { padding: 0; + iframe { width: 100%; height: 80vh; @@ -42,4 +60,4 @@ } } } -} +} \ No newline at end of file diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/actions.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/actions.py index 65c171bd91..ae6fff2f7b 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/actions.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/actions.py @@ -344,6 +344,7 @@ def hdx_carousel_settings_show(context, data_dict): carousel_settings = [] setting_value_json = model.get_system_info('hdx.carousel.config', config.get('hdx.carousel.config')) + max_carousel_items = context.get('max_items') if setting_value_json: try: carousel_settings = json.loads(setting_value_json) @@ -355,6 +356,9 @@ def hdx_carousel_settings_show(context, data_dict): for i, item in enumerate(carousel_settings): item['order'] = i + 1 + if max_carousel_items: + return carousel_settings[:max_carousel_items] + return carousel_settings diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py index 113eaf2e2b..8ae54c31f0 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py @@ -736,7 +736,7 @@ def hdx_get_frequency_by_value(value): def hdx_get_carousel_list(): - return logic.get_action('hdx_carousel_settings_show')({}, {}) + return logic.get_action('hdx_carousel_settings_show')({'max_items': 3}, {}) def hdx_get_quick_links_list(archived=None): diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/__init__.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/__init__.py index 9d4c0dc445..b4ac868a3a 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/__init__.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/__init__.py @@ -1,8 +1,10 @@ from ckanext.hdx_theme.helpers.ui_constants.onboarding import CONSTANTS as ONBOARDING_CONSTANTS from ckanext.hdx_theme.helpers.ui_constants.signin import CONSTANTS as SIGNIN_CONSTANTS +from ckanext.hdx_theme.helpers.ui_constants.landing_pages import CONSTANTS as LANDING_PAGES_CONSTANTS CONSTANTS = { 'ONBOARDING': ONBOARDING_CONSTANTS, 'SIGNIN': SIGNIN_CONSTANTS, + 'LANDING_PAGES': LANDING_PAGES_CONSTANTS, } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/__init__.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/__init__.py new file mode 100644 index 0000000000..f434fb2bad --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/__init__.py @@ -0,0 +1,7 @@ +from ckanext.hdx_theme.helpers.ui_constants.landing_pages.hapi import CONSTANTS as HAPI_LANDING_PAGE_CONSTANTS +from ckanext.hdx_theme.helpers.ui_constants.landing_pages.signals import CONSTANTS as SIGNALS_LANDING_PAGE_CONSTANTS + +CONSTANTS = { + 'HAPI_LANDING_PAGE': HAPI_LANDING_PAGE_CONSTANTS, + 'SIGNALS_LANDING_PAGE': SIGNALS_LANDING_PAGE_CONSTANTS, +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/hapi.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/hapi.py new file mode 100644 index 0000000000..a6ecc04e96 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/hapi.py @@ -0,0 +1,106 @@ +CONSTANTS = { + 'HERO_SECTION_TITLE': '''The HDX Humanitarian API (HAPI) is a way to access standardised indicators from multiple sources to automate workflows and visualisations''', + 'HERO_SECTION_DESCRIPTION': '''HAPI is in beta phase, and we are seeking feedback. To share your thoughts or join our Slack channel, send an email to hdx@un.org.''', + 'HERO_SECTION_LABEL': '''HDX HAPI Beta''', + + 'DATA_COVERAGE_SECTION_TITLE': '''Data Coverage''', + 'DATA_COVERAGE_SECTION_DESCRIPTION': '''Our initial coverage aligns with the data included in the HDX Data Grids, which places the most important crisis data into six categories and 20 sub-categories. Our beta version of HAPI covers 57 indicators across 22 countries with a Humanitarian Response Plan.''', + 'DATA_COVERAGE_SECTION_PARAGRAPH': '''Refer to the documentation for the latest coverage. Contact us to request additional indicators in future versions of HAPI.''', + + 'BE_INSPIRED_SECTION_TITLE': '''Be Inspired''', + 'BE_INSPIRED_SECTION_DESCRIPTION': '''Take a look at visualisations and code examples''', + + 'BE_INSPIRED_CARD_TITLE_POWER_BI': '''Power BI workflow''', + 'BE_INSPIRED_CARD_TEXT_POWER_BI': '''A tutorial to demonstrate how easy it is to bring in data.''', + 'BE_INSPIRED_CARD_BUTTON_POWER_BI': '''Learn more''', + 'BE_INSPIRED_CARD_BUTTON_LINK_POWER_BI': '''#''', + + 'BE_INSPIRED_CARD_TITLE_API': '''API Sandbox''', + 'BE_INSPIRED_CARD_TEXT_API': '''A sandbox environment to help construct queries and get a data response.''', + 'BE_INSPIRED_CARD_BUTTON_API': '''Learn more''', + 'BE_INSPIRED_CARD_BUTTON_LINK_API': '''https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_locations_api_v1_metadata_location_get''', + + 'BE_INSPIRED_CARD_TITLE_VISUALIZATION': '''Visualisation''', + 'BE_INSPIRED_CARD_TEXT_VISUALIZATION': '''A dashboard with a selection of key figures, charts and a map for all countries in HAPI.''', + 'BE_INSPIRED_CARD_BUTTON_VISUALIZATION': '''Learn more''', + 'BE_INSPIRED_CARD_BUTTON_LINK_VISUALIZATION': '''#''', + + 'BE_INSPIRED_CARD_TITLE_CHATBOT': '''Chatbot''', + 'BE_INSPIRED_CARD_TEXT_CHATBOT': '''An early stage AI chatbot developed with DataKind to ask questions about the data.''', + 'BE_INSPIRED_CARD_BUTTON_CHATBOT': '''Learn more''', + 'BE_INSPIRED_CARD_BUTTON_LINK_CHATBOT': '''#''', + + 'FAQ_SECTION_TITLE': '''FAQ''', + + 'PARTNERS_SECTION_TITLE': '''Partners''', +} + +DATA_COVERAGE_CONSTANTS = [ + { + "category": "Affected People", + "title": "Humanitarian Needs Overview", + "organization": "OCHA offices", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Affected People", + "title": "Refugees and Persons of Concern", + "organization": "UNHCR", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Coordination & Context", + "title": "3W", + "organization": "OCHA offices", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Coordination & Context", + "title": "Conflict Events", + "organization": "The Armed Conflict Location & Event Data Project (ACLED)", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Coordination & Context", + "title": "Funding", + "organization": "OCHA Financial Tracking System (FTS)", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Coordination & Context", + "title": "National Risk", + "organization": "INFORM", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Food Security & Nutrition", + "title": "Food Security", + "organization": "IPC", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Food Security & Nutrition", + "title": "Food Prices", + "organization": "WFP", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Population & Socio-economy", + "title": "Population", + "organization": "United Nations Population Fund (UNFPA) and OCHA offices", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + }, + { + "category": "Population & Socio-economy", + "title": "Poverty Rate", + "organization": "OPHI", + "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + } +] + +SECTIONS_CONSTANTS = [ + {'name': 'Data Coverage', 'url': '#data-coverage'}, + {'name': 'Be Inspired', 'url': '#be-inspired'}, + {'name': 'FAQ', 'url': '#faq'}, + {'name': 'Read the documentation', 'url': 'https://hdx-hapi.readthedocs.io/'}, +] diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/signals.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/signals.py new file mode 100644 index 0000000000..886760ea77 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/landing_pages/signals.py @@ -0,0 +1,75 @@ +CONSTANTS = { + 'HERO_SECTION_TITLE': '''HDX Signals monitors key datasets and generates automated emails when significant, negative changes are detected''', + 'HERO_SECTION_DESCRIPTION': '''HDX Signals is a new product. We are seeking feedback. Please contact us at hdx-signals@un.org''', + 'HERO_SECTION_LABEL': '''HDX Signals''', + + 'DATA_COVERAGE_SECTION_TITLE': '''Data Coverage''', + 'DATA_COVERAGE_SECTION_DESCRIPTION': '''Datasets monitored by HDX signals at the moment are as follows:''', + + 'SIGNUP_SECTION_TITLE': '''Sign up''', + 'SIGNUP_SECTION_DESCRIPTION': '''Sign up below to receive HDX Signals emails. You must select specific datasets, plus regions and/or HRP countries, to receive content that you are interested in.''', + + 'RESOURCES_SECTION_TITLE': '''Resources''', + 'RESOURCES_SECTION_DESCRIPTION': '''For more information about the datasets monitored by HDX signals as well as information for developers see the following:''', + 'RESOURCES_SECTION_PARAGRAPH': '''For more information, please contact us at hdx-signals@un.org.''', + + 'RESOURCES_CARD_TITLE_MAP': '''Signals Map''', + 'RESOURCES_CARD_TEXT_MAP': '''See a visualiziation of present and historic Signals''', + 'RESOURCES_CARD_BUTTON_MAP': '''Learn more''', + 'RESOURCES_CARD_BUTTON_LINK_MAP': '''https://baripembo.github.io/viz-hdx-signals/''', + + 'RESOURCES_CARD_TITLE_DATASET': '''Download HDX Signals dataset on HDX''', + 'RESOURCES_CARD_TEXT_DATASET': '''Preview or download the full HDX Signals dataset''', + 'RESOURCES_CARD_BUTTON_DATASET': '''Learn more''', + 'RESOURCES_CARD_BUTTON_LINK_DATASET': '''#''', + + 'RESOURCES_CARD_TITLE_METHODOLOGY': '''Methodology''', + 'RESOURCES_CARD_TEXT_METHODOLOGY': '''Read the HDX Signals methodology''', + 'RESOURCES_CARD_BUTTON_METHODOLOGY': '''Learn more''', + 'RESOURCES_CARD_BUTTON_LINK_METHODOLOGY': '''https://github.com/OCHA-DAP/hdx-signals''', + + 'RESOURCES_CARD_TITLE_REPOSITORY': '''Code Respository''', + 'RESOURCES_CARD_TEXT_REPOSITORY': '''Access the HDX Signals code repository''', + 'RESOURCES_CARD_BUTTON_REPOSITORY': '''Learn more''', + 'RESOURCES_CARD_BUTTON_LINK_REPOSITORY': '''https://github.com/OCHA-DAP/hdx-signals''', + + 'FAQ_SECTION_TITLE': '''FAQ''', + + 'PARTNERS_SECTION_TITLE': '''Partners''', +} + +DATA_COVERAGE_CONSTANTS = [ + { + "title": "Agricultural hotspots", + "organization": "European Commission’s Joint Research Centre Anomaly Hot Spots of Agricultural Production", + "link": "https://data.humdata.org/dataset/asap-hotspots-monthly" + }, + { + "title": "Conflict events", + "organization": "Armed Conflict Location & Event Data Project (ACLED)", + "link": "https://data.humdata.org/organization/acled" + }, + { + "title": "Food security", + "organization": "the Integrated Food Security Phase Classification (IPC)", + "link": "https://data.humdata.org/dataset/global-acute-food-insecurity-country-data" + }, + { + "title": "Internal displacement", + "organization": "the Internal Displacement Monitoring Centre (IDMC)", + "link": "https://data.humdata.org/organization/international-displacement-monitoring-centre-idmc" + }, + { + "title": "Market monitor", + "organization": "World Food Programme (WFP)", + "link": "https://data.humdata.org/organization/wfp" + }, +] + +SECTIONS_CONSTANTS = [ + {'name': 'Data Coverage', 'url': '#data-coverage'}, + {'name': 'Signup', 'url': '#signup'}, + {'name': 'Signals map', 'url': 'https://baripembo.github.io/viz-hdx-signals/'}, + {'name': 'Resources', 'url': '#resources'}, + {'name': 'FAQ', 'url': '#faq'}, +] diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/onboarding/request_create_organisation.py b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/onboarding/request_create_organisation.py index 65ea18a185..7630adfce0 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/onboarding/request_create_organisation.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/onboarding/request_create_organisation.py @@ -20,7 +20,11 @@ 'INPUT_ROLE_LABEL': '''Explain your role within the organisation''', 'INPUT_ROLE_PLACEHOLDER': '''''', 'INPUT_ROLE_ERROR': '''Role cannot be empty''', - 'TEXTAREA_DATA_TYPE_LABEL': '''What type of data would your organisation like to share? Please include details about the topics and locations covered by the data, along with the format''', + 'TEXTAREA_DATA_TYPE_LABEL': '''What type of data would your organisation like to share?''', + 'TEXTAREA_DATA_TYPE_LABEL_GUIDELINE_TITLE': '''Please describe:''', + 'TEXTAREA_DATA_TYPE_LABEL_GUIDELINE_1': '''the topic of the data - such as refugees, education etc.''', + 'TEXTAREA_DATA_TYPE_LABEL_GUIDELINE_2': '''the locations covered in the data - please specify if sub-national data is included''', + 'TEXTAREA_DATA_TYPE_LABEL_GUIDELINE_3': '''the file format in which the data is available - acceptable file formats are .csv or .xlsx for tabular data and zipped shapefile, kml and geojson formats for geographic data.''', 'TEXTAREA_DATA_TYPE_PLACEHOLDER': '''Education statistics, possibly school locations, and other secondary data for Somalia in CSV format''', 'TEXTAREA_DATA_TYPE_ERROR': '''Type of data cannot be empty''', 'SELECT_DATA_ALREADY_AVAILABLE_LABEL': '''Is the data already available publicly through a website?''', diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py index ecc863fcc2..490920d119 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py @@ -23,6 +23,7 @@ from ckanext.hdx_theme.views.ebola import hdx_ebola from ckanext.hdx_theme.views.faqs import hdx_faqs, hdx_main_faq from ckanext.hdx_theme.views.image_server import hdx_global_file_server, hdx_local_image_server +from ckanext.hdx_theme.views.landing_pages import hdx_landing_pages from ckanext.hdx_theme.views.package_links_custom_settings import hdx_package_links from ckanext.hdx_theme.views.quick_links_custom_settings import hdx_quick_links from ckanext.hdx_theme.views.splash_page import hdx_splash @@ -382,9 +383,9 @@ def postprocess_api_token(self, data, jti, data_dict): # IBlueprint def get_blueprint(self): - return [hdx_colored_page, hdx_faqs, hdx_main_faq, hdx_ebola, hdx_global_file_server, - hdx_local_image_server, hdx_carousel, hdx_custom_pages, - hdx_quick_links, hdx_package_links, hdx_archived_quick_links, hdx_splash, hdx_count] + return [hdx_colored_page, hdx_faqs, hdx_main_faq, hdx_ebola, hdx_global_file_server, hdx_local_image_server, + hdx_carousel, hdx_custom_pages, hdx_quick_links, hdx_package_links, hdx_archived_quick_links, + hdx_splash, hdx_count, hdx_landing_pages] # IClick def get_commands(self): diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/admin/carousel.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/admin/carousel.html index 1029132c1a..61aaea2f79 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/admin/carousel.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/admin/carousel.html @@ -48,7 +48,7 @@

Configure the homepage carousel items