Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fchh-website-content
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FCHH Software
fchh-website-content
Merge requests
!24
Jennypenny main patch 53880
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Jennypenny main patch 53880
jennypenny-main-patch-53880
into
main
Overview
0
Commits
6
Pipelines
5
Changes
4
Merged
Jennifer Wilke
requested to merge
jennypenny-main-patch-53880
into
main
2 years ago
Overview
0
Commits
6
Pipelines
5
Changes
2
Expand
0
0
Merge request reports
Compare
version 4
version 4
8abbf770
2 years ago
version 3
04f0fd4c
2 years ago
version 2
ad7cc7a8
2 years ago
version 1
b659168d
2 years ago
main (base)
and
latest version
latest version
584a965c
6 commits,
2 years ago
version 4
8abbf770
5 commits,
2 years ago
version 3
04f0fd4c
4 commits,
2 years ago
version 2
ad7cc7a8
3 commits,
2 years ago
version 1
b659168d
2 commits,
2 years ago
Show latest version
2 files
+
85
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/pages/de/network/map/[...poi].astro
0 → 100644
+
85
−
0
Options
---
import
DataHeaderWrapper
from
"@components/DataHeaderWrapper.astro"
;
import
BaseLayout
from
"@layouts/BaseLayout.astro"
;
import
FabCityMap
from
"@fchh/fcos-suite-map"
;
import
{
getBaseUrl
,
buildPageTree
}
from
"@utils"
;
import
{
LANGUAGES
}
from
"@config"
;
import
type
{
IPage
}
from
"@interfaces/IPage"
;
import
"@fchh/fcos-suite-map/dist/style.css"
;
interface
Poi
{
name
:
string
;
description
:
string
;
website
:
string
;
lat
:
number
;
lng
:
number
;
image
:
string
;
category
:
string
;
relationStatus
:
string
;
tags
:
Array
<
{
displayName
:
string
;
color
:
string
}
>
;
}
const
baseUrl
=
getBaseUrl
(
true
);
const
localeFromUrl
=
Astro
?
.
url
?
.
pathname
.
replace
(
baseUrl
,
""
)
.
split
(
"/"
)
.
filter
(
Boolean
)[
0
]
||
LANGUAGES
[
0
]
.
locale
;
const
rawContent
=
await
Astro
.
glob
<
IPage
>
(
"../../../**/*.mdx"
);
const
menuItems
=
buildPageTree
(
rawContent
,
baseUrl
,
localeFromUrl
);
const
rawPoiData
=
await
Astro
.
glob
<
Poi
>
(
"./*.mdx"
);
const
poiData
=
rawPoiData
.
filter
(
(
poi
)
=>
!
(
poi
.
file
.
endsWith
(
"index.mdx"
)
||
poi
.
file
.
endsWith
(
"index.md"
))
)
.
map
((
poi
)
=>
({
...
poi
.
frontmatter
,
id
:
poi
.
url
?
.
split
(
"/"
)
.
at
(
-
1
),
}));
export
async
function
getStaticPaths
()
{
const
rawPoiData
=
await
Astro
.
glob
<
Poi
>
(
"./*.mdx"
);
const
poiData
=
rawPoiData
.
filter
(
(
poi
)
=>
!
(
poi
.
file
.
endsWith
(
"index.mdx"
)
||
poi
.
file
.
endsWith
(
"index.md"
))
)
.
map
((
poi
)
=>
({
...
poi
.
frontmatter
,
id
:
poi
.
url
?
.
split
(
"/"
)
.
at
(
-
1
),
}));
const
staticPaths
=
poiData
.
map
((
poi
)
=>
({
params
:
{
poi
:
"poi/"
+
poi
.
id
},
}));
return
[
...
staticPaths
,
{
params
:
{
poi
:
undefined
}
}];
}
const
{
poi
}
=
Astro
.
params
;
const
currentPoi
=
poiData
.
find
((
singlePoi
)
=>
singlePoi
.
id
===
poi
?
.
split
(
"/"
)
.
at
(
-
1
));
---
<
BaseLayout
title
=
{
currentPoi
?
.
name
||
"Map"
}
hideFooter
bodyClasses
=
"fc-h-full fc-flex fc-flex-col"
>
<
DataHeaderWrapper
menuItems
=
{
menuItems
}
compact
light
disableAnimation
backgroundImageClasses
=
"fc-bg-[url('/images/illustrations/map-pattern.svg')] fc-bg-cover fc-bg-no-repeat"
reactClasses
=
"!fc-absolute lg:!fc-static"
itemsAlwaysLight
=
{
true
}
/>
<
main
class
=
"fc-h-64 fc-basis-full"
>
<
FabCityMap
baseUrl
=
{
`${baseUrl != "/" ? baseUrl : ""}/de/network/map/`
}
data
=
{
poiData
}
mapboxToken
=
{
import
.
meta
.
env
.
PUBLIC_MAPBOX_TOKEN
}
client
:
only
=
"react"
/>
</
main
>
</
BaseLayout
>
Loading