Skip to content
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

Sponsors #24

Merged
merged 27 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b270a93
fix: navbar mobile animation
SRIMANKS Dec 12, 2023
08e4678
feat: responsiveness
elegantShock2258 Dec 13, 2023
fffd8a6
feat: responsiveness, fixed sponsor button issue and overflow issue
elegantShock2258 Dec 13, 2023
7b6ec63
wip: responsiveness, todo: decrease card sizes
elegantShock2258 Dec 13, 2023
89dc297
fix: aboutCard skill issue :(
bhoopesh369 Dec 13, 2023
f0ab941
fix: signUp
bhoopesh369 Dec 13, 2023
fd82443
fix(footer): delta and login
bhoopesh369 Dec 13, 2023
12ec5c3
fix: mobile responsiveness
elegantShock2258 Dec 13, 2023
8c185d1
fix: mobile responsiveness
elegantShock2258 Dec 13, 2023
54ea353
Merge pull request #2 from elegantShock2258/sponsors
elegantShock2258 Dec 14, 2023
f5c10b4
Merge branch 'main' of github.com:elegantShock2258/pragyan-24-frontend
elegantShock2258 Dec 14, 2023
e9eff44
fix: mobile responsiveness
elegantShock2258 Dec 14, 2023
ee5ccba
fix: mobile responsiveness
elegantShock2258 Dec 14, 2023
f01d18d
Merge branch 'main' of github.com:elegantShock2258/pragyan-24-fronten…
elegantShock2258 Dec 14, 2023
e8aca4c
fix: astronaut
elegantShock2258 Dec 14, 2023
090cc47
fix: mobile sponsors button, center cards always
elegantShock2258 Dec 14, 2023
020215e
fix: mobile sponsors button, center cards always
elegantShock2258 Dec 14, 2023
18c6bfd
fix: s20 ultra overflow
elegantShock2258 Dec 14, 2023
c564fad
fix: ipad mini overlap, and add more screens
elegantShock2258 Dec 14, 2023
ea397b1
fix: scroll behavior
elegantShock2258 Dec 15, 2023
60455e5
fix: scroll behavior
elegantShock2258 Dec 15, 2023
8d9821a
fix: scroll behavior
elegantShock2258 Dec 15, 2023
6b891a4
fix: astronaut, sponsor button placement, integrate cms
elegantShock2258 Dec 17, 2023
77b1802
fix: sponsorcard alignment
elegantShock2258 Dec 17, 2023
7c5d30a
fix: sponsorsContainer overflow
elegantShock2258 Dec 18, 2023
67ac19f
fix: sponsorsContainer overflow
elegantShock2258 Dec 18, 2023
88edf4b
fix: zindex issue
elegantShock2258 Dec 18, 2023
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
4 changes: 4 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ body {
color: white;
}

.page-layout {
min-height: max(100vh, 760px);
}

.footer-bg {
border-radius: 10px;
background: rgba(0, 0, 0, 0.45);
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<html lang="en">
<body>
<div className="w-full min-h-screen bg-[#070B12]">{children}</div>
<div className="w-full min-h-screen bg-[#070B12] page-layout">{children}</div>
<Footer />
<Toast />
</body>
Expand Down
33 changes: 21 additions & 12 deletions src/app/sponsors/page.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
'use client';
import { NavBar, SponsorButton, SponsorCard } from '@/components';
import styles from './sponsors.module.css';
import Image from 'next/image';

import astronaut from '../../assets/images/astronaut.svg';
import { getSponsors } from '@/utils/events_cms';
import { useEffect, useState } from 'react';

export default function Sponsors() {
const sponsorsList: SponsorCardProps[] = []; // change to let
const [sponsorsList, setSponsorsList] = useState<SponsorCardProps[]>([]);
useEffect(() => {
const a = async () => {
setSponsorsList(await getSponsors());
};
a();
}, []);

// backend logic
// sponsorsList = await(await fetch("backend url",{next:{tags:['collection']}})).json();
return (
<div className="p-5">
<div className={styles.page}>
<NavBar />
<div className={styles.parent}>
<div className={styles.background}>
<h1 className={styles.backgroundText}>SPONSORS</h1>
</div>
<div className={styles.foreground}>
{sponsorsList.length > 0 ? (
<>
<div className="flex flex-col">
<div className={styles.sponsorText}>SPONSORS</div>
<div className={styles.sponsorButtonUp}>
<SponsorButton />
</div>
<div className={styles.sponsorText}>SPONSORS</div>
<div className={styles.sponsorList}>
{sponsorsList.map((e: SponsorCardProps) => (
<SponsorCard name={e.name} logo={e.logo} key={e.toString()} />
))}
<div className={styles.parentList}>
<div className={styles.sponsorList}>
{sponsorsList.map((e: SponsorCardProps) => (
<SponsorCard name={e.name} logo={e.logo} key={e.name} />
))}
</div>
</div>
</>
</div>
) : (
<>
<h1 className={styles.sponsor}>SPONSORS</h1>
{sponsorsList.length <= 0 && (
<div className={styles.sponsorParent}>
<div className={styles.sponsorButton}>
<div className={`${styles.sponsorButton} ${styles.empty}`}>
<SponsorButton />
</div>
<Image
Expand Down
167 changes: 153 additions & 14 deletions src/app/sponsors/sponsors.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,53 @@
display: grid;
}

.foreground {
display: flex;
flex-direction: column;
gap:1px;
}

.foreground,
.background {
width: 100vw;
max-width: 100vw;
overflow: hidden;
overflow-x: hidden;
grid-area: 1/1;
max-height: 86vh;
}

.foreground {
display: flex;
flex-direction: column;
gap: 1px;

height: 100vh;
width: 100%;
}

.sponsor {
color: #fff;
text-align: center;
font-family: ROG;
font-size: 74.8px;

align-self: center;
width: fit-content;

font-style: normal;
font-weight: 400;
line-height: normal;
padding-top:60px;
padding-top: 60px;

@media screen and (max-width:560px) {
font-size: 34.8px;
text-align: center;
}

@media screen and (min-width:656px) and (max-width:656px) {
font-size: 34.8px;
}
}

.background {
display: flex;
justify-content: center;
align-items: center;
width: fit-content;
}

.backgroundText {
Expand All @@ -48,6 +65,11 @@
color: transparent;
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: #ffffff90;

@media screen and (max-width:560px) {
font-size: 3rem;
overflow: hidden;
}
}

.sponsorParent {
Expand All @@ -57,11 +79,29 @@
gap: 2px;
height: fit-content;
transform: translateY(-10%);
width: min-content;

@media screen and (max-width:560px) {
overflow: none;
padding-left: 0px;
}
}

.sponsorButton {
margin-top: 90px;
height: fit-content;
padding: 0px;
width: min-content;
height: min-content;

@media screen and (max-width:560px) {
transform: translate(10%, -5%);
margin-top: 60px;
}
}

.empty{
height: 35%;
display: flex;
align-items: flex-end;
}

.sponsorText {
Expand All @@ -74,23 +114,122 @@
font-style: normal;
font-weight: 400;
line-height: normal;

@media screen and (min-width:768px) and (max-width:840px) {
font-size: 94.8px;
}

@media screen and (max-width:560px) {
font-size: 44px;
}

@media screen and (max-width:300px) {
font-size: 34px;
}
}

.sponsorButtonUp {
position: absolute;
/* position: absolute;
right: 30px;
margin-top: 85px;
top: 85px; */

position: relative;
transform: translate(36%, -5%);
display: flex;
justify-content: center;
align-items: center;


@media screen and (min-width:768px) and (max-width:820px) {
margin-top: 30px;
transform: translate(27%, -5%);
}

@media screen and (max-width:560px) {
transform: translate(10%, -55%);
margin-top: 60px;
}


@media screen and (min-width:656px) and (max-width:656px) {
margin-top: 15px;
transform: translate(23%, -5%);
}

@media screen and (min-width:540px) and (max-width:540px) {
transform: translate(27%, -45%);
}

@media screen and (min-width:412px) and (max-width:412px) {
transform: translate(13%, -45%);
}

@media screen and (min-width:912px) and (max-width:912px) {
transform: translate(32%, 3%);
}

@media screen and (max-width:300px) {
width: fit-content;
height: fit-content;
transform: translate(-8%, -65%);
margin-top: 60px;
}
}

.sponsorList {
/* margin-top: 140px; */
display: flex;
flex-wrap: wrap;
max-height: 100%;
width: fit-content;
height: fit-content;
overflow-x: hidden;

gap: 115px;
justify-content: center;

@media screen and (max-width:560px) {
gap: 5px;
}


}
.astro{

.astro {
overflow: hidden;
min-width: 320px !important;

@media screen and (max-width:560px) {
display: none;
}
}

.parentList {
padding: 50px;
padding-top: 0px;
display: flex;
justify-content: center;
align-items: center;
height: 100%;

@media screen and (max-width:560px) {
padding: 0px;
transform: translateY(-80px);
}

@media screen and (min-width:656px) and (max-width:656px) {
transform: translateY(30px);
}

}

.parentList::-webkit-scrollbar,
.foreground::-webkit-scrollbar,
.sponsorList::-webkit-scrollbar {
display: none;
}

.page {
padding: 5px;
min-height: 100vh;
min-width: 100vw;
}
2 changes: 1 addition & 1 deletion src/assets/images/astronaut.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/top-left-border.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/images/top-right-border.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/components/AboutCard/AboutCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ const AboutCard: React.FC<AboutCardProps> = ({ cardRef }) => {
const content1 = AboutContent.content1;
const content2 = AboutContent.content2;
return (
<div className="AboutCard max-lg:hidden h-fit sm:w-[85%] sm:h-[70%] md:w-[50rem] md:h-[60%] flex justify-center items-center pt-20 p-11 ">
<p ref={cardRef} className="font-Nunito text-xl h-[90%] w-[88.5%] overflow-auto p-1">
<div className="AboutCard max-lg:hidden h-fit sm:w-[85%] sm:h-[70%] md:w-[50rem] md:h-[60%] md:max-h-96 flex justify-center items-center pt-20 p-11">
<p
ref={cardRef}
className="font-Nunito text-xl h-[90%] w-[85%] overflow-auto p-1 text-justify"
>
{content}
<br />
<br />
Expand Down
2 changes: 1 addition & 1 deletion src/components/AuthLayout/form.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,6 @@ div.formInput {

@media screen and (max-width: 500px) {
.registerFormContainer {
max-width: 80%;
max-width: 95%;
}
}
6 changes: 1 addition & 5 deletions src/components/AuthLayout/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,12 @@ export const SignUp: React.FC<SignupFormProps> = ({ setForm }) => {
</div>
)}
</div>
<div className={styles.formPageNav}>
<div className={styles.formPageNav + ' max-sm:scale-105'}>
{formPage > 1 && (
<Image
className={`${styles.formPageNavArrow} ${styles.formPageNavArrowLeft}`}
src={ArrowSolid}
alt="Navigation Arrow Right"
width={20}
height={20}
onClick={() => setFormPage(formPage - 1)}
/>
)}
Expand All @@ -453,8 +451,6 @@ export const SignUp: React.FC<SignupFormProps> = ({ setForm }) => {
className={styles.formPageNavArrow}
src={ArrowSolid}
alt="Navigation Arrow Right"
width={20}
height={20}
onClick={() => validateFormPage(formPage)}
/>
)}
Expand Down
Loading
Loading