Skip to content

Commit

Permalink
Fixed : Too much spacing acm-uic#199
Browse files Browse the repository at this point in the history
  • Loading branch information
MishraTanishq619 committed Oct 1, 2023
1 parent c5c8b71 commit 068be0c
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 84 deletions.
68 changes: 44 additions & 24 deletions src/components/DesktopNewsletter/index.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
import PrimaryButton from "../PrimaryButton";

export default function DesktopNewsletter() {
let email = ""
function newslettersignup(email) {
if (email != ""){
fetch(`https://n8n.christianbingman.com/webhook/sparkhacks-newsletter?email=${email}`)
.then((res) => res.json())
.then(() => alert(`You have been signed up!`))
.catch(() => alert('There was an error signing you up, please reach out to [email protected]'))
}
}
return(
<div className="grid h-screen bg-primary place-items-center">
<div className="relative h-full w-full items-center justify-center inline-flex">
{/* <div className="relative h-4/6 w-1/2 bg-primary-dark rounded-[2.813rem] bottom-10 right-10"/> */}
<div className="absolute h-fit w-1/2 px-7 py-10 drop-shadow-[-90px_-60px_4px_rgba(0,0,0,0.5)] bg-secondary-light rounded-[2.813rem]">
<h1> Join Our Newsletter!</h1>
<p className="text-[#757575] py-2"> Want to get updates as fast as possible! Join our newsletter! We will send details about the event with sign up and RSVP forms as we get closer to the start date! We will also send insights into what types of events we are planning, and much more! Sign up to make sure you get the latest as soon as possible! </p>
<div className="grid grid-flow-col w-full gap-x-2">
<input type="text" onChange={evt => email = evt.target.value} placeholder="Email:" />
<span onClick={() => newslettersignup(email)}><PrimaryButton innerText="Submit" /></span>
</div>
</div>
</div>
</div>
)
let email = "";
function newslettersignup(email) {
if (email != "") {
fetch(
`https://n8n.christianbingman.com/webhook/sparkhacks-newsletter?email=${email}`
)
.then((res) => res.json())
.then(() => alert(`You have been signed up!`))
.catch(() =>
alert(
"There was an error signing you up, please reach out to [email protected]"
)
);
}
}
return (
<div className="grid h-[40rem] bg-primary place-items-center">
<div className="relative h-full w-full items-center justify-center inline-flex">
{/* <div className="relative h-4/6 w-1/2 bg-primary-dark rounded-[2.813rem] bottom-10 right-10"/> */}
<div className="absolute h-fit w-1/2 px-7 py-10 drop-shadow-[-90px_-60px_4px_rgba(0,0,0,0.5)] bg-secondary-light rounded-[2.813rem]">
<h1> Join Our Newsletter!</h1>
<p className="text-[#757575] py-2">
{" "}
Want to get updates as fast as possible! Join our
newsletter! We will send details about the event with
sign up and RSVP forms as we get closer to the start
date! We will also send insights into what types of
events we are planning, and much more! Sign up to make
sure you get the latest as soon as possible!{" "}
</p>
<div className="grid grid-flow-col w-full gap-x-2">
<input
type="text"
onChange={(evt) => (email = evt.target.value)}
placeholder="Email:"
/>
<span onClick={() => newslettersignup(email)}>
<PrimaryButton innerText="Submit" />
</span>
</div>
</div>
</div>
</div>
);
}
48 changes: 27 additions & 21 deletions src/components/DesktopSMBubbles/index.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
import { FacebookSMBubble, InstagramSMBubble, LinkedinSMBubble, TwitterSMBubble, YoutubeSMBubble } from "../SocialMediaBubbles";
import {
FacebookSMBubble,
InstagramSMBubble,
LinkedinSMBubble,
TwitterSMBubble,
YoutubeSMBubble,
} from "../SocialMediaBubbles";

export default function DesktopSMBubbles({links}) {
console.log(links)
return(
<div className="grid h-screen place-items-center">
<div className="relative items-center justify-center inline-flex w-7/12" >
<div className="relative items-center justify-center inline-flex z-0">
<InstagramSMBubble link = {links.Instagram} />
<div className="relative items-center justify-center inline-flex w-5/12 z-10">
<LinkedinSMBubble link = {links.LinkedIn}/>
<div className="relative items-center justify-center inline-flex w-3/12 z-20">
<YoutubeSMBubble link = {links.YouTube}/>
</div>
<TwitterSMBubble link = {links.Twitter}/>
</div>
<FacebookSMBubble link = {links.Facebook}/>
</div>
</div>
</div>
);
}
export default function DesktopSMBubbles({ links }) {
console.log(links);
return (
<div className="grid h-[40rem] place-items-center">
<div className="relative items-center justify-center inline-flex w-7/12">
<div className="relative items-center justify-center inline-flex z-0">
<InstagramSMBubble link={links.Instagram} />
<div className="relative items-center justify-center inline-flex w-5/12 z-10">
<LinkedinSMBubble link={links.LinkedIn} />
<div className="relative items-center justify-center inline-flex w-3/12 z-20">
<YoutubeSMBubble link={links.YouTube} />
</div>
<TwitterSMBubble link={links.Twitter} />
</div>
<FacebookSMBubble link={links.Facebook} />
</div>
</div>
</div>
);
}
51 changes: 25 additions & 26 deletions src/components/MobileSMBubbles/index.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@

import {
FacebookSMBubble,
InstagramSMBubble,
LinkedinSMBubble,
TwitterSMBubble,
YoutubeSMBubble,
FacebookSMBubble,
InstagramSMBubble,
LinkedinSMBubble,
TwitterSMBubble,
YoutubeSMBubble,
} from "../SocialMediaBubbles";

export default function MobileSMBubbles({links}) {
return (
<div className="flex flex-col -space-y-16 ">
<div className=" items-center justify-center inline-flex z-0">
<InstagramSMBubble link = {links.Instagram} />
</div>
<div className=" items-center justify-center inline-flex z-10">
<LinkedinSMBubble link = {links.LinkedIn} />
</div>
<div className=" items-center justify-center inline-flex z-20">
<YoutubeSMBubble link = {links.YouTube} />
</div>
<div className=" items-center justify-center inline-flex z-30">
<TwitterSMBubble link = {links.Twitter} />
</div>
<div className=" items-center justify-center inline-flex z-40">
<FacebookSMBubble link = {links.Facebook}/>
</div>
</div>
);
export default function MobileSMBubbles({ links }) {
return (
<div className="flex flex-col -space-y-16 py-5">
<div className=" items-center justify-center inline-flex z-0">
<InstagramSMBubble link={links.Instagram} />
</div>
<div className=" items-center justify-center inline-flex z-10">
<LinkedinSMBubble link={links.LinkedIn} />
</div>
<div className=" items-center justify-center inline-flex z-20">
<YoutubeSMBubble link={links.YouTube} />
</div>
<div className=" items-center justify-center inline-flex z-30">
<TwitterSMBubble link={links.Twitter} />
</div>
<div className=" items-center justify-center inline-flex z-40">
<FacebookSMBubble link={links.Facebook} />
</div>
</div>
);
}
26 changes: 13 additions & 13 deletions src/pages/social.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import "./social.css";
import DesktopSMBubbles from "../components/DesktopSMBubbles";
import DesktopNewsletter from "../components/DesktopNewsletter";
import MobileSMBubbles from "../components/MobileSMBubbles";
import MobileNewsletter from "../components/MobileNewsletter"
import MobileNewsletter from "../components/MobileNewsletter";

import SocialLinks from "../api/SocialMediaLinks";

export default function Social() {
return (
<div>
<div className="hidden lg:block">
<DesktopNewsletter />
<DesktopSMBubbles links={SocialLinks} />
</div>
<div className="lg:hidden">
<MobileNewsletter />
<MobileSMBubbles links={SocialLinks} />
</div>
</div>
);
return (
<div>
<div className="hidden lg:block">
<DesktopSMBubbles links={SocialLinks} />
<DesktopNewsletter />
</div>
<div className="lg:hidden">
<MobileSMBubbles links={SocialLinks} />
<MobileNewsletter />
</div>
</div>
);
}

0 comments on commit 068be0c

Please sign in to comment.