Skip to content

Commit

Permalink
Merge pull request #47 from simonyiszk/dev
Browse files Browse the repository at this point in the history
v2
  • Loading branch information
Tschonti authored Feb 19, 2024
2 parents 778c91a + a891332 commit 0887f10
Show file tree
Hide file tree
Showing 18 changed files with 387 additions and 32 deletions.
Binary file removed public/img/nebula-thumbnail.png
Binary file not shown.
Binary file added public/img/nebula-thumbnail.webp
Binary file not shown.
16 changes: 16 additions & 0 deletions public/img/uk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const raleway = Raleway({ subsets: ['latin'], variable: '--font-raleway' });
const recharge = localFont({ src: '../../public/recharge.otf', variable: '--font-recharge' });

export const metadata: Metadata = {
title: 'Simonyi Konferencia - 2024. 03. 19.',
title: {
default: 'Simonyi Konferencia - 2024. 03. 19.',
template: 'Simonyi Konferencia - %s',
},
description: 'Magyarország legnagyobb egyetemi hallgatók által szervezett éves technológiai konferenciája.',
keywords:
'Simonyi Konferencia 2024, technológiai konferencia, egyetemi rendezvény, hallgatók, hallgatók szervezése, Simonyi Károly Szakkollégium, BME-VIK, innováció, digitalizáció, műszaki fejlesztések, tudományos esemény, inspiráló előadások, szakmai workshopok, Magyarország eseményei, fiatal tehetségek, digitális megoldások, jövő technológiái, iparági trendek, tudásátadás, innovatív gondolkodás, egyetemi közösség, kreatív technológia, networking lehetőségek, szakmai előadók, technológiai innovációk, informatikai fejlődés, egyetemi tapasztalatok, mérnöki világ, vezető szakemberek, digitális társadalom, tudományos találkozó',
Expand Down
15 changes: 11 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { redirect } from 'next/navigation';

import { metadata } from '@/app/layout';
import { ImageCarouselSection } from '@/components/image-carousel/image-carousel-section';
import Presentation from '@/components/presentation/Presentation';
import { SponsorSection } from '@/components/sponsors/sponsor-section';
import CountdownTile from '@/components/tiles/countdown-tile/countdown-tile';
import { GiveawayTile } from '@/components/tiles/giveaway-tile';
Expand All @@ -11,6 +12,7 @@ import { PromoVideoTile } from '@/components/tiles/promo-video-tile';
import { RegisterTile } from '@/components/tiles/register-tile';
import { StatTile } from '@/components/tiles/stat-tile';
import { getIndexData } from '@/models/get-index-data';
import { kotlinPresentation, tresoritPresentation } from '@/models/staticPresentationData';

import konfLogo from '../../public/img/konf.svg';
import redPlanet from '../../public/img/red-planet.png';
Expand All @@ -25,7 +27,7 @@ export default async function Landing() {
<>
<div className='p-10 relative'>
<div className='max-w-md md:max-w-xl relative shadow-gloria rounded-full overflow-hidden mx-auto'>
<video className='h-full w-full' autoPlay playsInline loop muted poster='/img/nebula-thumbnail.png'>
<video className='h-full w-full' autoPlay playsInline loop muted poster='/img/nebula-thumbnail.webp'>
<source src='/video/nebula.mp4' type='video/mp4' />
</video>
</div>
Expand All @@ -40,11 +42,16 @@ export default async function Landing() {
<div className='grid grid-cols-1 sm:grid-cols-6 max-w-6xl w-full mt-40 gap-6 px-6 xl:px-0'>
{data.registration.cooltixEventId && <RegisterTile data={data.registration} />}

<StatTile desc='konferenciát rendeztünk már' number='20' />
<StatTile desc='percnyi előadás egy nap alatt' number='700+' />
<StatTile desc='előadó' number='14' />
<StatTile desc='óta rendezünk konferenciákat' number='2003' />
<StatTile desc='percnyi előadás egy nap alatt' number='400+' />
<StatTile desc='előadás' number='20' />

<Presentation presentation={kotlinPresentation} isFrontPage />

{data.promoVideo.youtubeUrl && <PromoVideoTile data={data.promoVideo} />}

<Presentation presentation={tresoritPresentation} isFrontPage />

{data.giveaway.pictureUrl && <GiveawayTile data={data.giveaway} showLink={false} />}

<CountdownTile />
Expand Down
51 changes: 51 additions & 0 deletions src/app/presentations/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { Metadata, ResolvingMetadata } from 'next';
import { notFound } from 'next/navigation';

import Presentation from '@/components/presentation/Presentation';
import { getIndexData } from '@/models/get-index-data';
import slugify from '@/utils/slugify';

export async function generateStaticParams() {
const data = await getIndexData();

return (
data?.presentations?.map((p) => ({
slug: slugify(p.title),
})) ?? []
);
}

type Props = {
params: { slug: string };
};

export async function generateMetadata({ params: { slug } }: Props, parent: ResolvingMetadata): Promise<Metadata> {
const data = await getIndexData();
const presentation = data?.presentations.find((p) => slugify(p.title) === slug);

return {
title: presentation?.title,
description: `${presentation?.presenter.name} "${presentation?.title}" című előadása a XXI. Simonyi Konferencián`,
keywords: `${(await parent).keywords}, ${presentation?.presenter.name}${presentation?.title
.split(' ')
.reduce((prev, curr) => `${prev}, ${curr}`, '')}`,
};
}

const getPresentationBySlug = async (slug: string) => {
const data = await getIndexData();
return data?.presentations.find((p) => slugify(p.title) === slug);
};

export default async function PresentationBySlug({ params }: { params: { slug: string } }) {
const presentation = await getPresentationBySlug(params.slug);
if (!presentation) {
notFound();
}

return (
<div className='mt-10'>
<Presentation presentation={presentation} />
</div>
);
}
65 changes: 65 additions & 0 deletions src/app/presentations/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import clsx from 'clsx';
import { Metadata } from 'next';
import Link from 'next/link';
import { notFound } from 'next/navigation';

import { Tile } from '@/components/tiles/tile';
import { getIndexData } from '@/models/get-index-data';
import slugify from '@/utils/slugify';

export const metadata: Metadata = {
title: 'Előadások',
description:
'Az előadások listája a XXI. Simonyi Konferencián, Magyarország legnagyobb egyetemi hallgatók által szervezett éves technológiai konferenciáján.',
};

export default async function Presentations() {
const data = await getIndexData();
if (!data || !data.presentations) {
notFound();
}
const presentations = data.presentations.sort((p1, p2) => p1.title.localeCompare(p2.title));

return (
<div className='flex flex-col max-w-6xl w-full px-6 xl:px-0'>
<h1 className='mb-16 mt-8'>Előadások</h1>

<div className='grid grid-cols-1 xs:grid-cols-2 lg:grid-cols-3 gap-8'>
{presentations.map((presentation) => (
<Tile key={presentation.title} clickable>
<Tile.Body lessPadding='[1px]'>
<div className='flex flex-col h-full'>
<Link className='h-full flex flex-col' href={`/presentations/${slugify(presentation.title)}`}>
<div>
<img
src={presentation.presenter.pictureUrl}
className='w-full aspect-square object-cover object-center rounded-[30px]'
alt='Presentation Image'
/>
<div className='z-20 px-5 py-2 absolute text-center left-1/2 -translate-x-[50%] -translate-y-[50%] shadow-md rounded-xl overflow-hidden bg-[#FFE500]'>
{presentation.presenter.name.split(',').map((pName) => (
<p className='whitespace-nowrap min-w-[200px] sm:min-w-[240px] text-2xl xs:text-xl sm:text-2xl text-black font-bold'>
{pName}
</p>
))}
</div>
</div>
<div
className={clsx(
'p-6 h-full flex items-center justify-center',
presentation.presenter.name.split(',').length > 1 ? 'mt-6' : 'mt-2'
)}
>
<h2 className='text-center text-[24px] font-bold text-white'>{presentation.title}</h2>
</div>
</Link>
</div>
</Tile.Body>
</Tile>
))}
</div>

<h2 className='mt-20 text-center'>Az előadások listája még bővül!</h2>
</div>
);
}
6 changes: 3 additions & 3 deletions src/components/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SocialButtons } from './social-buttons';

export function Footer() {
return (
<footer className='max-w-6xl mx-auto mt-24 w-full flex flex-col gap-10 mb-10 px-8 md:px-0'>
<footer className='max-w-6xl mx-auto mt-24 w-full flex flex-col gap-10 mb-10 px-8 xl:px-0'>
<div className='flex flex-col md:flex-row gap-6 justify-between'>
<div className='flex flex-col gap-4 w-full md:w-1/2 '>
<Image src={konfLogo} width={560} height={135} alt='Simonyi Konferencia' />
Expand All @@ -17,9 +17,9 @@ export function Footer() {
</div>

<div className='flex flex-col gap-4 text-center md:text-right text-xl font-medium'>
{/* <Link href='/presentations' className='brand-link'>
<Link href='/presentations' className='brand-link'>
Előadások
</Link> */}
</Link>
<Link href='/contact' className='brand-link'>
Kapcsolat
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/image-carousel/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const Carousel = <T,>({ items, renderItem }: CarouselProps<T>) => {
/>
</div>
<ul
className='relative w-[300px] sm:w-[616px] md:w-auto mx-auto flex gap-4 overflow-hidden snap-x'
className='relative w-[300px] sm:w-[616px] mdx:w-[932px] lg:w-auto mx-auto flex gap-4 overflow-hidden snap-x'
ref={scrollRef}
>
{items.map((item, i) =>
Expand Down
35 changes: 21 additions & 14 deletions src/components/image-carousel/image-carousel-section.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use client';

import 'yet-another-react-lightbox/styles.css';
import 'yet-another-react-lightbox/plugins/captions.css';

import Image from 'next/image';
import { useState } from 'react';
import Lightbox from 'yet-another-react-lightbox';
import Captions from 'yet-another-react-lightbox/plugins/captions';

import { PrevConfData } from '@/models/models';

Expand All @@ -17,33 +19,38 @@ type Props = {

export function ImageCarouselSection({ data: { conferences, sectionTitle } }: Props) {
const [index, setIndex] = useState(-1);
const images = conferences[0].imageUrls;
return (
<div className='my-16 sm:my-40'>
<h2 className='flex justify-center mb-4'>{sectionTitle}</h2>
<div className='w-full max-w-6xl px-6 xl:px-0'>
<Carousel
items={images}
items={conferences}
renderItem={({ item, isSnapPoint, index: i }) => (
<CarouselItem key={item} isSnapPoint={isSnapPoint}>
<Image
onClick={() => setIndex(i)}
src={item}
key={item}
alt='Kép korábbi konferenciáról'
className='h-full cursor-pointer rounded-[30px]'
height={200}
width={300}
/>
<CarouselItem key={item.priority} isSnapPoint={isSnapPoint}>
<div className='flex flex-col items-center'>
<Image
onClick={() => setIndex(i)}
src={item.imageUrls[0]}
key={item.priority}
alt='Kép korábbi konferenciáról'
className='h-full cursor-pointer rounded-[30px]'
height={200}
width={300}
/>
<h3 className='text-3xl font-semibold mt-2'>{item.priority}</h3>
<p className='mt-1 text-md sm:text-lg font-medium'>{item.title}</p>
</div>
</CarouselItem>
)}
/>
</div>
<Lightbox
open={index > -1}
index={index}
plugins={[Captions]}
close={() => setIndex(-1)}
slides={images.map((i) => ({ src: i }))}
slides={
index > -1 ? conferences[index].imageUrls.map((i) => ({ src: i, title: conferences[index].title })) : []
}
render={{ slide: NextJsImage }}
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/navbar/navbar-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const links = [
href: '/',
label: 'főoldal',
},
// {
// href: '/presentations',
// label: 'előadások',
// },
{
href: '/presentations',
label: 'előadások',
},
{
href: '/contact',
label: 'kapcsolat',
Expand Down
Loading

0 comments on commit 0887f10

Please sign in to comment.