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 c215552f9f..c5ddd21212 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 @@ -19,7 +19,7 @@ background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } /* END HDX Version display */ 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 029eaa41e8..ad39a25ca6 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/base/header.css @@ -4180,8 +4180,8 @@ ul.list-horizontal li:first-child:before { background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } /* END HDX Version display */ /* HEADER Search Widget */ 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 index 8d5042421b..39c485bd23 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/hero.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/hero.css @@ -4,7 +4,7 @@ .bem-hero__title { color: #000; font-weight: 400; - font-family: 'Gotham-Bold', sans-serif; + font-family: 'Gotham-Book', sans-serif; font-size: 48px; line-height: 48px; } @@ -40,7 +40,7 @@ line-height: 28px; } .bem-hero__image { - max-height: 50px; + max-height: 45px; } .bem-hero__sections { color: #000; diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/table.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/table.css new file mode 100644 index 0000000000..84daa213db --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/bem.blocks/table.css @@ -0,0 +1,58 @@ +.bem-table__thead { + font-weight: 600; + font-size: 18px; + line-height: 24px; + color: #000; +} +.bem-table__tbody { + font-size: 18px; + line-height: 24px; + color: #000; +} +.bem-table__cell a { + font-family: 'Inter', sans-serif; + font-size: 16px; + font-weight: 600; + color: #007CE1; +} +.bem-table_state_bordered { + border: 1px solid #E1E4ED; + border-radius: 8px; + box-shadow: 0 1px 4px 0 #D1D5DB; +} +@media (max-width: 768px) { + .bem-table_state_bordered { + border: 0; + border-radius: 0; + box-shadow: unset; + } +} +.bem-table_state_bordered .bem-table__thead .bem-table__row .row > *, +.bem-table_state_bordered .bem-table__tbody .bem-table__row .row > * { + border-bottom: 1px solid #E1E4ED; + border-right: 1px solid #E1E4ED; +} +.bem-table_state_bordered .bem-table__thead .bem-table__row .row > *:last-child, +.bem-table_state_bordered .bem-table__tbody .bem-table__row .row > *:last-child { + border-right: 0; +} +@media (max-width: 768px) { + .bem-table_state_bordered .bem-table__thead .bem-table__row .row > *, + .bem-table_state_bordered .bem-table__tbody .bem-table__row .row > * { + border-bottom: 0; + border-right: 0; + } +} +@media (max-width: 768px) { + .bem-table_state_bordered .bem-table__thead .bem-table__row, + .bem-table_state_bordered .bem-table__tbody .bem-table__row { + border: 1px solid #E1E4ED; + border-radius: 8px; + box-shadow: 0 1px 4px 0 #D1D5DB; + padding: 28px 32px; + } +} +.bem-table_state_bordered .bem-table__thead.bem-table__tbody .bem-table__row:last-child .row > *, +.bem-table_state_bordered .bem-table__tbody.bem-table__tbody .bem-table__row:last-child .row > * { + border-bottom: 0; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/css/empty.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/css/empty.css new file mode 100644 index 0000000000..e69de29bb2 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 9d3208d4a2..efc8737ec2 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 @@ -1637,8 +1637,8 @@ hr.dotted { background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } /* END HDX Version display */ /* Style breadcrumbs */ 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 52c1c62e09..fdb2bd444e 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 @@ -4212,8 +4212,8 @@ ul.list-horizontal li:first-child:before { background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } /* END HDX Version display */ /* HEADER Search Widget */ 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 f75119b993..66b29083b6 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 @@ -4307,8 +4307,8 @@ ul.list-horizontal li:first-child:before { background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } /* END HDX Version display */ /* HEADER Search Widget */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml index 6a9234a277..91d23466e3 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml @@ -142,6 +142,7 @@ bem-blocks-styles: - bem.blocks/form_button.css - bem.blocks/account_options.css - bem.blocks/info_box.css + - bem.blocks/table.css - bem.blocks/select2_field.css - bem.blocks/textarea_field.css @@ -347,11 +348,15 @@ onboarding-bulk-user-styles: - hdx_theme/onboarding-done-styles - hdx_theme/onboarding-select-org-styles - hdx_theme/onboarding-survey-styles + contents: + - css/empty.css onboarding-bulk-user-scripts: extra: preload: - hdx_theme/onboarding-scripts + contents: + - css/empty.css onboarding-bulk-user-complete-onboarding-scripts: extra: @@ -360,6 +365,8 @@ onboarding-bulk-user-complete-onboarding-scripts: - hdx_theme/onboarding-follow-scripts - hdx_theme/onboarding-invite-scripts - hdx_theme/onboarding-select-org-scripts + contents: + - css/empty.css onboarding-bulk-anon-styles: extra: @@ -367,12 +374,17 @@ onboarding-bulk-anon-styles: - hdx_theme/onboarding-styles - hdx_theme/onboarding-verify-styles - hdx_theme/onboarding-survey-styles + contents: + - css/empty.css + onboarding-bulk-anon-scripts: extra: preload: - hdx_theme/onboarding-scripts - hdx_theme/onboarding-password-scripts + contents: + - css/empty.css onboarding-verify-styles: output: ckanext-hdx_theme/%(version)s_onboarding-verify-styles.css @@ -664,6 +676,8 @@ dataset-read-styles: - hdx_theme/group-message-styles - requestdata/main-styles - hdx_theme/resource-list-styles + contents: + - css/empty.css dataset-light-scripts: <<: *common-js @@ -1006,6 +1020,8 @@ country-topline-scripts: - hdx_theme/country-scripts - hdx_theme/charting-scripts # this should not load here - hdx_theme/homepage-scripts + contents: + - css/empty.css country-topline-styles: output: ckanext-hdx_theme/%(version)s_country-topline-styles.css @@ -1084,6 +1100,8 @@ group-form-scripts: preload: - hdx_theme/ckan - hdx_theme/organization-form-styles + contents: + - css/empty.css group-list-scripts: <<: *common-js @@ -1338,6 +1356,8 @@ group-message-styles: dataviz-scripts: output: ckanext-hdx_theme/%(version)s_dataviz-scripts.js + contents: + - css/empty.css dataviz-styles: output: ckanext-hdx_theme/%(version)s_dataviz-styles.css diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_hapi.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_hapi.png new file mode 100644 index 0000000000..7741e38135 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_hapi.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_signals.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_signals.png index 4d5e87f29c..f0b329c33a 100644 Binary files a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_signals.png and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/logo_hdx_signals.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fsnwg.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fsnwg.png new file mode 100644 index 0000000000..df55498f50 Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fsnwg.png differ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fts.png b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fts.png new file mode 100644 index 0000000000..742880410a Binary files /dev/null and b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/images/landing_pages/partners/fts.png differ 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 3bf412410d..049a2953e6 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 @@ -24,8 +24,8 @@ background-repeat: no-repeat; background-position: left center; width: 126px; - height: 30px; - margin-top: 1px; + height: 28px; + margin-top: 3px; } } } 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 index d767c87755..de743726a6 100644 --- 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 @@ -6,7 +6,7 @@ &__title { color: @black-color; font-weight: 400; - font-family: 'Gotham-Bold', sans-serif; + font-family: 'Gotham-Book', sans-serif; font-size: 48px; line-height: 48px; @media (max-width: @breakpoint-lg) { @@ -43,7 +43,7 @@ } &__image { - max-height: 50px; + max-height: 45px; } &__sections { diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/table.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/table.less new file mode 100644 index 0000000000..3c69a151e4 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/bem.blocks/table.less @@ -0,0 +1,80 @@ +@import "bem_variables"; + +.bem-table { + + &__thead { + font-weight: 600; + font-size: 18px; + line-height: 24px; + color: @black-color; + } + + &__tbody { + font-size: 18px; + line-height: 24px; + color: @black-color; + } + + &__cell { + + a { + font-family: 'Inter', sans-serif; + font-size: 16px; + font-weight: 600; + color: @blue-light-color; + } + } + + &_state_bordered { + border: 1px solid @grey-extra-light-color; + border-radius: 8px; + box-shadow: 0 1px 4px 0 @grey-light-color; + + @media (max-width: @breakpoint-md) { + border: 0; + border-radius: 0; + box-shadow: unset; + } + + .bem-table__thead, + .bem-table__tbody { + .bem-table__row { + .row { + > * { + border-bottom: 1px solid @grey-extra-light-color; + border-right: 1px solid @grey-extra-light-color; + + &:last-child { + border-right: 0; + } + + @media (max-width: @breakpoint-md) { + border-bottom: 0; + border-right: 0; + } + + } + } + + @media (max-width: @breakpoint-md) { + border: 1px solid @grey-extra-light-color; + border-radius: 8px; + box-shadow: 0 1px 4px 0 @grey-light-color; + padding: 28px 32px; + } + } + + &.bem-table__tbody { + .bem-table__row { + &:last-child { + .row { + > * { + border-bottom: 0; + } + } + } + } + } + } + } +} 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 index a6ecc04e96..bf4913f289 100644 --- 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 @@ -1,11 +1,10 @@ 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''', + 'HERO_SECTION_DESCRIPTION': '''HDX 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.''', '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.''', + '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 10 sub-categories. Our beta version of HDX HAPI covers 44 indicators across 25 locations that have a Humanitarian Response Plan. This data has been shared by 9 different contributing organisations.''', + 'DATA_COVERAGE_SECTION_PARAGRAPH': '''Refer to the documentation for the latest coverage. Contact us to request additional indicators in future versions of HDX HAPI.''', 'BE_INSPIRED_SECTION_TITLE': '''Be Inspired''', 'BE_INSPIRED_SECTION_DESCRIPTION': '''Take a look at visualisations and code examples''', @@ -13,24 +12,24 @@ '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_BUTTON_LINK_POWER_BI': '''https://docs.google.com/presentation/d/19HfMI9gnKXAMhe0SFZdbbUFesNnTnfeUI9rnshN2kkk/edit?usp=sharing''', '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_BUTTON_LINK_API': '''https://hapi.humdata.org/docs''', '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_TEXT_VISUALIZATION': '''A dashboard with a selection of key figures, charts and a map for all countries in HDX HAPI.''', 'BE_INSPIRED_CARD_BUTTON_VISUALIZATION': '''Learn more''', - 'BE_INSPIRED_CARD_BUTTON_LINK_VISUALIZATION': '''#''', + 'BE_INSPIRED_CARD_BUTTON_LINK_VISUALIZATION': '''https://ocha-dap.github.io/hdx-hapi-example''', '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''', + 'FAQ_SECTION_TITLE': '''FAQs''', 'PARTNERS_SECTION_TITLE': '''Partners''', } @@ -38,63 +37,63 @@ 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" + "subcategory": "Humanitarian Needs", + "contributor": "OCHA offices", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/affected_people/#humanitarian-needs" }, { "category": "Affected People", - "title": "Refugees and Persons of Concern", - "organization": "UNHCR", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Refugees and Persons of Concern", + "contributor": "UN Refugee Agency (UNHCR)", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/affected_people/#refugees-persons-of-concern" }, { "category": "Coordination & Context", - "title": "3W", - "organization": "OCHA offices", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Conflict Events", + "contributor": "The Armed Conflict Location & Event Data Project (ACLED)", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/coordination_and_context/#conflict-events" }, { "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" + "subcategory": "Funding", + "contributor": "OCHA Financial Tracking System (FTS)", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/coordination_and_context/#funding" }, { "category": "Coordination & Context", - "title": "Funding", - "organization": "OCHA Financial Tracking System (FTS)", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "National Risk", + "contributor": "INFORM", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/coordination_and_context/#national-risk" }, { "category": "Coordination & Context", - "title": "National Risk", - "organization": "INFORM", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Who is Doing What Where - Operational Presence", + "contributor": "OCHA offices", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/coordination_and_context/#operational-presence" }, { "category": "Food Security & Nutrition", - "title": "Food Security", - "organization": "IPC", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Food Prices", + "contributor": "World Food Programme (WFP)", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/food_security_and_nutrition/#food-prices" }, { "category": "Food Security & Nutrition", - "title": "Food Prices", - "organization": "WFP", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Food Security", + "contributor": "Food Security and Nutrition Working Group, West and Central Africa", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/food_security_and_nutrition/#food-security" }, { "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" + "subcategory": "Population", + "contributor": "United Nations Population Fund (UNFPA) and OCHA offices", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/population_and_socio-economy/#baseline-population" }, { "category": "Population & Socio-economy", - "title": "Poverty Rate", - "organization": "OPHI", - "link": "https://docs.google.com/document/d/1phLaYU905R9oKqO5C4e5tQ8LTb1fv-MKkbGgONhCVGI/edit?usp=sharing" + "subcategory": "Poverty Rate", + "contributor": "The Oxford Poverty and Human Development Initiative (OPHI)", + "link": "https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/population_and_socio-economy/#poverty-rate" } ] 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 index ac98059eb7..4893b8db2a 100644 --- 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 @@ -32,7 +32,7 @@ 'RESOURCES_CARD_BUTTON_REPOSITORY': '''Learn more''', 'RESOURCES_CARD_BUTTON_LINK_REPOSITORY': '''https://github.com/OCHA-DAP/hdx-signals''', - 'FAQ_SECTION_TITLE': '''FAQ''', + 'FAQ_SECTION_TITLE': '''FAQs''', 'PARTNERS_SECTION_TITLE': '''Partners''', } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/faq_others/hapi-terms/main.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/faq_others/hapi-terms/main.html new file mode 100644 index 0000000000..4567270145 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/faq_others/hapi-terms/main.html @@ -0,0 +1,49 @@ +{% extends "faq_others/faq/main.html" %} + +{% block subtitle %}{{ _("HAPI Terms of Service") }}{% endblock %} + +{% block breadcrumb_content %} + +{% endblock %} + +{% block pre_primary %} +
+
+
+
+
+ {{ _('HAPI Terms of Service') }} +
+
+
+
+
+{% endblock %} + +{% block primary %} +
+
+
HAPI Terms of Service
+

+ By using the HDX HAPI, you acknowledge that you have read, understood, and agreed to these terms of service. +

+
+
+ {% snippet 'faq_others/questions_sections.html', data=data.faq_data %} +{% endblock %} + +{% block secondary %} +
+
+

+ {% snippet 'faq_others/faq/search.html' %} +

+
+
+{% endblock %} + + +{%- block styles %} + {{ super() }} + {% asset 'hdx_theme/faq-scripts' %} +{% endblock %} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/hapi.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/hapi.html index 3b409a7e86..c8a7aeec62 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/hapi.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/hapi.html @@ -5,50 +5,91 @@ {% block subtitle %}{{ _('HDX HAPI Beta') }}{% endblock %} {% block breadcrumb_content %} - + {% endblock %} {% block content %} - {{ h.snippet('bem.blocks/hero.html', title=CONST.HERO_SECTION_TITLE, text=CONST.HERO_SECTION_DESCRIPTION.format('mailto:hdx@un.org'), label=CONST.HERO_SECTION_LABEL, sections=sections, click_stopper_link_type='hapi jump nav', spacing_class="mb-5") }} + {{ h.snippet('bem.blocks/hero.html', title=CONST.HERO_SECTION_TITLE, text=CONST.HERO_SECTION_DESCRIPTION.format('mailto:hdx@un.org'), image='/images/landing_pages/logo_hdx_hapi.png', sections=sections, click_stopper_link_type='hapi jump nav', spacing_class="mb-3") }}
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.DATA_COVERAGE_SECTION_TITLE, heading_type=3, spacing_class="mb-1") }} {{ h.snippet('bem.blocks/paragraph.html', text=CONST.DATA_COVERAGE_SECTION_DESCRIPTION.format('https://data.humdata.org/dashboards/overview-of-data-grids', 'https://humanitarianaction.info/document/global-humanitarian-overview-2024/article/response-plans-overview-2024'), paragraph_classes=["paragraph__text_font-size-medium", "mt-4"]) }}
- {% for card in data_coverage %} -
- {{ h.snippet('bem.blocks/card.html', title=card.title, text=card.organization, badge=card.category, button='Learn more', link=card.link, click_stopper_link_type='hapi data coverage', click_stopper_link_label=card.title, card_classes=["bem-card_type-slim"]) }} +
+
+
+
+
+
+
Category
+
+
+
Sub-category
+
+
+
Contributor
+
+
+
+
+
+
+
+
+ {% for entry in data_coverage %} +
+
+
+
{{ entry.category }}
+
+
+
{{ entry.subcategory }}
+
+
+
{{ entry.contributor }}
+
+
+ +
+
+
+ {% endfor %} +
- {% endfor %} -
-
- {{ h.snippet('bem.blocks/paragraph.html', text=CONST.DATA_COVERAGE_SECTION_PARAGRAPH.format('https://hdx-hapi.readthedocs.io/en/latest/', 'mailto:hdx@un.org'), paragraph_classes=["paragraph__text_font-size-medium"]) }} +
+ {{ h.snippet('bem.blocks/paragraph.html', text=CONST.DATA_COVERAGE_SECTION_PARAGRAPH.format('https://hdx-hapi.readthedocs.io/en/latest/', 'mailto:hdx@un.org'), paragraph_classes=["paragraph__text_font-size-medium"]) }} +
+
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.BE_INSPIRED_SECTION_TITLE, heading_type=3, spacing_class="mb-1") }} {{ h.snippet('bem.blocks/paragraph.html', text=CONST.BE_INSPIRED_SECTION_DESCRIPTION, paragraph_classes=["paragraph__text_font-size-big"]) }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.BE_INSPIRED_CARD_TITLE_POWER_BI, text=CONST.BE_INSPIRED_CARD_TEXT_POWER_BI, button=CONST.BE_INSPIRED_CARD_BUTTON_POWER_BI, link=CONST.BE_INSPIRED_CARD_BUTTON_LINK_POWER_BI, click_stopper_link_type='hapi tools', click_stopper_link_label=CONST.BE_INSPIRED_CARD_TITLE_POWER_BI, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.BE_INSPIRED_CARD_TITLE_API, text=CONST.BE_INSPIRED_CARD_TEXT_API, button=CONST.BE_INSPIRED_CARD_BUTTON_API, link=CONST.BE_INSPIRED_CARD_BUTTON_LINK_API, click_stopper_link_type='hapi tools', click_stopper_link_label=CONST.BE_INSPIRED_CARD_TITLE_API, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.BE_INSPIRED_CARD_TITLE_VISUALIZATION, text=CONST.BE_INSPIRED_CARD_TEXT_VISUALIZATION, button=CONST.BE_INSPIRED_CARD_BUTTON_VISUALIZATION, link=CONST.BE_INSPIRED_CARD_BUTTON_LINK_VISUALIZATION, click_stopper_link_type='hapi tools', click_stopper_link_label=CONST.BE_INSPIRED_CARD_TITLE_VISUALIZATION, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.BE_INSPIRED_CARD_TITLE_CHATBOT, text=CONST.BE_INSPIRED_CARD_TEXT_CHATBOT, button=CONST.BE_INSPIRED_CARD_BUTTON_CHATBOT, link=CONST.BE_INSPIRED_CARD_BUTTON_LINK_CHATBOT, click_stopper_link_type='hapi tools', click_stopper_link_label=CONST.BE_INSPIRED_CARD_TITLE_CHATBOT, spacing_class="my-3") }}
@@ -56,14 +97,14 @@
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.FAQ_SECTION_TITLE, heading_type=3) }} {{ h.snippet('bem.blocks/faq.html', data=faq_data) }}
-
+
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/page.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/page.html index 79a6e2741a..433483ce17 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/page.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/page.html @@ -15,6 +15,3 @@ {% block header_core %} {% snippet 'header-mobile.html', page_has_desktop_version=False, page_has_mobile_version=False %} {% endblock %} - -{% block footer %} -{% endblock %} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html index bda26e9e5d..8c9b58122d 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html @@ -9,12 +9,12 @@ {% endblock %} {% block content %} - {{ h.snippet('bem.blocks/hero.html', title=CONST.HERO_SECTION_TITLE, text=CONST.HERO_SECTION_DESCRIPTION.format('mailto:hdx-signals@un.org'), image='/images/landing_pages/logo_hdx_signals.png', sections=sections, click_stopper_link_type='signals jump nav', spacing_class="mb-5") }} + {{ h.snippet('bem.blocks/hero.html', title=CONST.HERO_SECTION_TITLE, text=CONST.HERO_SECTION_DESCRIPTION.format('mailto:hdx-signals@un.org'), image='/images/landing_pages/logo_hdx_signals.png', sections=sections, click_stopper_link_type='signals jump nav', spacing_class="mb-3") }}
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.SIGNUP_SECTION_TITLE, heading_type=3, spacing_class="mb-1") }}
@@ -349,7 +349,7 @@
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.DATA_COVERAGE_SECTION_TITLE, heading_type=3, spacing_class="mb-1") }} {{ h.snippet('bem.blocks/paragraph.html', text=CONST.DATA_COVERAGE_SECTION_DESCRIPTION, paragraph_classes=["paragraph__text_font-size-medium", "mt-4"]) }} @@ -365,22 +365,22 @@
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.RESOURCES_SECTION_TITLE, heading_type=3, spacing_class="mb-1") }} {{ h.snippet('bem.blocks/paragraph.html', text=CONST.RESOURCES_SECTION_DESCRIPTION, paragraph_classes=["paragraph__text_font-size-big"]) }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.RESOURCES_CARD_TITLE_MAP, text=CONST.RESOURCES_CARD_TEXT_MAP, button=CONST.RESOURCES_CARD_BUTTON_MAP, link=CONST.RESOURCES_CARD_BUTTON_LINK_MAP, click_stopper_link_type='signals resources', click_stopper_link_label=CONST.RESOURCES_CARD_TITLE_MAP, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.RESOURCES_CARD_TITLE_DATASET, text=CONST.RESOURCES_CARD_TEXT_DATASET, button=CONST.RESOURCES_CARD_BUTTON_DATASET, link=CONST.RESOURCES_CARD_BUTTON_LINK_DATASET, click_stopper_link_type='signals resources', click_stopper_link_label=CONST.RESOURCES_CARD_TITLE_DATASET, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.RESOURCES_CARD_TITLE_METHODOLOGY, text=CONST.RESOURCES_CARD_TEXT_METHODOLOGY, button=CONST.RESOURCES_CARD_BUTTON_METHODOLOGY, link=CONST.RESOURCES_CARD_BUTTON_LINK_METHODOLOGY, click_stopper_link_type='signals resources', click_stopper_link_label=CONST.RESOURCES_CARD_TITLE_METHODOLOGY, spacing_class="my-3") }}
-
+
{{ h.snippet('bem.blocks/card.html', title=CONST.RESOURCES_CARD_TITLE_REPOSITORY, text=CONST.RESOURCES_CARD_TEXT_REPOSITORY, button=CONST.RESOURCES_CARD_BUTTON_REPOSITORY, link=CONST.RESOURCES_CARD_BUTTON_LINK_REPOSITORY, click_stopper_link_type='signals resources', click_stopper_link_label=CONST.RESOURCES_CARD_TITLE_REPOSITORY, spacing_class="my-3") }}
@@ -391,14 +391,14 @@
-
+
{{ h.snippet('bem.blocks/heading.html', title=CONST.FAQ_SECTION_TITLE, heading_type=3) }} {{ h.snippet('bem.blocks/faq.html', data=faq_data) }}
-
+
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py index be7f3b4461..870405c835 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py @@ -1 +1 @@ -hdx_version = 'v1.81.2' +hdx_version = 'v1.82.0' diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/views/landing_pages.py b/ckanext-hdx_theme/ckanext/hdx_theme/views/landing_pages.py index e394c86a5d..ecd9ffb3dc 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/views/landing_pages.py +++ b/ckanext-hdx_theme/ckanext/hdx_theme/views/landing_pages.py @@ -2,7 +2,7 @@ import flask import ckan.plugins.toolkit as tk import ckanext.hdx_theme.helpers.faq_wordpress as fw -from ckan.common import config +from ckanext.hdx_theme.views.faqs import read as faq_read from ckanext.hdx_theme.helpers.ui_constants.landing_pages.hapi import \ DATA_COVERAGE_CONSTANTS as HAPI_DATA_COVERAGE_CONSTANTS, SECTIONS_CONSTANTS as HAPI_SECTIONS_CONSTANTS from ckanext.hdx_theme.helpers.ui_constants.landing_pages.signals import \ @@ -13,6 +13,7 @@ check_access = tk.check_access get_action = tk.get_action render = tk.render +config = tk.config log = logging.getLogger(__name__) @@ -24,12 +25,12 @@ def hapi(): data = fw.faq_for_category(wp_category_terms) partners = [ - ('european_comission', 'European Commission'), ('acled', 'ACLED'), ('inform', 'INFORM'), - ('ipc', 'IPC'), + ('fts', 'FTS'), ('unfpa', 'UNFPA'), ('ophi', 'OPHI'), + ('fsnwg', 'FSNWG'), ('unchr', 'UNHCR'), ('ocha', 'OCHA'), ('wfp', 'WFP') @@ -47,6 +48,10 @@ def hapi(): return render('landing_pages/hapi.html', extra_vars=template_data) +def hapi_terms(): + return faq_read('hapi-terms') + + def signals(): wp_category_terms = config.get('hdx.wordpress.category.signals') data = fw.faq_for_category(wp_category_terms) @@ -72,5 +77,6 @@ def signals(): return render('landing_pages/signals.html', extra_vars=template_data) -# hdx_landing_pages.add_url_rule(u'/hapi/', view_func=hapi, strict_slashes=False) -# hdx_landing_pages.add_url_rule(u'/signals/', view_func=signals, strict_slashes=False) +hdx_landing_pages.add_url_rule(u'/hapi/', view_func=hapi, strict_slashes=False) +hdx_landing_pages.add_url_rule(u'/hapi/terms/', view_func=hapi_terms, strict_slashes=False) +hdx_landing_pages.add_url_rule(u'/signals/', view_func=signals, strict_slashes=False) diff --git a/ckanext-hdx_users/ckanext/hdx_users/views/signin.py b/ckanext-hdx_users/ckanext/hdx_users/views/signin.py index 617c47ad90..ca91cfde99 100644 --- a/ckanext-hdx_users/ckanext/hdx_users/views/signin.py +++ b/ckanext-hdx_users/ckanext/hdx_users/views/signin.py @@ -1,6 +1,6 @@ from typing import Union, Any, Optional, Mapping from urllib.parse import quote - +import logging from flask import Blueprint, Response from ckan.common import session @@ -18,6 +18,8 @@ hdx_signin = Blueprint(u'hdx_signin', __name__, url_prefix=u'/') +log = logging.getLogger(__name__) + abort = tk.abort render = tk.render request = tk.request @@ -130,9 +132,11 @@ def login() -> Union[Response, str]: session['from_login'] = True res = next_page_or_default(next) _remember_user_for_next_signin(res, user_obj) + log.warning(f'Login succeeded for: {username_or_email}') return res else: extra_vars['error_message'] = _(u"Login failed. Bad username or password.") + log.warning(f'Login failed for: {username_or_email} . Bad username or password.') return render("user/signin.html", extra_vars=extra_vars) info_message_type = request.args.get('info_message_type') diff --git a/common-config-ini.txt b/common-config-ini.txt index a63abcbfda..9e11d09755 100644 --- a/common-config-ini.txt +++ b/common-config-ini.txt @@ -376,6 +376,7 @@ hdx.wordpress.category.devs=568 hdx.wordpress.category.terms=577 hdx.wordpress.category.licenses=581 hdx.wordpress.category.hapi=597 +hdx.wordpress.category.hapi-terms=599 hdx.wordpress.category.signals=595 # HDX http headers