Skip to content

CW2-7-move-social-media-to-footer #10

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

Merged
merged 5 commits into from
May 19, 2024
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
57 changes: 35 additions & 22 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
import Image from 'next/image';

Check failure on line 1 in components/Footer.tsx

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'Image'.
import Link from 'next/link';
import Image from 'next/image';

Check failure on line 3 in components/Footer.tsx

View workflow job for this annotation

GitHub Actions / build

Duplicate identifier 'Image'.
import { socialLinks } from '../public/data/data';

const Footer = () => {
return (
<section>
<div className="sm:flex justify-between">
<div className="flex items-center">
<img src="assets/csesoc_logo_white.svg" alt="CSESoc Logo" />
<Link href="/flag/ollie_is_hiding.png" target="_blank" className="sm:hidden block">
<Image
src="/flag/ollie_is_hiding.png"
alt="Ollie"
draggable="false"
width={60}
height={60}
className="ml-10"
/>
</Link>
<Image
src="/flag/ollie_is_hiding.png"
alt="Ollie"
draggable="false"
width={60}
height={60}
className="ml-10 sm:block hidden"
/>
<div className="sm:flex justify-between pb-10">
<div className="flex flex-col gap-10">
<div className="flex items-center">
<Link href="/" className="flex">
<Image src="assets/csesoc_logo_white.svg" width={231} height={53} alt="CSESoc Logo" />
<Image
src="/flag/ollie_is_hiding.png"
alt="Ollie"
draggable="false"
width={60}
height={60}
className="ml-10"
/>
</Link>
</div>
<div className="grid grid-cols-8 gap-4">
{socialLinks.map((item, index) => {
return (
<a key={index} className="" href={item.href}>
<Image
className="h-4 fill-white min-w-full hover:scale-125 transition-all"
src={item.src}
alt={item.alt}
height={0}
width={0}
/>
</a>
);
})}
</div>
</div>
<div className="flex flex-col max-w-[14rem] sm:mt-0 mt-10 font-light">
<p className="mb-6">B03 CSE Building K17, UNSW [email protected]</p>
<p>© 2021 — CSESoc UNSW</p>
</div>
</div>
<img
<Image
src="assets/sponsors_backdrop.svg"
alt="Sponsors backdrop"
height={0}
width={0}
className="absolute bottom-0 left-0 w-screen -z-10"
/>
</section>
Expand Down
29 changes: 2 additions & 27 deletions components/Sponsors/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from 'next/link';

Check warning on line 1 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

'Link' is defined but never used
import React from 'react';
import Footer from '../Footer';

const Sponsors = () => {
const firstRowBoxesStyling =
Expand Down Expand Up @@ -33,47 +34,21 @@
</div>
</div>
<div className={`${firstRowBoxesStyling} bg-[rgba(0, 71, 255, 0.33)]`}>
<img src="assets/atlassian_logo.svg" alt="Atlassian logo" />

Check warning on line 37 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
</div>
<div className={`${firstRowBoxesStyling} bg-[rgba(82, 130, 255, 0.47)]`}>
<img src="assets/google_logo.svg" alt="Google logo" />

Check warning on line 40 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
</div>
<div className={`${secondRowBoxesStyling} bg-[rgba(48, 93, 255, 0.2)]`}>
<img src="assets/freelancer_logo.svg" alt="Freelancer logo" />

Check warning on line 43 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
</div>
<div className={`${secondRowBoxesStyling} bg-[rgba(122, 137, 236, 0.27)]`}>
<img src="assets/microsoft_logo.svg" alt="Microsoft logo" />

Check warning on line 46 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
</div>
</div>
</div>
<div className="sm:flex justify-between">
<div className="flex items-center">
<img src="assets/csesoc_logo_white.svg" alt="CSESoc Logo" />
<Link href="/flag/ollie_is_hiding.png" target="_blank" className="sm:hidden block">
<img
src="/flag/ollie_is_hiding.png"
alt="Ollie"
draggable="false"
width={60}
height={60}
className="ml-10"
/>
</Link>
<img
src="/flag/ollie_is_hiding.png"
alt="Ollie"
draggable="false"
width={60}
height={60}
className="ml-10 sm:block hidden"
/>
</div>
<div className="flex flex-col max-w-[14rem] sm:mt-0 mt-10 font-light">
<p className="mb-6">B03 CSE Building K17, UNSW [email protected]</p>
<p>© 2021 — CSESoc UNSW</p>
</div>
</div>
<Footer />
<img

Check warning on line 51 in components/Sponsors/index.tsx

View workflow job for this annotation

GitHub Actions / build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
src="assets/sponsors_backdrop.svg"
alt="Sponsors backdrop"
className="absolute bottom-0 left-0 w-screen -z-10"
Expand Down
44 changes: 44 additions & 0 deletions public/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export type sponsorInfo = {
alt: string;
};

export type socialInfo = {
href: string;
src: string;
alt: string;
};

export const diamondLinks: sponsorInfo[] = [
{
href: 'https://www.janestreet.com/',
Expand Down Expand Up @@ -102,3 +108,41 @@ export const silverLinks: sponsorInfo[] = [
alt: 'Canva logo'
}
];

export const socialLinks: socialInfo[] = [
{
href: 'https://bit.ly/CSESocDiscord',
src: 'assets/discord_logo.svg',
alt: 'Discord'
},
{
href: 'https://www.facebook.com/csesoc/',
src: 'assets/fb_logo.svg',
alt: 'Facebook'
},
{
href: 'https://twitter.com/csesoc?lang=en',
src: 'assets/x_twitter_icon.svg',
alt: 'X/Twitter'
},
{
href: 'https://www.youtube.com/@CSESocUNSW',
src: 'assets/youtube_logo.svg',
alt: 'Youtube'
},
{
href: 'https://www.instagram.com/csesoc_unsw/?hl=en',
src: 'assets/instagram_logo.svg',
alt: 'Instagram'
},
{
href: 'https://www.tiktok.com/@csesoc?lang=en',
src: 'assets/tiktok_logo.svg',
alt: 'TikTok'
},
{
href: 'https://www.linkedin.com/company/csesoc?originalSubdomain=au',
src: 'assets/linkedin_logo.svg',
alt: 'LinkedIn'
}
];
Loading