From caf7e54cb6790aac7a6effe07db7aa1845815d6c Mon Sep 17 00:00:00 2001 From: Jeff Reiffers Date: Wed, 25 Oct 2023 07:44:37 +0200 Subject: [PATCH] feat: transport pages and menu --- src/app/app-nav-bar/app-nav-bar.tsx | 6 +- src/app/app.jsx | 28 ++++-- src/app/breadcrumbs/breadcrumbs.component.jsx | 62 +++++++++++++ src/components/side-menu/index.tsx | 26 ++++-- src/components/side-menu/styled.ts | 27 ++++-- .../transport-portal-footer/index.tsx | 5 +- src/constants/constants.js | 14 ++- src/l10n/en.json | 38 ++++---- src/l10n/nb.json | 31 +++---- src/l10n/nn.json | 33 +++---- src/pages/cms-information-page/styled.ts | 2 +- src/pages/cms-transport-page/index.tsx | 87 +++++++++++++++++-- src/pages/cms-transport-page/styled.ts | 14 +-- src/routes.ts | 24 ++++- 14 files changed, 297 insertions(+), 100 deletions(-) diff --git a/src/app/app-nav-bar/app-nav-bar.tsx b/src/app/app-nav-bar/app-nav-bar.tsx index 685edec6c..410af4228 100644 --- a/src/app/app-nav-bar/app-nav-bar.tsx +++ b/src/app/app-nav-bar/app-nav-bar.tsx @@ -13,7 +13,6 @@ import { PATHNAME_REPORTS, PATHNAME_ABOUT, PATHNAME_ABOUT_REGISTRATION, - PATHNAME_ABOUT_NAP, PATHNAME_AI, PATHNAME_HOME_NAP, PATHNAME_ORGANIZATIONS, @@ -22,7 +21,8 @@ import { PATHNAME_ABOUT_DATASETS, PATHNAME_GUIDANCE, PATHNAME_NEWS_ARCHIVE, - PATHNAME_REQUESTS + PATHNAME_REQUESTS, + PATHNAME_TRANSPORT_GENERAL } from '../../constants/constants'; import { themeFDK, themeNAP } from '../theme'; @@ -39,7 +39,7 @@ interface Props { const transportItems = () => [ - {localization.menu.aboutNap} + {localization.menu.aboutNap} , diff --git a/src/app/app.jsx b/src/app/app.jsx index 82c5015c2..ed537b466 100644 --- a/src/app/app.jsx +++ b/src/app/app.jsx @@ -46,8 +46,17 @@ import { PATHNAME_ABOUT_CONCEPTS, PATHNAME_ABOUT_INFORMATIONMODELS, PATHNAME_AI, - PATHNAME_TRANSPORT, - PATHNAME_REQUESTS + PATHNAME_REQUESTS, + PATHNAME_TRANSPORT_GENERAL, + PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + PATHNAME_TRANSPORT_GENERAL_ITS, + PATHNAME_TRANSPORT_GENERAL_ROLES, + PATHNAME_TRANSPORT_USERS_NEWS, + PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + PATHNAME_TRANSPORT_USERS_WHAT, + PATHNAME_TRANSPORT_USERS_WHERE, + PATHNAME_TRANSPORT_PROVIDERS_ADD, + PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE } from '../constants/constants'; import ScrollToTop from '../components/scroll-to-top'; import { getConfig } from '../config'; @@ -59,8 +68,8 @@ import { CmsArticlePage } from '../pages/cms-article-page/cms-article-page'; import OrganizationsRouter from '../pages/organizations'; import InformationPage from '../pages/cms-information-page'; import TransportPage from '../pages/cms-transport-page'; -import RequestsPage from '../pages/requests'; import { AiProjectPage } from '../pages/ai-project-page'; +import RequestsPage from '../pages/requests'; import { parseSearchParams } from '../lib/location-history-helper'; import routes from '../routes'; @@ -115,8 +124,17 @@ export function App({ language, onChangeLanguage }) { [PATHNAME_ABOUT_CONCEPTS]: InformationPage, [PATHNAME_ABOUT_INFORMATIONMODELS]: InformationPage, [PATHNAME_AI]: AiProjectPage, - [PATHNAME_TRANSPORT]: TransportPage, - [PATHNAME_REQUESTS]: RequestsPage + [PATHNAME_REQUESTS]: RequestsPage, + [PATHNAME_TRANSPORT_GENERAL]: TransportPage, + [PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL]: TransportPage, + [PATHNAME_TRANSPORT_GENERAL_ITS]: TransportPage, + [PATHNAME_TRANSPORT_GENERAL_ROLES]: TransportPage, + [PATHNAME_TRANSPORT_USERS_NEWS]: TransportPage, + [PATHNAME_TRANSPORT_USERS_DATA_IN_NAP]: TransportPage, + [PATHNAME_TRANSPORT_USERS_WHAT]: TransportPage, + [PATHNAME_TRANSPORT_USERS_WHERE]: TransportPage, + [PATHNAME_TRANSPORT_PROVIDERS_ADD]: TransportPage, + [PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE]: TransportPage }; return ( diff --git a/src/app/breadcrumbs/breadcrumbs.component.jsx b/src/app/breadcrumbs/breadcrumbs.component.jsx index 029170cab..3ddf11898 100644 --- a/src/app/breadcrumbs/breadcrumbs.component.jsx +++ b/src/app/breadcrumbs/breadcrumbs.component.jsx @@ -25,6 +25,16 @@ import { PATHNAME_ABOUT_CONCEPTS, PATHNAME_ABOUT_INFORMATIONMODELS, PATHNAME_AI, + PATHNAME_TRANSPORT_GENERAL, + PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + PATHNAME_TRANSPORT_GENERAL_ITS, + PATHNAME_TRANSPORT_GENERAL_ROLES, + PATHNAME_TRANSPORT_USERS_NEWS, + PATHNAME_TRANSPORT_USERS_WHERE, + PATHNAME_TRANSPORT_USERS_WHAT, + PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + PATHNAME_TRANSPORT_PROVIDERS_ADD, + PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, PATHNAME_REQUESTS } from '../../constants/constants'; import DatasetBreadcrumb from './dataset-breadcrumb'; @@ -137,6 +147,58 @@ const routes = [ path: PATHNAME_AI, breadcrumb: () => }, + { + path: PATHNAME_TRANSPORT_GENERAL, + breadcrumb: () => + }, + { + path: PATHNAME_TRANSPORT_GENERAL_ROLES, + breadcrumb: () => ( + + ) + }, + { + path: PATHNAME_TRANSPORT_GENERAL_ITS, + breadcrumb: () => ( + + ) + }, + { + path: PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + breadcrumb: () => ( + + ) + }, + { + path: PATHNAME_TRANSPORT_USERS_NEWS, + breadcrumb: () => + }, + { + path: PATHNAME_TRANSPORT_USERS_WHERE, + breadcrumb: () => ( + + ) + }, + { + path: PATHNAME_TRANSPORT_USERS_WHAT, + breadcrumb: () => ( + + ) + }, + { + path: PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + breadcrumb: () => + }, + { + path: PATHNAME_TRANSPORT_PROVIDERS_ADD, + breadcrumb: () => + }, + { + path: PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, + breadcrumb: () => ( + + ) + }, { path: PATHNAME_REQUESTS, breadcrumb: () => diff --git a/src/components/side-menu/index.tsx b/src/components/side-menu/index.tsx index baed92941..2893f4b55 100644 --- a/src/components/side-menu/index.tsx +++ b/src/components/side-menu/index.tsx @@ -4,8 +4,9 @@ import { NavLink as RouteLink } from 'react-router-dom'; import SC from './styled'; interface MenuItem { - id: string; + id?: string; title: string; + items?: MenuItem[]; } interface Props { @@ -16,10 +17,25 @@ interface Props { const SideMenu: FC = ({ menuItems = [], isSticky, ...props }) => (
    - {menuItems.map(({ id, title: menuItemTitle }) => ( - - {menuItemTitle} - + {menuItems.map(({ id, title: menuItemTitle, items }) => ( + <> + 0 && !id}> + {id ? ( + {menuItemTitle} + ) : ( + {menuItemTitle} + )} + + {items?.map(({ id: subId, title: subMenuItemTitle }) => ( + + {subId ? ( + {subMenuItemTitle} + ) : ( + {subMenuItemTitle} + )} + + ))} + ))}
diff --git a/src/components/side-menu/styled.ts b/src/components/side-menu/styled.ts index 97b83be1f..e25e102ca 100644 --- a/src/components/side-menu/styled.ts +++ b/src/components/side-menu/styled.ts @@ -38,11 +38,24 @@ const Menu = styled.nav` `} `; -const MenuItem = styled.li` +const MenuItem = styled.li<{ isGroup?: boolean }>` align-items: center; display: flex; list-style: none; + ${({ isGroup = false }) => + isGroup + ? css` + font-weight: ${t.fontWeight('FW500')}; + ` + : css` + &:hover { + background-color: ${({ theme }) => theme.light}; + border-radius: 5px; + flex: 1; + } + `} + & > a { color: ${({ theme }) => theme.dark}; flex: 1; @@ -57,16 +70,14 @@ const MenuItem = styled.li` flex: 1; } - &:hover { - background-color: ${({ theme }) => theme.light}; - border-radius: 5px; - flex: 1; - } - ${onMobileView} { margin: 0; padding: 12px 0; } `; -export default { Menu, MenuItem }; +const SubMenuItem = styled(MenuItem)` + margin-left: 1em; +`; + +export default { Menu, MenuItem, SubMenuItem }; diff --git a/src/components/transport-portal-footer/index.tsx b/src/components/transport-portal-footer/index.tsx index f352a81d8..632a7884f 100644 --- a/src/components/transport-portal-footer/index.tsx +++ b/src/components/transport-portal-footer/index.tsx @@ -4,7 +4,8 @@ import Link from '@fellesdatakatalog/link'; import { PATHNAME_ABOUT_REGISTRATION, - PATHNAME_DATASETS + PATHNAME_DATASETS, + PATHNAME_TRANSPORT_GENERAL } from '../../constants/constants'; import translations from '../../lib/localization'; @@ -31,7 +32,7 @@ const TransportPortalFooter: FC = () => ( {translations.footer.searchDatasets} - + {translations.menu.aboutNap} diff --git a/src/constants/constants.js b/src/constants/constants.js index a21e967eb..42446559c 100644 --- a/src/constants/constants.js +++ b/src/constants/constants.js @@ -33,8 +33,20 @@ export const PATHNAME_COMMUNITY_COMMENTS = '/category/12/kommentartråder'; export const PATHNAME_AI = '/kunstig-intelligens'; export const EXTERNAL_AI_PAGE = 'https://www.digdir.no/kunstig-intelligens/kunstig-intelligens-i-offentlig-sektor/4276'; -export const PATHNAME_TRANSPORT = '/transport'; export const PATHNAME_REQUESTS = '/requests'; +export const PATHNAME_TRANSPORT = '/transport'; +export const PATHNAME_TRANSPORT_GENERAL = `${PATHNAME_TRANSPORT}/general`; +export const PATHNAME_TRANSPORT_GENERAL_ROLES = `${PATHNAME_TRANSPORT_GENERAL}/roles-and-responsibilities`; +export const PATHNAME_TRANSPORT_GENERAL_ITS = `${PATHNAME_TRANSPORT_GENERAL}/its-directive-and-delegated-regulations`; +export const PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL = `${PATHNAME_TRANSPORT_GENERAL}/information-about-the-portal`; +export const PATHNAME_TRANSPORT_USERS = `${PATHNAME_TRANSPORT}/users`; +export const PATHNAME_TRANSPORT_USERS_NEWS = `${PATHNAME_TRANSPORT_USERS}/news`; +export const PATHNAME_TRANSPORT_USERS_WHERE = `${PATHNAME_TRANSPORT_USERS}/where-do-i-find-the-data`; +export const PATHNAME_TRANSPORT_USERS_WHAT = `${PATHNAME_TRANSPORT_USERS}/what-data-is-available`; +export const PATHNAME_TRANSPORT_USERS_DATA_IN_NAP = `${PATHNAME_TRANSPORT_USERS}/data-in-nap`; +export const PATHNAME_TRANSPORT_PROVIDERS = `${PATHNAME_TRANSPORT}/providers`; +export const PATHNAME_TRANSPORT_PROVIDERS_ADD = `${PATHNAME_TRANSPORT_PROVIDERS}/add-data`; +export const PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE = `${PATHNAME_TRANSPORT_PROVIDERS}/declaration-of-compliance`; export const PARAGRAPH__BODY = 'paragraph--body'; export const PARAGRAPH__IMAGE = 'paragraph--image'; diff --git a/src/l10n/en.json b/src/l10n/en.json index cd34c549d..8f10f800a 100644 --- a/src/l10n/en.json +++ b/src/l10n/en.json @@ -167,7 +167,20 @@ "aboutConcepts": "About concept catalog", "aboutInformationModels": "About information model catalog", "ai": "Artificial intelligence", - "requests": "Requests" + "requests": "Requests", + "transportGeneral": "General information", + "transportInformationAboutThePortal": "Information about the portal", + "transportRolesAndResponsibilies": "Roles and responsibilities", + "transportItsDirectiveAndDelegatedRegulations": "ITS directive and delegated regulations", + "transportUsers": "For data users", + "transportNews": "News", + "transportWhereDoIFindTheData": "Where do I find the data?", + "transportWhatDataIsAvailable": "What data is available?", + "transportDataInNap": "Data in NAP", + "transportProviders": "For data providers", + "transportAddData": "Add data", + "transportDeclarationOfCompliance": "Declaration of Compliance" + }, "query": { "intro": "Example: public transport", @@ -193,15 +206,14 @@ }, "page": { "navigation": "Sidenavigering", - "next": "Next page", - "prev": "Previous page", + "next": "Neste side", + "prev": "Forrige side", "resultsTab": "All", "datasetTab": "Datasets", "apiTab": "APIs", "termTab": "Concepts", "informationModelTab": "Information models", - "serviceTab": "Services and events", - "requests": "Requests" + "serviceTab": "Services and events" }, "hitstats": { "nosearch": "Search among {0} datasets, {1} APIs, {2} concepts and {3} information models", @@ -225,7 +237,6 @@ "standard": "Standard", "showmore": "Show more", "showfewer": "Show fewer", - "showAll": "Show all", "publishers": { "STAT": "Central authority", "FYLKE": "County", @@ -1175,20 +1186,5 @@ "email": "E-mail:", "submitNewProject": "You can register new projects here:", "submit": "Register" - }, - "requestsPage": { - "title": "Requests", - "ingress": "Here you will find an overview of all requests published in the {lenke}. You can subscribe to, vote on, or comment on requests.", - "requests": "Requests from the Data Community", - "votes": "Number of Votes", - "views": "Number of Views", - "createRequest": "Create request", - "requestData": "Request data", - "requestDataInfo": "Do you want to request data, APIs, or anything else you can do it here. You will be redirected to datalandsbyen.no.", - "newestToOldest": "Newest to Oldest", - "mostVotes": "Most Votes", - "mostViews": "Most Views", - "view": "View", - "search": "Free text search in titles" } } diff --git a/src/l10n/nb.json b/src/l10n/nb.json index 09b13eb50..b4055c221 100644 --- a/src/l10n/nb.json +++ b/src/l10n/nb.json @@ -167,6 +167,18 @@ "aboutConcepts": "Om begrepskatalogen", "aboutInformationModels": "Om informasjonsmodell-katalogen", "ai": "Kunstig intelligens", + "transportGeneral": "Generell informasjon", + "transportInformationAboutThePortal": "Informasjon om portalen", + "transportRolesAndResponsibilies": "Roller og ansvar", + "transportItsDirectiveAndDelegatedRegulations": "ITS direktivet og forordninger", + "transportUsers": "For databrukere", + "transportNews": "Nyheter", + "transportWhereDoIFindTheData": "Hvor finner jeg data", + "transportWhatDataIsAvailable": "Hva finnes av data", + "transportDataInNap": "Data i NAP", + "transportProviders": "For datatilbydere", + "transportAddData": "Tilby data", + "transportDeclarationOfCompliance": "Samsvarserklæring", "requests": "Etterspørsler" }, "query": { @@ -200,8 +212,7 @@ "apiTab": "API-er", "termTab": "Begreper", "informationModelTab": "Informasjonsmodeller", - "serviceTab": "Tjenester og hendelser", - "requests": "Etterspørsler" + "serviceTab": "Tjenester og hendelser" }, "hitstats": { "nosearch": "Søk blant {0} datasett, {1} API-er, {2} begreper og {3} informasjonsmodeller", @@ -225,7 +236,6 @@ "standard": "Standard", "showmore": "Vis flere", "showfewer": "Vis færre", - "showAll": "Vis alt", "publishers": { "STAT": "Stat", "FYLKE": "Fylke", @@ -1175,20 +1185,5 @@ "email": "E-post:", "submitNewProject": "Her kan du melde inn nye prosjekter:", "submit": "Meld inn" - }, - "requestsPage": { - "title": "Etterspørsler", - "ingress": "Her finner du en oversikt over alle etterspørsler publisert i {lenke}. Du kan abonnere på, stemme opp eller kommentere på etterspørsler.", - "requests": "Etterspørsler fra Datalandsbyen", - "votes": "Antall stemmer", - "views": "Antall visninger", - "createRequest": "Lag etterspørsel", - "requestData": "Etterspør data", - "requestDataInfo": "Ønsker du å etterspørre data, APIer eller annet du kan gjøre det her. Du blir sendt til datalandsbyen.no.", - "newestToOldest": "Nyeste til eldste", - "mostVotes": "Flest stemmer", - "mostViews": "Flest visninger", - "view": "Visning", - "search": "Fritekssøk i titler" } } diff --git a/src/l10n/nn.json b/src/l10n/nn.json index c3746ec4f..f565385cf 100644 --- a/src/l10n/nn.json +++ b/src/l10n/nn.json @@ -166,7 +166,19 @@ "aboutConcepts": "Om omgrepskatalogen", "aboutInformationModels": "Om informasjonsmodellkatalogen", "ai": "Kunstig intelligens", - "requests": "Etterspurnadar" + "requests": "Etterspurnadar", + "transportGeneral": "Generell informasjon", + "transportInformationAboutThePortal": "Informasjon om portalen", + "transportRolesAndResponsibilies": "Roller og ansvar", + "transportItsDirectiveAndDelegatedRegulations": "ITS direktivet og forordninger", + "transportUsers": "For databrukere", + "transportNews": "Nyheter", + "transportWhereDoIFindTheData": "Hvor finner jeg data", + "transportWhatDataIsAvailable": "Hva finnes av data", + "transportDataInNap": "Data i NAP", + "transportProviders": "For datatilbydere", + "transportAddData": "Tilby data", + "transportDeclarationOfCompliance": "Samsvarserklæring" }, "query": { "intro": "Eksempel: offentleg transport", @@ -199,8 +211,7 @@ "apiTab": "API ", "termTab": "Omgrep", "informationModelTab": "Informasjonsmodellar", - "serviceTab": "Tenester og hendingar", - "requests": "Etterspurnadar" + "serviceTab": "Tenester og hendingar" }, "hitstats": { "nosearch": "Søk blant {0} datasett, {1} API, {2} omgrep og {3} informasjonsmodellar", @@ -224,7 +235,6 @@ "standard": "Standard", "showmore": "Vis fleire", "showfewer": "Vis færre", - "showAll": "Vis alle", "publishers": { "STAT": "Stat", "FYLKE": "Fylke", @@ -1175,20 +1185,5 @@ "email": "E-post:", "submitNewProject": "Her kan du melde inn nye prosjekt:", "submit": "Meld inn" - }, - "requestsPage": { - "title": "Etterspurnadar", - "ingress": "Her finn du ei oversikt over alle etterspurnadar publisert i {lenke}. Du kan abonnere på, stemme opp eller kommentere på etterspurnadar.", - "requests": "Etterspurnadar frå Datalandsbyen", - "votes": "Antall stemmer", - "views": "Antall visningar", - "createRequest": "Lag etterspurnad", - "requestData": "Etterspør data", - "requestDataInfo": "Ynskjer du å etterspørre data, APIer eller anna kan du gjere det her. Du blir sendt til datalandsbyen.no.", - "newestToOldest": "Nyeste til eldste", - "mostVotes": "Flest stemmer", - "mostViews": "Flest visningar", - "view": "Visning", - "search": "Fritekssøk i titler" } } diff --git a/src/pages/cms-information-page/styled.ts b/src/pages/cms-information-page/styled.ts index a9901668b..0a17b3ff3 100644 --- a/src/pages/cms-information-page/styled.ts +++ b/src/pages/cms-information-page/styled.ts @@ -84,7 +84,7 @@ const ImageText = styled.span` `; const SideMenu = styled(SideMenuBase)` - min-width: 180px; + min-width: 260px; ${onMobileView} { display: none; width: auto; diff --git a/src/pages/cms-transport-page/index.tsx b/src/pages/cms-transport-page/index.tsx index d4895a87f..28a1afea0 100644 --- a/src/pages/cms-transport-page/index.tsx +++ b/src/pages/cms-transport-page/index.tsx @@ -9,7 +9,18 @@ import localization from '../../lib/localization'; import { useGetTransportArticleQuery } from '../../api/generated/cms/graphql'; -import { PATHNAME_TRANSPORT } from '../../constants/constants'; +import { + PATHNAME_TRANSPORT_GENERAL, + PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + PATHNAME_TRANSPORT_GENERAL_ITS, + PATHNAME_TRANSPORT_GENERAL_ROLES, + PATHNAME_TRANSPORT_PROVIDERS_ADD, + PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, + PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + PATHNAME_TRANSPORT_USERS_NEWS, + PATHNAME_TRANSPORT_USERS_WHAT, + PATHNAME_TRANSPORT_USERS_WHERE +} from '../../constants/constants'; import ErrorPage from '../error-page'; @@ -23,16 +34,26 @@ import { themeNAP } from '../../app/theme'; import SC from './styled'; import YoutubeEmbed from '../../components/youtube-embed'; +import { Entity } from '../../types/enums'; interface Props extends RouteComponentProps {} const { FDK_CMS_BASE_URI } = env; const articleIds: { [pathname: string]: string } = { - [PATHNAME_TRANSPORT]: '3' + [PATHNAME_TRANSPORT_GENERAL]: '2', + [PATHNAME_TRANSPORT_GENERAL_ROLES]: '3', + [PATHNAME_TRANSPORT_GENERAL_ITS]: '4', + [PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL]: '5', + [PATHNAME_TRANSPORT_USERS_DATA_IN_NAP]: '', + [PATHNAME_TRANSPORT_USERS_NEWS]: '6', + [PATHNAME_TRANSPORT_USERS_WHERE]: '7', + [PATHNAME_TRANSPORT_USERS_WHAT]: '8', + [PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE]: '9', + [PATHNAME_TRANSPORT_PROVIDERS_ADD]: '10' }; -const InformationPage: FC = () => { +const TransportPage: FC = () => { const [navOpen, setNavOpen] = useState(false); const [isSticky, setSticky] = useState(false); @@ -119,14 +140,62 @@ const InformationPage: FC = () => { const menuItems = [ { - id: PATHNAME_TRANSPORT, - title: 'Transport' + id: PATHNAME_TRANSPORT_GENERAL, + title: localization.menu.transportGeneral, + items: [ + { + id: PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + title: localization.menu.transportInformationAboutThePortal + }, + { + id: PATHNAME_TRANSPORT_GENERAL_ROLES, + title: localization.menu.transportRolesAndResponsibilies + }, + { + id: PATHNAME_TRANSPORT_GENERAL_ITS, + title: localization.menu.transportItsDirectiveAndDelegatedRegulations + } + ] + }, + { + title: localization.menu.transportUsers, + items: [ + { + id: PATHNAME_TRANSPORT_USERS_NEWS, + title: localization.menu.transportNews + }, + { + id: PATHNAME_TRANSPORT_USERS_WHERE, + title: localization.menu.transportWhereDoIFindTheData + }, + { + id: PATHNAME_TRANSPORT_USERS_WHAT, + title: localization.menu.transportWhatDataIsAvailable + }, + { + id: PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + title: localization.menu.transportDataInNap + } + ] + }, + { + title: localization.menu.transportProviders, + items: [ + { + id: PATHNAME_TRANSPORT_PROVIDERS_ADD, + title: localization.menu.transportAddData + }, + { + id: PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, + title: localization.menu.transportDeclarationOfCompliance + } + ] } ]; return ( - - + + setNavOpen(!navOpen)}> @@ -140,9 +209,9 @@ const InformationPage: FC = () => { {navOpen && } {page()} - + ); }; -export default compose>(memo, withRouter)(InformationPage); +export default compose>(memo, withRouter)(TransportPage); diff --git a/src/pages/cms-transport-page/styled.ts b/src/pages/cms-transport-page/styled.ts index 7af7bf2b2..2a19a19d6 100644 --- a/src/pages/cms-transport-page/styled.ts +++ b/src/pages/cms-transport-page/styled.ts @@ -9,8 +9,7 @@ import HamburgerIconBase from '../../images/hamburger-menu-stroke.svg'; const onMobileView = '@media (max-width: 900px)'; const customBreakingPoint = '@media (max-width: 992px)'; -const InformationPage = styled.article` - background-color: ${({ theme: t }) => t.lighter}; +const TransportPage = styled.article` display: flex; gap: ${theme.spacing('S16', Unit.EM)}; word-break: break-word; @@ -41,6 +40,7 @@ const Article = styled.main` flex-direction: column; gap: ${theme.spacing('S10')}; z-index: 5; + overflow: hidden; `; const Title = styled.h1` @@ -83,7 +83,7 @@ const ImageText = styled.span` `; const SideMenu = styled(SideMenuBase)` - min-width: 180px; + min-width: 260px; ${onMobileView} { display: none; width: auto; @@ -107,11 +107,15 @@ const SideMenuSmall = styled(SideMenuBase)` a { background-color: transparent !important; color: ${({ theme: t }) => t.dark}; - margin-left: 20px; &.active { color: ${({ theme: t }) => t.dark} !important; } } + + a, + span { + margin-left: 20px; + } } } } @@ -154,7 +158,7 @@ const HamburgerIcon = styled(HamburgerIconBase)` `; export default { - InformationPage, + TransportPage, Aside, Article, Title, diff --git a/src/routes.ts b/src/routes.ts index 9529bc315..4c1d2a843 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -26,8 +26,17 @@ import { PATHNAME_ABOUT_CONCEPTS, PATHNAME_ABOUT_INFORMATIONMODELS, PATHNAME_AI, - PATHNAME_TRANSPORT, - PATHNAME_REQUESTS + PATHNAME_REQUESTS, + PATHNAME_TRANSPORT_GENERAL, + PATHNAME_TRANSPORT_GENERAL_ROLES, + PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + PATHNAME_TRANSPORT_USERS_WHERE, + PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, + PATHNAME_TRANSPORT_GENERAL_ITS, + PATHNAME_TRANSPORT_PROVIDERS_ADD, + PATHNAME_TRANSPORT_USERS_NEWS, + PATHNAME_TRANSPORT_USERS_WHAT } from './constants/constants'; const routes: any = { @@ -62,7 +71,16 @@ const routes: any = { PATHNAME_ABOUT_CONCEPTS, PATHNAME_ABOUT_INFORMATIONMODELS, PATHNAME_AI, - PATHNAME_TRANSPORT, + PATHNAME_TRANSPORT_GENERAL, + PATHNAME_TRANSPORT_GENERAL_ROLES, + PATHNAME_TRANSPORT_GENERAL_INFO_ABOUT_THE_PORTAL, + PATHNAME_TRANSPORT_GENERAL_ITS, + PATHNAME_TRANSPORT_USERS_NEWS, + PATHNAME_TRANSPORT_USERS_WHERE, + PATHNAME_TRANSPORT_USERS_WHAT, + PATHNAME_TRANSPORT_USERS_DATA_IN_NAP, + PATHNAME_TRANSPORT_PROVIDERS_ADD, + PATHNAME_TRANSPORT_PROVIDERS_COMPLIANCE, PATHNAME_REQUESTS ], publishing: [