Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • software/fchh-website-content
  • TarikZiyad/fchh-website-content
  • kosai_14/fchh-website-content
3 results
Show changes
Commits on Source (28)
Showing
with 95 additions and 424 deletions
.DS_Store .DS_Store
\ No newline at end of file node_modules
dist
image: node:alpine image: node:18-alpine
variables: variables:
TEMPLATE_DOWNLOAD_URL: https://gitlab.fabcity.hamburg/fcos-suite/fcos-suite-astro/-/archive/main/fcos-suite-astro-main.zip TEMPLATE_DOWNLOAD_URL: https://gitlab.fabcity.hamburg/fcos-suite/fcos-suite-astro/-/archive/main/fcos-suite-astro-main.zip
...@@ -15,10 +15,12 @@ build: ...@@ -15,10 +15,12 @@ build:
before_script: before_script:
- apk add --no-cache curl zip rsync - apk add --no-cache curl zip rsync
script: script:
# Download ZIP file from the Astro repo (faster than Git cloning)
- curl $TEMPLATE_DOWNLOAD_URL -o $TEMPLATE_FILENAME - curl $TEMPLATE_DOWNLOAD_URL -o $TEMPLATE_FILENAME
- unzip -o $TEMPLATE_FILENAME - unzip -o $TEMPLATE_FILENAME
- rm $TEMPLATE_FILENAME - rm $TEMPLATE_FILENAME
- rsync -va --exclude="src/pages" --exclude="src/content" --exclude="public" --exclude ".git" fcos-suite-astro-main/ . # Copy all files from the template repo, except Content Markdown files (already in working dir)
- rsync -va --exclude="src/pages/**/*.md" --exclude="src/pages/**/*.mdx" --exclude="src/content/**/*.md" --exclude="src/content/**/*.mdx" --exclude="public" --exclude ".git" fcos-suite-astro-main/ .
- rm -rf fcos-suite-astro-main - rm -rf fcos-suite-astro-main
# Replacing the whole Astro config is a temporary workaround b/c Astro # Replacing the whole Astro config is a temporary workaround b/c Astro
# currently doesn't support env variables inside of the config file. # currently doesn't support env variables inside of the config file.
......
...@@ -29,7 +29,27 @@ const mapCollection = defineCollection({ ...@@ -29,7 +29,27 @@ const mapCollection = defineCollection({
}), }),
}); });
const socialsCollection = defineCollection({
schema: z.object({
alt: z.string(),
type: z.string(),
href: z.string(),
}),
});
const toolbarCollection = defineCollection({
schema: z.object({
title: z.string(),
icon: z.string(),
target: z.string(),
onlyDesktop: z.boolean().optional(),
order: z.number()
}),
});
export const collections = { export const collections = {
people: peopleCollection, people: peopleCollection,
map: mapCollection, map: mapCollection,
socials: socialsCollection,
toolbar: toolbarCollection,
}; };
---
alt: Facebook
type: facebook
href: "https://www.facebook.com/fabcityhamburg/"
---
---
alt: GitLab
type: gitlab
href: "https://gitlab.fabcity.hamburg"
---
---
alt: Instagram
type: instagram
href: "https://www.instagram.com/fabcityhh/"
---
---
alt: LinkedIn
type: linkedin
href: "https://www.linkedin.com/company/fab-city-hamburg/"
---
---
alt: Mastodon
type: mastodon
href: "https://mastodon.social/@fabcityhamburg"
---
---
alt: Twitter
type: twitter
href: "https://twitter.com/fabcityhamburg"
---
\ No newline at end of file
---
alt: "Youtube"
type: "youtube"
href: "https://www.youtube.com/c/FabCityHamburg"
---
---
order: 3
title: Community
icon: Chat
target: de/network/community
---
---
order: 4
title: Events
icon: Calendar
target: de/network/events
---
---
order: 2
title: Hub
icon: Folders
target: de/projects/knowledgehub/
onlyDesktop: true
---
---
order: 1
title: Map
icon: ChoroplethMap
target: de/network/map
---
---
order: 5
title: OS
icon: ApplicationVirtual
target: de/projects/fcos
---
---
import { LANGUAGES } from "@config";
import { getBaseUrl } from "@utils";
import type { IPage } from "@interfaces/IPage";
/**
* If a page does not exist as a content file, this component will generate
* all necessary "virtual pages" to handle translations and redirects.
* Concept was inspired by https://www.defined.net/blog/internationalizing-docs-pages-with-astro/
*/
export async function getStaticPaths() {
const rawContent = await Astro.glob<IPage>("../**/*.mdx");
const allLocales = LANGUAGES.map((language) => language.locale);
const baseUrl = getBaseUrl(true);
const translatedContent = rawContent.filter((post) =>
Boolean(post.frontmatter.slug)
);
const staticRoutes = translatedContent.flatMap((translated) => {
const urlPartsWithoutBase = translated?.url
?.replace(baseUrl, "")
.split("/")
.filter(Boolean);
if (urlPartsWithoutBase && urlPartsWithoutBase.length > 0) {
const localeFromUrl = urlPartsWithoutBase && urlPartsWithoutBase[0];
const otherLocale = allLocales.filter(
(locale) => locale !== localeFromUrl
)[0];
const middleParts = urlPartsWithoutBase?.slice(1, -1);
const slugFromUrl = urlPartsWithoutBase.at(-1);
const otherSlug = translated.frontmatter.slug;
const germanToEnglishRedirect = {
from: `${localeFromUrl}/${middleParts?.join("/")}/${otherSlug}`,
to: translated.url,
};
const englishToGermanRedirect = {
from: `${otherLocale}/${middleParts?.join("/")}/${slugFromUrl}`,
to: `${baseUrl}/${otherLocale}/${middleParts?.join("/")}/${otherSlug}`,
};
return [
{
params: {
slug: germanToEnglishRedirect.from,
},
props: {
newTarget: germanToEnglishRedirect.to,
},
},
{
params: {
slug: englishToGermanRedirect.from,
},
props: { newTarget: englishToGermanRedirect.to },
},
];
}
});
return staticRoutes;
}
const { newTarget } = Astro.props;
---
<html>
<head>
<meta http-equiv="refresh" content={`0; url=${newTarget}`} />
</head>
</html>
---
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 { getCollection, getEntryBySlug } from "astro:content";
import "@fchh/fcos-suite-map/dist/style.css";
const baseUrl = getBaseUrl(true);
const localeFromUrl =
Astro?.url?.pathname.replace(baseUrl, "").split("/").filter(Boolean)[0] ||
LANGUAGES[0].locale;
const localePoiData = await getCollection("map", ({ slug }) => {
return slug.startsWith(localeFromUrl);
}).then((rawPoiCollection) =>
rawPoiCollection.map((collectionItem) => ({
...collectionItem.data,
id: collectionItem.slug.split("/").at(-1),
}))
);
const rawContent = await Astro.glob<IPage>("../../../**/*.mdx");
const menuItems = buildPageTree(rawContent, baseUrl, localeFromUrl);
export async function getStaticPaths() {
const poiData = await getCollection("map");
const staticPaths = poiData.map((poi) => {
const [locale, ...slugParts] = poi.slug.split("/");
return {
params: { locale, poi: "poi/" + slugParts.join("/") },
};
});
return [
...staticPaths,
{ params: { locale: "de", poi: undefined } },
{ params: { locale: "en", poi: undefined } },
];
}
const { poi } = Astro.params;
const currentPoi = (
await getEntryBySlug(
"map",
localeFromUrl + "/" + poi?.split("/").at(-1) || ""
)
)?.data;
---
<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 : ""}/${localeFromUrl}/network/map/`}
data={localePoiData}
mapboxToken={import.meta.env.PUBLIC_MAPBOX_TOKEN}
client:only="react"
/>
</main>
</BaseLayout>
---
layout: "@layouts/ArticleLayout.astro"
title: Kitchen Sink
subtitle: Examples for Content Editors
headerImage: images/home/nasa-Q1p7bh3SHj8-unsplash_fchh.jpg
headerImageAlt: Picture of two metal palm trees
hidden: true
---
# H1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
## H2 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
### H3 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
#### H4 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
##### H5 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
###### H6 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
This page is a so-called "kitchen sink", meaning it shows all the possible UI elements that editors can use inside our website. This is still a work in progress. Come back to see what's new.
> Für uns war immer klar: So macht man ein Zitat!
# Markdown
All default Markdown elements are supported. Please check a Markdown documentation or [cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) if you want to know more about the features of Markdown:
- Headlines
- Lists (ordered, unordered)
- Blockquotes
- Bold, Italique text formatting
- Code blocks
- Images
## Internal links
To link to any other page inside of our site, please use a regular Markdown link, but in a **relative URL**, e.g. something like this: `[My Link](en/blog/my-blogpost)`
## Markdown images
You can use default markdown images like this: `![](/images/home/nasa-Q1p7bh3SHj8-unsplash_fchh.jpg)`
![](images/home/nasa-Q1p7bh3SHj8-unsplash_fchh.jpg)
## Images with subtitles/caption
<Image img="images/home/nasa-Q1p7bh3SHj8-unsplash_fchh.jpg" caption="This is a Caption. Write something here" subCaption="And this is a subcaption for the Author/Rights information" />
## Button
Technically it's a link, but it looks like a button:
<Button text="Click me!" href="http://www.google.de" type="primary" />
## Button Link in new tab
<Button
text="Click me! But in new tab"
newTab
href="http://www.google.de"
type="primary"
/>
## Button Link in new tab with icon
<Button
text="Click me! I have icon"
newTab
href="http://www.google.de"
type="primary"
icon="Email"
iconSize="24"
/>
## Icon
<Icon name="Email" size="24" />
## Pill
<Pill
title="Click me"
href="http://www.google.de"
newTab
type="default"
rounded
size="lg"
icon="DotMark"
iconPackage="Carbon"
iconSize="sm"
/>
## ActionBox
<ActionBox
title="Action Box Title"
description="Action Box Subtitle"
>
<Button
text="Primary Button"
icon="Launch"
newTab
iconSize={24}
type="primary"
href="https://www.google.de"
/>
<Button
text="Tertiary Button"
icon="Launch"
newTab
iconSize={24}
type="tertiary"
href="https://www.google.de"
/>
</ActionBox>
## Accordion
<Accordion title="Enabling a data-based circular economy">
The Fab City concept provides a promising pathway towards a more resilient and
ecological mode of production and consumption. Globally connected cities and
regions share data, information and know-how and collaborate on the
development of physical goods in the form of Open Source Hardware, whereas the
creation, repair and recycling of those physical goods and artifacts happens
in the local sphere close to the place of need and by means of digital
production technologies, e.g. freely accessible in Fab Labs.
</Accordion>
## Tabs
<Tabs
className="not-prose"
client:only="react"
entries={[
{ label: "Tab 1", content: "This is the content of tab 1" },
{ label: "Tab 2", content: "This is the content of tab 2" },
{ label: "Tab 3", content: "This is the content of tab 3" },
]}
/>
## Member (single Use)
<Member
image="https://picsum.photos/id/1005/500/500"
name="Max Mustermann"
position="CEO"
email="max@musterfirma.de"
linkedin="https://www.google.de"
twitter="https://www.google.de"
className="not-prose"
/>
<Member
image="https://picsum.photos/id/1005/500/500"
name="Max Mustermann"
position="CEO"
email="max@musterfirma.de"
linkedin="https://www.google.de"
twitter="https://www.google.de"
className="not-prose"
/>
# People (multi-use)
For people that are mentioned multiple times on the website, we can create a "profile" under `pages/de/people/{name}.mdx`. Then we can use them easily via the `<People>` component: `<People names={["jenny", "michael"]} />`
<People names={["jenny", "michael"]} />
## Image Gallery
<ImageGallery
fullBleed={true}
files={[
{
img: "images/slider/home-slider/1002-1000x600.jpeg",
caption: "Caption 1",
subCaption: "Sub Caption 1",
},
{
img: "images/slider/home-slider/1003-400x600.jpeg",
caption: "Caption 2",
subCaption: "Sub Caption 2",
},
{
img: "images/slider/home-slider/1005-1000x600.jpeg",
caption: "Caption 3",
subCaption: "Sub Caption 3",
},
"images/slider/home-slider/1025-1000x600.jpeg",
]}
/>
## Carousel
<Carousel
title="News"
paths={[
"de/fabcity/news/balifabfest",
"de/fabcity/news/fabricademy",
"de/fabcity/news/zerocarbonroadshow",
"de/fabcity/news/fabcitymanifesto",
]}
/>
## Video slider
{/* <VideoSlider
client:only="react"
fluid={true}
title="Visiting Hamburg"
entries={["sX7zWRswT-o", "2TAJCT6JnDM", "y42eDpvgBnk", "fwmA-2xIWT0"]}
itemWidth={800}
/> */}
## Youtube Embed */}
<YoutubeEmbed embedId="sX7zWRswT-o" width="full" client:only="react" />
## Vertical article card
<VerticalArticleCard path="de/network/events/buildworkshops" />
## Horizontal article cards
<HorizontalArticleCard path="de/network/events/buildworkshops" />
## Carousel
<Carousel
fluidToTheRight={true}
title="Events"
paths={[
"de/fabcity/news/balifabfest",
"de/fabcity/news/fabcityfullstack",
"de/fabcity/news/fabricademy",
"de/fabcity/news/zerocarbonroadshow",
]}
/>
## Logo grid
<LogoGrid
title="Unsere Gründungsmitglieder"
columns={6}
logos={[
{
src: "images/logos/logo-3dstrong_2by1.svg",
alt: "3D Strong",
},
{
src: "images/logos/logo-attraktor_2by1.svg",
alt: "Attraktor",
},
{
src: "images/logos/logo-buceriuslawschool_2by1.svg",
alt: "Bucerius Law School",
},
{
src: "images/logos/logo-code4hamburg_2by1.svg",
alt: "Code4Hamburg",
},
{
src: "images/logos/logo-curious_2by1.svg",
alt: "Curious",
},
{
src: "images/logos/logo-dyne_2by1.svg",
alt: "Dyne",
},
]}
/>
...@@ -66,7 +66,7 @@ type: article ...@@ -66,7 +66,7 @@ type: article
<Accordion title="04 Partizipativ">Wir binden alle Interessengruppen in die Entscheidungsprozesse ein und befähigen die Bürger, Innovationen und Veränderungen selbst in die Hand zu nehmen.</Accordion> <Accordion title="04 Partizipativ">Wir binden alle Interessengruppen in die Entscheidungsprozesse ein und befähigen die Bürger, Innovationen und Veränderungen selbst in die Hand zu nehmen.</Accordion>
<Accordion title="05 Ökonomisches Wachstum & Beschäftiugung">Wir unterstützen ein nachhaltiges städtisches Wirtschaftswachstum, indem wir in die für das 21. Jh. erforderlichen Fähigkeiten, Infrastrukturen und politischen Rahmenbedingungen investieren, unter umfassender Berücksichtigung sozialer und ökologischer Folgekosten und der Umsetzung des Verursacherprinzips.</Accordion> <Accordion title="05 Ökonomisches Wachstum & Beschäftigung">Wir unterstützen ein nachhaltiges städtisches Wirtschaftswachstum, indem wir in die für das 21. Jh. erforderlichen Fähigkeiten, Infrastrukturen und politischen Rahmenbedingungen investieren, unter umfassender Berücksichtigung sozialer und ökologischer Folgekosten und der Umsetzung des Verursacherprinzips.</Accordion>
<Accordion title="06 Lokal produktiv">Wir unterstützen die effiziente und gemeinsame Nutzung aller lokal verfügbaren Ressourcen im Sinne einer Kreislaufwirtschaft, um eine produktive und lebendige Stadt aufzubauen.</Accordion> <Accordion title="06 Lokal produktiv">Wir unterstützen die effiziente und gemeinsame Nutzung aller lokal verfügbaren Ressourcen im Sinne einer Kreislaufwirtschaft, um eine produktive und lebendige Stadt aufzubauen.</Accordion>
......
...@@ -104,7 +104,7 @@ Regulär 25€ / Monat. Haben aber auch einen individuellen Sozialtarif, wenn si ...@@ -104,7 +104,7 @@ Regulär 25€ / Monat. Haben aber auch einen individuellen Sozialtarif, wenn si
**Nächste U/S-Bahn:** U Mundsburg + Bus 17 **Nächste U/S-Bahn:** U Mundsburg + Bus 17
**Web:** [www.welcome-werkstatt.de/](https://www.welcome-werkstatt.de/), **Facebook:** [@welcome.werkstatt](https://www.facebook.com/welcome.werkstatt); **Instagram:** [@welcome.werkstatt/](https://www.instagram.com/welcome.werkstatt/); **Twitter:** [@welcomewerk](https://twitter.com/welcomewerk) **Web:** [www.welcome-werkstatt.de/](https://www.welcome-werkstatt.de/), **Facebook:** [@welcome.werkstatt](https://www.facebook.com/welcome.werkstatt); **Instagram:** [@welcome.werkstatt/](https://www.instagram.com/welcome.werkstatt/); **Twitter:** [@welcomewerk](https://twitter.com/welcomewerk)
## Openlab ## OpenLab Hamburg
**Gegründet:** 2016 in Jenfeld **Gegründet:** 2016 in Jenfeld
**Lage:** Campus der Helmut-Schmidt-Universität in Jenfeld; Holstenhofweg 85, 22043 Hamburg. **Lage:** Campus der Helmut-Schmidt-Universität in Jenfeld; Holstenhofweg 85, 22043 Hamburg.
......