Skip to content

Commit

Permalink
feat: footer improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
berenteb authored and Tschonti committed Dec 15, 2023
1 parent 303b457 commit 79027d9
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 39 deletions.
30 changes: 2 additions & 28 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import './globals.css';

import type { Metadata } from 'next';
import { Raleway } from 'next/font/google';
import Image from 'next/image';
import Link from 'next/link';
import { FaFacebook, FaInstagram, FaYoutube } from 'react-icons/fa';

import { Footer } from '@/components/footer/footer';
import { Navbar } from '@/components/navbar/navbar';

const raleway = Raleway({ subsets: ['latin'] });
Expand All @@ -26,31 +24,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<div className='max-w-6xl p-20 mx-auto relative h-full w-full flex justify-center items-center'>
{children}
</div>
<div className='p-10 md:p-15 flex justify-between items-center flex-wrap gap-10 flex-col md:flex-row'>
<div className='flex items-center gap-5 text-[40px]'>
<Link href='https://www.instagram.com/simonyikonf' className='brand-link' target='blank'>
<FaInstagram />
</Link>
<Link href='https://www.facebook.com/events/1060756212046229' className='brand-link' target='blank'>
<FaFacebook />
</Link>
<Link
href='https://www.youtube.com/watch?v=QDKDaMKqcoQ&list=PLovp3RCdzQGx_lKpvCgUJT6n-wJazXKrL'
className='brand-link'
target='blank'
>
<FaYoutube />
</Link>
</div>
<div className='flex items-center gap-10'>
<Link href='https://schdesign.hu' className='brand-link' target='blank'>
<Image className='-mb-2' src='/img/schdesign.svg' alt='schdesign' width={148} height={40} />
</Link>
<Link href='https://kir-dev.hu' className='brand-link' target='blank'>
<Image src='/img/kirdev-inline.svg' alt='Kir-Dev' width={193} height={40} />
</Link>
</div>
</div>
<Footer />
</main>
</body>
</html>
Expand Down
33 changes: 33 additions & 0 deletions src/components/footer/desktop-footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Image from 'next/image';
import Link from 'next/link';
import { FaFacebook, FaInstagram, FaYoutube } from 'react-icons/fa';

export function DesktopFooter() {
return (
<footer className='hidden md:flex p-10 justify-between items-center gap-10 flex-row'>
<div className='flex items-center gap-5 text-[40px]'>
<Link href='https://www.instagram.com/simonyikonf' className='brand-link' target='blank'>
<FaInstagram />
</Link>
<Link href='https://www.facebook.com/events/1060756212046229' className='brand-link' target='blank'>
<FaFacebook />
</Link>
<Link
href='https://www.youtube.com/watch?v=QDKDaMKqcoQ&list=PLovp3RCdzQGx_lKpvCgUJT6n-wJazXKrL'
className='brand-link'
target='blank'
>
<FaYoutube />
</Link>
</div>
<div className='flex items-center gap-10'>
<Link href='https://schdesign.hu' className='brand-link' target='blank'>
<Image className='-mb-2' src='/img/schdesign.svg' alt='schdesign' width={148} height={40} />
</Link>
<Link href='https://kir-dev.hu' className='brand-link' target='blank'>
<Image src='/img/kirdev-inline.svg' alt='Kir-Dev' width={193} height={40} />
</Link>
</div>
</footer>
);
}
11 changes: 11 additions & 0 deletions src/components/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { DesktopFooter } from '@/components/footer/desktop-footer';
import { MobileFooter } from '@/components/footer/mobile-footer';

export function Footer() {
return (
<>
<MobileFooter />
<DesktopFooter />
</>
);
}
9 changes: 9 additions & 0 deletions src/components/footer/mobile-footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { UniLogos } from '@/components/uni-logos';

export function MobileFooter() {
return (
<footer className='flex md:hidden p-10 justify-end'>
<UniLogos />
</footer>
);
}
13 changes: 2 additions & 11 deletions src/components/navbar/desktop-navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import Image from 'next/image';
import Link from 'next/link';

import { NavbarItems } from '@/components/navbar/navbar-items';
import { UniLogos } from '@/components/uni-logos';

export function DesktopNavbar() {
return (
<nav className='hidden md:flex p-10 md:p-15 justify-between items-center flex-wrap gap-10 flex-col md:flex-row'>
<div className='flex items-center gap-10'>
<Link href='https://simonyi.bme.hu' className='brand-link' target='blank'>
<Image src='/img/simonyi.svg' alt='Simonyi Károly Szakkollégium' width={193} height={40} />
</Link>
<Link href='https://vik.bme.hu' className='brand-link' target='blank'>
<Image src='/img/vik.svg' alt='Vik' width={40} height={40} />
</Link>
</div>
<UniLogos />
<div className='flex items-center gap-10'>
<NavbarItems />
</div>
Expand Down
17 changes: 17 additions & 0 deletions src/components/uni-logos.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import clsx from 'clsx';
import Image from 'next/image';
import Link from 'next/link';
import { HTMLAttributes } from 'react';

export function UniLogos({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
return (
<div className={clsx('flex items-center gap-10', className)} {...props}>
<Link href='https://vik.bme.hu' className='brand-link' target='blank'>
<Image src='/img/vik.svg' alt='Vik' width={40} height={40} />
</Link>
<Link href='https://simonyi.bme.hu' className='brand-link' target='blank'>
<Image src='/img/simonyi.svg' alt='Simonyi Károly Szakkollégium' width={193} height={40} />
</Link>
</div>
);
}

0 comments on commit 79027d9

Please sign in to comment.