Skip to content

Commit

Permalink
Migrated to nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
DerCed committed Feb 13, 2024
1 parent f74164a commit 58e7b0d
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 113 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Node install and build
uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: npm i
- run: npm run build --if-present
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
Expand Down
12 changes: 2 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
FROM node:lts AS runtime
WORKDIR /app
FROM nginx:alpine

COPY . .

RUN npm install
RUN npm run build

ENV HOST=0.0.0.0
ENV PORT=80
COPY ./out /usr/share/nginx/html/
EXPOSE 80
CMD node ./dist/server/entry.mjs
33 changes: 33 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";
import {AppRouterCacheProvider} from "@mui/material-nextjs/v13-appRouter";
import HackHPIWrapper from "../src/components/Theme/HackHPIWrapper";
import Footer from "../src/components/Footer/Footer";

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<head>
<meta charSet="UTF-8"/>
<meta name="viewport" content="width=device-width"/>
<link rel="icon" type="image/svg" href="/HackHPI_white.svg"/>
<title>
HackHPI 2024 | tomorrow's reality, today's vision. smart cities edition.
</title>
<meta name={"description"}
content={"Explore the future of urban living at HPI in Potsdam. Join motivated students for two days of innovation, workshops, and collaboration with top-notch sponsors offering support and expertise. Tackle a challenge and dive into the world of smart cities."}/>
</head>
<body>
<AppRouterCacheProvider>
<HackHPIWrapper>
{children}
</HackHPIWrapper>
<Footer/>
</AppRouterCacheProvider>
</body>
</html>
)
}
27 changes: 27 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import LandingImage2 from "../src/components/LandingImage/LandingImage2";
import {VerifiedChecker} from "../src/components/VerifiedChecker/VerifiedChecker";
import WhatToExpect from "../src/components/WhatToExpect/WhatToExpect";
import Sponsors from "../src/components/Sponsors/Sponsors";
import Registration from "../src/components/Registration/Registration";
import Newsletter from "../src/components/Newsletter/Newsletter";
import {TimeTable} from "../src/components/TimeTable/TimeTable";
import {Gallery} from "../src/components/Gallery/Gallery";
import {Faq} from "../src/components/Faq/Faq";
import Team from "../src/components/Team/Team";

export default function Page() {
return (
<>
<LandingImage2 />
<VerifiedChecker />
<WhatToExpect />
<Sponsors />
<Registration/>
<Newsletter />
<TimeTable />
<Gallery />
<Faq />
<Team />
</>
)
}
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',

// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,

// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,

// Optional: Change the output directory `out` -> `dist`
// distDir: 'dist',
}

module.exports = nextConfig
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"name": "hackhpi-website",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"dev": "next dev",
"start": "next dev",
"build": "next build",
"lint": "next lint"
},
"dependencies": {
"@astrojs/node": "^6.1.0",
"@astrojs/react": "^3.0.9",
"@astrojs/tailwind": "^5.0.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@fontsource-variable/exo-2": "^5.0.17",
Expand All @@ -27,12 +26,14 @@
"@mui/icons-material": "^5.15.5",
"@mui/lab": "^5.0.0-alpha.163",
"@mui/material": "^5.15.5",
"@mui/material-nextjs": "^5.15.9",
"@supabase/supabase-js": "^2.39.3",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"astro": "^3.1.1",
"astro-icon": "^0.8.1",
"axios": "^1.6.7",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-type-animation": "^3.2.0",
Expand Down
84 changes: 84 additions & 0 deletions public/HackHPI24_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/FadeInContainer/FadeInContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import ReactVisibilitySensor from 'react-visibility-sensor';
import {useState} from "react";
import {Slide} from "@mui/material";
Expand Down
1 change: 1 addition & 0 deletions src/components/Faq/Faq.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {Box, Card, Container, Grid, Link, List, ListItemButton, ListItemIcon, Typography} from "@mui/material";
import React from "react";
import {KeyboardArrowRight} from "@mui/icons-material";
Expand Down
1 change: 1 addition & 0 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {
Card,
Container,
Expand Down
1 change: 1 addition & 0 deletions src/components/Gallery/Gallery.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {Box, Container, Grid, ImageList, ImageListItem, Typography} from "@mui/material";
import React from "react";
import DSC02572 from '../../assets/images/event/DSC02572_1920.webp'
Expand Down
1 change: 1 addition & 0 deletions src/components/LandingImage/Countdown.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {Typography} from "@mui/material";
import {useEffect, useState} from "react";

Expand Down
6 changes: 2 additions & 4 deletions src/components/LandingImage/LandingImage2.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {Box, Button, Container, Stack} from "@mui/material";
import '@fontsource/urbanist'
import {TypeAnimation} from "react-type-animation";
Expand All @@ -8,7 +9,6 @@ function LandingImage2() {


return (
<HackHPIWrapper>
<Box sx={{
height: "80vh",
width: "100%",
Expand All @@ -26,11 +26,10 @@ function LandingImage2() {
flexDirection: "column"
}}>

<img src={"/HackHPI24_white.png"} width={"200rem"}/>
<img src={"/HackHPI24_white.png"} width={"200rem"} alt={"HackHPI Logo"}/>
<div>
<Countdown/>
<TypeAnimation
client:load
preRenderFirstString={true}
sequence={[
500,
Expand Down Expand Up @@ -64,7 +63,6 @@ function LandingImage2() {
</Box>
</Container>
</Box>
</HackHPIWrapper>
)
}

Expand Down
1 change: 1 addition & 0 deletions src/components/Newsletter/Newsletter.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import {Box, Container, Grid, Link, Typography} from "@mui/material";
import {createClient} from "@supabase/supabase-js";
import {useEffect} from "react";
Expand Down
24 changes: 10 additions & 14 deletions src/components/Sponsors/Sponsors.jsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
import {Box, Container, Grid} from "@mui/material";
import Starwit from "../../assets/images/sponsors/cropped-logo-starwit-white.png"
import ESchool from "../../assets/images/sponsors/trpnt_e-school-standalone-white_high.png"
import {FadeInContainer} from "../FadeInContainer/FadeInContainer.jsx";
import React from "react";
import HackHPIWrapper from "../Theme/HackHPIWrapper.jsx";

function Sponsors() {
const containerRef = React.useRef(null);

return (
<HackHPIWrapper>
<Box ref={containerRef} sx={{paddingTop: 10, paddingBottom: 10}}>
<FadeInContainer containerRef={containerRef}>
<Container maxWidth={"xl"}>
<Grid container sx={{paddingTop: "5rem"}} justifyContent={"center"} spacing={10}>
<Grid item>
<img src={Starwit.src} alt={"Logo of starwit"} style={{height: "5rem"}}/>
</Grid>
<Grid item>
<img src={ESchool.src} alt={"Logo of E-Scool"} style={{height: "5rem"}}/>
</Grid>
<Box sx={{paddingTop: 10, paddingBottom: 10}}>
<Container maxWidth={"xl"}>
<Grid container sx={{paddingTop: "5rem"}} justifyContent={"center"} spacing={10}>
<Grid item>
<img src={Starwit.src} alt={"Logo of starwit"} style={{height: "5rem"}}/>
</Grid>
<Grid item>
<img src={ESchool.src} alt={"Logo of E-Scool"} style={{height: "5rem"}}/>
</Grid>
</Grid>

</Container>
</FadeInContainer>
</Container>
</Box>
</HackHPIWrapper>
)
Expand Down
Loading

0 comments on commit 58e7b0d

Please sign in to comment.