Skip to content

CW2-39 Adding DevSoc to Resources #22

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 2 commits into from
Jul 15, 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
50 changes: 50 additions & 0 deletions frontend/public/assets/devsoc_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 41 additions & 14 deletions frontend/src/components/Resources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import Image from 'next/image';
import { resourceCards, stage1, stage2, stage3 } from '../../../public/data/resourceCards';

const boxStyling =
'border border-[#595F6D] rounded-lg hover:border-[#788093] hover:bg-[#070034] hover:bg-opacity-75 transition-all duration-300';
const socialsBoxStyling =
'xl:col-span-1 col-span-3 flex justify-center pt-2 pb-2 border border-[#595F6D] hover:border-[#788093] rounded-lg hover:bg-[#070034] hover:bg-opacity-75 transition-all duration-300';

'border border-[#595F6D] rounded-lg hover:border-[#788093] hover:bg-[#070034] hover:bg-opacity-75 transition-all duration-300';

const Resources = () => {
return (
<section className="bg-no-repeat bg-center py-8 px-15 min-h-screen flex justify-center items-center">
Expand All @@ -16,23 +14,35 @@ const Resources = () => {
<h2 className="font-bold text-6xl">RESOURCES</h2>
</div>

<div className="flex">
<span className="text-lg">Made by</span>
<Image
src="/assets/csesoc_logo.svg"
alt="CSESoc Logo"
width={100}
height={100}
className="pl-2"
/>
</div>

<div className="py-8 bg-no-repeat bg-center">
<div className="grid grid-cols-4 1 gap-x-9 gap-y-5">
{stage1.map((item: resourceCards) => {
{stage3.map((item: resourceCards) => {
return (
<a
key={item.id}
href={item.href}
target="_blank"
className={`col-span-4 p-5 ${boxStyling} flex`}
className={`md:col-span-2 col-span-4 p-5 ${boxStyling} flex`}
>
<div className="flex justify-center align-middle items-center pl-2 pr-10">
<div className="flex align-middle items-center pt-2 pb-4 pr-10">
<Image
src={item.svg}
alt={item.alt}
draggable="false"
width={item.width}
height={item.height}
className="rounded-md"
/>
</div>
<div>
Expand All @@ -42,16 +52,34 @@ const Resources = () => {
</a>
);
})}
</div>
</div>

{stage2.map((item: resourceCards) => {
<a href="https://devsoc.app/" target="_blank" rel="noopener noreferrer">
<div
className={`flex grow-on-hover cursor-pointer transform transition-transform duration-300 hover:scale-105`}
>
<span className="text-lg">Made by</span>
<Image
src="/assets/devsoc_logo.svg"
alt="DevSoc Logo"
width={110}
height={110}
className="pl-1"
/>
</div>
</a>
<div className="py-8 bg-no-repeat bg-center">
<div className="grid grid-cols-4 1 gap-x-9 gap-y-5">
{stage1.map((item: resourceCards) => {
return (
<a
key={item.id}
href={item.href}
target="_blank"
className={`xl:col-span-1 col-span-4 p-5 ${boxStyling}`}
className={`col-span-4 p-5 ${boxStyling} flex`}
>
<div className="flex align-middle items-center pt-2 pb-4">
<div className="flex justify-center align-middle items-center pl-2 pr-10">
<Image
src={item.svg}
alt={item.alt}
Expand All @@ -68,22 +96,21 @@ const Resources = () => {
);
})}

{stage3.map((item: resourceCards) => {
{stage2.map((item: resourceCards) => {
return (
<a
key={item.id}
href={item.href}
target="_blank"
className={`md:col-span-2 col-span-4 p-5 ${boxStyling} flex`}
className={`xl:col-span-1 col-span-4 p-5 ${boxStyling}`}
>
<div className="flex align-middle items-center pt-2 pb-4 pr-10">
<div className="flex align-middle items-center pt-2 pb-4">
<Image
src={item.svg}
alt={item.alt}
draggable="false"
width={item.width}
height={item.height}
className="rounded-md"
/>
</div>
<div>
Expand Down
Loading