diff --git a/app/frontpage.tsx b/app/frontpage.tsx new file mode 100644 index 00000000..8407cb21 --- /dev/null +++ b/app/frontpage.tsx @@ -0,0 +1,131 @@ +'use client' + +import React from 'react'; + +import { Section } from '../components/Styled'; + +import { pages_index_QueryResponse } from '../__generated__/pages_index_Query.graphql'; +import Collaborators from '../components/Collaborators/Collaborators'; +import Companies from '../components/Companies/Companies'; +import Link from 'next/link'; +import styled from 'styled-components'; +import WelcomeScreen from '../components/Frontpage/WelcomeScreen'; +import Interest from '../components/Frontpage/Interest'; +import { WithDataAndLayoutProps } from '../lib/withData'; +import PageView from '../components/PageView'; +import CompactProgram from '../components/CompactProgram'; +import MainCollaborator from '../components/Collaborators/MainCollaborator'; +import FlexItem from '../components/Styled/FlexItem'; +import Flex from '../components/Styled/Flex'; +import { Player } from 'video-react'; + +type RenderProps = WithDataAndLayoutProps; + +const ReadMore = styled('h4')``; + +const CustomPlayer = styled.div` + @media only screen and (max-width: 767px) { + display: none; + } +`; + +const AboutSection = (props: pages_index_QueryResponse): JSX.Element => { + const frontpage = + props.pages && props.pages.find((el) => el && el.slug === 'frontpage'); + return ( + <> + + + {frontpage && } + + + + + + + + ); +}; + +const Centered = styled('div')` + text-align: center; +`; + +const EventsSection = ({ + query, +}: { + query: pages_index_QueryResponse; +}): JSX.Element => ( + <> + + {query.pages && + query.pages.filter(Boolean).map( + (element) => + element && ( + +

{element.title}

+

{element.ingress}

+ + + Les mer + + +
+ ) + )} +
+ +); + +const Index = ({ props, error }: RenderProps): JSX.Element => ( + <> + +
+ +
+ {props.currentMetaData.interestForm && ( +
+ +
+ )} +
+ +
+ {props.currentMetaData.mainCollaborator?.id && ( +
+ +
+ )} + {props.currentMetaData.collaborators && ( +
+ +
+ )} + {(props.currentMetaData.companiesFirstDay || + props.currentMetaData.companiesLastDay) && ( +
+ +
+ )} +
+ +
+ +); + +export default Index; \ No newline at end of file diff --git a/app/global.css b/app/global.css new file mode 100644 index 00000000..13d00de7 --- /dev/null +++ b/app/global.css @@ -0,0 +1,28 @@ +body { + margin: 0; + padding: 0; + font-size: 16px; + color: rgba(0, 0, 0, 0.87); + font-smoothing: antialiased; + word-break: break-word; + font-family: Roboto, sans-serif; + font-variant-numeric: lining-nums; +} +img { + max-width: 100%; +} +p { + line-height: 1.4285em; +} +a { + color: '#0778BC'; + text-decoration: none; +} + +a:hover { + color: '#41C0EB'; + text-decoration: none; +} +h1,h2,h3,h4 { + font-weight: 500; +} \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 00000000..342746ce --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,91 @@ +import { Metadata, Viewport } from "next" +import Script from "next/script" +import * as Sentry from '@sentry/node'; + +// All css imports go here +import './global.css' +import 'video-react/dist/video-react.css'; +import 'react-responsive-carousel/lib/styles/carousel.min.css'; +import 'rc-slider/assets/index.css'; + +Sentry.init({ + enabled: process.env.NODE_ENV === 'production', + dsn: process.env.SENTRY_DSN, +}); + +export const viewport: Viewport = { + themeColor: "#ffffff", + width: "device-width", + initialScale: 1, + maximumScale: 1 +} + +export const metadata: Metadata = { + icons: { + icon: [ + { url: "/static/icon-512x512.png", type: "image/png", sizes: "512x512" }, + { url: "/static/icon-384x384.png", type: "image/png", sizes: "384x384" }, + { url: "/static/icon-256x256.png", type: "image/png", sizes: "256x256" }, + { url: "/static/icon-192x192.png", type: "image/png", sizes: "192x192" }, + { url: "/static/icon-96x96.png", type: "image/png", sizes: "96x96" }, + { url: "/static/icon-48x48.png", type: "image/png", sizes: "48x48" } + ], + apple: [ + { url: "/static/icon-512x512.png", sizes: "512x512" }, + { url: "/static/icon-384x384.png", sizes: "384x384" }, + { url: "/static/icon-256x256.png", sizes: "256x256" }, + { url: "/static/icon-192x192.png", sizes: "192x192" }, + { url: "/static/icon-96x96.png", sizes: "96x96" }, + { url: "/static/icon-48x48.png", sizes: "48x48" } + ] + }, + appleWebApp: { + title: "itDAGENE" + }, + manifest: "/static/manifest.json" +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}): JSX.Element { + return ( + + {/* + + + + + + + {this.props.styleTags} + */} + + + {children} +