Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add legal pages (imprint and privacy-policy) #29

Merged
merged 15 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@
"address-content": "Technologiestiftung Berlin\nGrunewaldstr. 61-62\n10825 Berlin",
"email-title": "E-Mail",
"email-content": "[email protected]",
"link-privacy-policy": "Datenschutzrichtlinie",
"link-privacy-policy": "Datenschutzerklärung",
"link-imprint": "Impressum",
"project-by": "Ein Projekt der",
"supported-by": "gefördert von",
"tsb-logo-alt": "Technologiestiftung Berlin",
"sen-kugz-logo-alt": "Senatsverwaltung für Kultur und Gesellschaftlichen Zusammenhalt Berlin"
}
},
"Imprint": {
"meta-title": "Impressum"
},
"Privacy-Policy": {
"meta-title": "Datenschutzerklärung"
}
}
6 changes: 6 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,11 @@
"tsb-logo-alt": "Technologiestiftung Berlin",
"sen-kugz-logo-alt": "Senatsverwaltung für Kultur und Gesellschaftlichen Zusammenhalt Berlin"
}
},
"Imprint": {
"meta-title": "Imprint"
},
"Privacy-Policy": {
"meta-title": "Privacy Policy"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "@emotion/styled";
import { colors, spacings } from "../../../common/styleVariables";
import Button from "../../Button";
import { colors, spacings } from "../../common/styleVariables";
import Button from "../Button";
import { useTranslations } from "next-intl";

const BurgerPack = styled(Button)({
Expand Down
39 changes: 39 additions & 0 deletions src/components/Header/Logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import styled from "@emotion/styled";
import Link from "next/link";
import { borderRadiuses, colors, fontSizes, fontWeights, spacings } from "../../common/styleVariables";

const LogoLink = styled(Link)({
display: "flex",
alignItems: "center",
gap: `0 ${spacings.get(3)}px`,
color: colors.blueDark,
textDecoration: "none",
});

const Circle = styled.div({
width: "2rem",
height: "2rem",
backgroundColor: colors.blueDark,
borderRadius: borderRadiuses.round,
});

const Title = styled.span({
fontWeight: fontWeights.medium,
fontSize: fontSizes.small,
});

const LightTitle = styled.span({
fontWeight: fontWeights.light,
});

export default function Logo() {
return (
<LogoLink href="/">
<Circle />
<Title aria-label="Kulturdaten Berlin">
KULTURDATEN
<LightTitle>BERLIN</LightTitle>
</Title>
</LogoLink>
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from "@emotion/styled";
import { mediaQueries, colors, fontWeights, fontSizes, timings, spacings } from "../../../common/styleVariables";
import { mediaQueries, colors, fontWeights, fontSizes, timings, spacings } from "../../common/styleVariables";
import { useTranslations } from "next-intl";
import { AnchorLinks } from "../../../common/types";
import { AnchorLinks } from "../../common/types";

const NavigationWrapper = styled.nav({
position: "absolute",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "@emotion/styled";
import { colors, headerHeight } from "../../../common/styleVariables";
import { colors, headerHeight } from "../../common/styleVariables";
import Navigation from "./Navigation";

const Backdrop = styled.div({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import styled from "@emotion/styled";
import { useState } from "react";
import {
borderRadiuses,
borderWidths,
breakpoints,
colors,
fontSizes,
fontWeights,
headerHeight,
mediaQueries,
spacings,
zIndexes,
} from "../../../common/styleVariables";

import Navigation from "./Navigation";
} from "../../common/styleVariables";
import { AnchorLinks } from "../../common/types";
import Burger from "./Burger";
import Logo from "./Logo";
import Navigation from "./Navigation";
import NavigationOverlay from "./NavigationOverlay";
import { useState } from "react";
import { AnchorLinks } from "../../../common/types";
import Link from "next/link";

const HeaderContainer = styled.header({
position: "fixed",
Expand All @@ -44,30 +40,6 @@ const ContentWrapper = styled.div({
},
});

const LogoLink = styled(Link)({
display: "flex",
alignItems: "center",
gap: `0 ${spacings.get(3)}px`,
color: colors.blueDark,
textDecoration: "none",
});

const Logo = styled.div({
width: "2rem",
height: "2rem",
backgroundColor: colors.blueDark,
borderRadius: borderRadiuses.round,
});

const Title = styled.span({
fontWeight: fontWeights.medium,
fontSize: fontSizes.small,
});

const LightTitle = styled.span({
fontWeight: fontWeights.light,
});

interface Props {
activeAnchorLink: AnchorLinks | null;
}
Expand All @@ -91,13 +63,7 @@ export default function Header({ activeAnchorLink }: Props) {
return (
<HeaderContainer>
<ContentWrapper>
<LogoLink href="/">
<Logo />
<Title aria-label="Kulturdaten Berlin">
KULTURDATEN
<LightTitle>BERLIN</LightTitle>
</Title>
</LogoLink>
<Logo />
<Desktop>
<Navigation activeAnchorLink={activeAnchorLink} />
</Desktop>
Expand All @@ -109,3 +75,13 @@ export default function Header({ activeAnchorLink }: Props) {
</HeaderContainer>
);
}

export function HeaderSimple() {
return (
<HeaderContainer>
<ContentWrapper>
<Logo />
</ContentWrapper>
</HeaderContainer>
);
}
15 changes: 0 additions & 15 deletions src/components/HomePage/Head.tsx

This file was deleted.

79 changes: 38 additions & 41 deletions src/components/HomePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import styled from "@emotion/styled";
import { widths } from "../../common/styleVariables";
import { useTranslations } from "next-intl";
import { useEffect, useState } from "react";
import { useInView } from "react-intersection-observer";
import { AnchorLinks } from "../../common/types";
import ArtistSection from "../ArtistSection";
import Header from "../Header";
import Page from "../Page";
import Spacer from "../Spacer";
import CultureInterestedSection from "./CultureInterestedSection";
import DataUsersSection from "./DataUsersSection";
import Footer from "./Footer";
import Head from "./Head";
import IntroSection from "./IntroSection";
import NewsletterSection from "./NewsletterSection";
import RequestCreatorAndList from "./RequestCreatorAndList";
import Section from "./Section";
import Header from "./Header";
import { useInView } from "react-intersection-observer";
import { useEffect, useState } from "react";
import { AnchorLinks } from "../../common/types";
import Spacer from "../Spacer";

const Main = styled.main(() => ({
width: `min(100%, ${widths.maxContentWidth})`,
margin: "0 auto",
}));

interface InView {
interestedSectionInView: boolean;
Expand All @@ -29,7 +22,9 @@ interface InView {
const inViewOptions = {
threshold: 0.5,
};

export default function HomePage() {
const t = useTranslations("Home");
const [activeAnchorLink, setActiveAnchorLink] = useState<AnchorLinks | null>(null);
const getLatestInView = (inView: InView) => {
const orderedSections: Array<keyof InView> = [
Expand Down Expand Up @@ -59,32 +54,34 @@ export default function HomePage() {
}, [artistSectionInView, interestedSectionInView, dataSectionInView]);

return (
<>
<Head />
<Header activeAnchorLink={activeAnchorLink} />
<Main>
<Spacer size={32} />
<Section>
<IntroSection />
</Section>
<NewsletterSection />
<Section>
<RequestCreatorAndList />
</Section>
<Section ref={artistSectionRef} id={AnchorLinks.ARTISTSECTION}>
<ArtistSection />
</Section>
<NewsletterSection />
<Section ref={interestedSectionRef} id={AnchorLinks.INTERESTEDSECTION}>
<CultureInterestedSection />
</Section>
<NewsletterSection />
<Section ref={dataSectionRef} id={AnchorLinks.DATASECTION}>
<DataUsersSection />
</Section>
<NewsletterSection />
</Main>
<Footer />
</>
<Page
// TODO: Update/add more metadata before release.
metadata={{
title: t("meta-title"),
description: t("meta-description"),
}}
header={<Header activeAnchorLink={activeAnchorLink} />}
>
<Spacer size={32} />
<Section>
<IntroSection />
</Section>
<NewsletterSection />
<Section>
<RequestCreatorAndList />
</Section>
<Section ref={artistSectionRef} id={AnchorLinks.ARTISTSECTION}>
<ArtistSection />
</Section>
<NewsletterSection />
<Section ref={interestedSectionRef} id={AnchorLinks.INTERESTEDSECTION}>
<CultureInterestedSection />
</Section>
<NewsletterSection />
<Section ref={dataSectionRef} id={AnchorLinks.DATASECTION}>
<DataUsersSection />
</Section>
<NewsletterSection />
</Page>
);
}
Loading