From b2f02ba83b0e4c19ac1f541b162d5c6346f09327 Mon Sep 17 00:00:00 2001 From: roshni73 Date: Tue, 29 Oct 2024 17:15:27 +0545 Subject: [PATCH] Add resource page --- src/views/Resources/i18n.json | 37 +++--- src/views/Resources/index.tsx | 172 ++++++++++++++++++++------ src/views/Resources/styles.module.css | 29 ++--- 3 files changed, 166 insertions(+), 72 deletions(-) diff --git a/src/views/Resources/i18n.json b/src/views/Resources/i18n.json index 7f6890f5..ca581735 100644 --- a/src/views/Resources/i18n.json +++ b/src/views/Resources/i18n.json @@ -2,18 +2,27 @@ "namespace": "resources", "strings": { "resourceHeadingTitle": "Resources", - "resourceAlerthubTitle":"IFRC Alert Hub - Resources", - "resourceHeadingDescription":"Alert Hub is an open source web project developed in collaboration with the International Federation of Red Cross and Red Crescent Societies (IFRC) as a part of the University College London (UCL) Industry Exchange Network (IXN). You can find all the source code and instructions under the following repositories.", - "resourceAlertHubAPIs":"Alert Hub APIs", - "resourceAlertHubAPIsDescription":"Alert Hub APIs enable third-party developers and rebroadcasters to access alerts and alert feed.", - "resourceLearMore":"Learn More", - "resourceAlertHubFrontendTitle":"Alert Hub Frontend", - "resourceAlertHubFrontendDescription":"This repository contains the frontend code for the IFRC Alert Hub. The goal of the IFRC Alert Hub is to ensure that communities everywhere receive the most timely and effective emergency alerting possible, and can thereby take action to safeguard their lives and livelihoods.", - "resourceAlertHubCapAggregatorTitle":"Alert Hub CAP Aggregator", - "resourceAlertHubCapAggregatorDescription":"The CAP Aggregator is an alert aggregation service built for IFRC's Alert Hub. Public alerts use the Common Alerting Protocol (CAP) Version 1.2 standard.", - "resourceAlertHubAlertManagerTitle":"Alert Hub Alert Manager", - "resourceAlertHubAlertManagerDescription":"The Alert Manager is an alert distribution service built for IFRC's Alert Hub. Public alerts use the Common Alerting Protocol (CAP) Version 1.2 standard.", - "resourceAlertHubSubscriptionSystemTitle":"Alert Hub Subscription System", - "resourceAlertHubSubscriptionSystemDescription":"This project serves as a back-end application of IFRC Alert Hub designed to work with IFRC/UCL Alert Hub CAP Aggregator. This application relies on it to get real-time updates about alerts." - } + "resourceAlerthubTitle": "IFRC Alert Hub - Resources", + "resourceHeadingDescription": "Alert Hub is an open source web project developed in collaboration with the International Federation of Red Cross and Red Crescent Societies (IFRC) as a part of the University College London (UCL) Industry Exchange Network (IXN). You can find all the source code and instructions under the following repositories.", + "earlyWarningResourcesTitle": "Early Warning Resources", + "earlyWarningResourceIfrcewea":"IFRC Early Warning, Early Action", + "earlyWarningResourceGdpcEws": "GDPC Early Warning Systems", + "earlyWarningResourceWmoCapCourse": "WMO Common Alerting Protocol Course", + "earlyWarningResourceIfrcPape": "IFRC PAPE Messages", + "faqSectionTitle": "FAQ", + "faqWhoIsTheAudience": "Who is the audience of the IFRC AlertHub?", + "faqWhoIsBehind": "Who is behind it?", + "faqHowToAccess": "How to access the API?", + "howToSubscribeTitle": "How to Subscribe?", + "ifrcRelatedLinksTitle": "IFRC related links:", + "ifrcRelatedLinksGo": "GO", + "ifrcRelatedLinksGdpc": "GDPC", + "ifrcRelatedLinksClimateCenter": "Climate Centre", + "ifrcRelatedLinksAnticipationHub": "Anticipation Hub", + "ifrcRelatedExternalLinksTitle": "External links:", + "ifrcRelatedExternalLinksGo": "WMO register of alerting authorities", + "ifrcRelatedExternalLinksCapImplementation": "CAP implementation workshop", + "ifrcRelatedExternalLinksGooglePublicAlerts": "Google Public Alerts", + "ifrcRelatedExternalLinksEarlyWarningAllInitiative":"Early Warning For All Initiative" + } } \ No newline at end of file diff --git a/src/views/Resources/index.tsx b/src/views/Resources/index.tsx index c646e482..84c44b84 100644 --- a/src/views/Resources/index.tsx +++ b/src/views/Resources/index.tsx @@ -1,3 +1,4 @@ +import { ExternalLinkLineIcon } from '@ifrc-go/icons'; import { Container } from '@ifrc-go/ui'; import { useTranslation } from '@ifrc-go/ui/hooks'; @@ -11,72 +12,161 @@ import styles from './styles.module.css'; export function Component() { const strings = useTranslation(i18n); - const resourceData = [ + const earlyWarningResources = [ { id: 1, - heading: strings.resourceAlertHubAPIs, - description: strings.resourceAlertHubAPIsDescription, + title: strings.earlyWarningResourceIfrcewea, + url: 'https://www.ifrc.org/our-work/disasters-climate-and-crises/climate-smart-disaster-risk-reduction/early-warning-early', + }, + { + id: 2, + title: strings.earlyWarningResourceGdpcEws, + url: 'https://preparecenter.org/topic/early-warning-systems/', + }, + { + id: 3, + title: strings.earlyWarningResourceWmoCapCourse, + url: 'https://etrp.wmo.int/course/view.php?id=157', + }, + { + id: 4, + title: strings.earlyWarningResourceIfrcPape, + url: 'https://www.ifrc.org/our-work/disasters-climate-and-crises/climate-smart-disaster-risk-reduction/PAPE', + }, + ]; + const frequentlyAskedQuestion = [ + { + id: 1, + title: strings.faqWhoIsTheAudience, + url: 'https://alerthub.ifrc.org/about', + }, + { + id: 2, + title: strings.faqWhoIsBehind, + url: 'https://alerthub.ifrc.org/feeds', + }, + { + id: 3, + title: strings.faqHowToAccess, url: 'https://github.com/IFRCGo/alert-hub-web-app/blob/develop/APIDOCS.md', }, + + ]; + const ifrcResources = [ + { + id: 1, + title: strings.ifrcRelatedLinksGo, + url: 'https://go.ifrc.org/', + }, { id: 2, - heading: strings.resourceAlertHubFrontendTitle, - description: strings.resourceAlertHubFrontendDescription, - url: 'https://github.com/IFRCGo/alert-hub-web-app#readme', + title: strings.ifrcRelatedLinksGdpc, + url: 'https://preparecenter.org/', }, { id: 3, - heading: strings.resourceAlertHubCapAggregatorTitle, - description: strings.resourceAlertHubCapAggregatorDescription, - url: 'https://github.com/IFRC-Alert-Hub/Alert-Hub-CAP-Aggregator#readme', + title: strings.ifrcRelatedLinksClimateCenter, + url: 'https://www.climatecentre.org/', }, { id: 4, - heading: strings.resourceAlertHubAlertManagerTitle, - description: strings.resourceAlertHubAlertManagerDescription, - url: 'https://github.com/IFRC-Alert-Hub/Alert-Hub-Alert-Manager#readme', + title: strings.ifrcRelatedLinksAnticipationHub, + url: 'https://www.anticipation-hub.org/', + }, + ]; + const externalResources = [ + { + id: 1, + title: strings.ifrcRelatedExternalLinksGo, + url: 'https://alertingauthority.wmo.int', + }, + { + id: 2, + title: strings.ifrcRelatedExternalLinksCapImplementation, + url: 'https://cap-workshop.alert-hub.org/2023/index.html', + }, + { + id: 3, + title: strings.ifrcRelatedExternalLinksGooglePublicAlerts, + url: 'https://support.google.com/publicalerts/?hl=en', }, { - id: 5, - heading: strings.resourceAlertHubSubscriptionSystemTitle, - description: strings.resourceAlertHubSubscriptionSystemDescription, - url: 'https://github.com/IFRC-Alert-Hub/Alert-Hub-Subscription-System#readme', + id: 4, + title: strings.ifrcRelatedExternalLinksEarlyWarningAllInitiative, + url: 'https://www.un.org/en/climatechange/early-warnings-for-all', }, ]; return ( - {resourceData.map( - (resource) => ( - - {strings.resourceLearMore} - - )} - > - {resource.description} - - ), - )} + {earlyWarningResources.map((resource) => ( + } + external + > + {resource.title} + + ))} + + + {frequentlyAskedQuestion.map((faq) => ( + } + external + > + {faq.title} + + ))} + + + + {ifrcResources.map((externalLink) => ( + } + external + > + {externalLink.title} + + ))} + + + + {externalResources.map((externalLink) => ( + } + external + > + {externalLink.title} + + ))} ); diff --git a/src/views/Resources/styles.module.css b/src/views/Resources/styles.module.css index 001a5256..21876c86 100644 --- a/src/views/Resources/styles.module.css +++ b/src/views/Resources/styles.module.css @@ -1,21 +1,16 @@ .resources { - .resources-card { - display: flex; - flex-direction: column; - gap: var(--go-ui-spacing-sm); - border-radius: var(--go-ui-border-radius-lg); - box-shadow: var(--go-ui-box-shadow-md); - padding: var(--go-ui-spacing-md); - - .resources-item { - text-decoration: none; - color: var(--go-ui-color-primary-red); - font-weight: var(--go-ui-font-weight-medium); - } + display: flex; + flex-direction: column; + gap: var(--go-ui-spacing-lg); - .resources-item:hover { - text-decoration: underline; - color: var(--go-ui-color-primary-red); - } + .resource-link{ + display: flex; + padding-bottom: var(--go-ui-spacing-md); + text-decoration: none; + font-weight: var(--go-ui-font-weight-normal); + } + .resource-link:hover { + text-decoration: underline; + color: var(--go-ui-color-red-hover); } }