Skip to content

Commit

Permalink
Merge pull request #45 from Arkapravo-Ghosh/main
Browse files Browse the repository at this point in the history
[FIX]: Fixed text selection issue with section headers
  • Loading branch information
tamalCodes authored Jan 7, 2024
2 parents 3e77bf7 + f937740 commit 0f0beb5
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/components/faq/FAQ.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Faq = ({ refs }) => {
return (
<div className="faq" ref={refs}>
<div className="faq__content">
<div className="faq__header">
<div className="faq__header disable-select">
<h1>FAQ</h1>
<h2>Questions</h2>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/components/footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ const Footer = () => {
<div
className="foooter__backtotop"
onClick={() => {
window.scrollTo(0, 0);
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}}
>
<p>Back to top</p>
Expand Down
20 changes: 17 additions & 3 deletions src/components/mentors/Mentors.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
import React from "react";
import React, { useState, useEffect } from "react";
import Marquee from "react-fast-marquee";
import { FaLinkedinIn, FaXTwitter } from "react-icons/fa6";
import { mentorContent } from "../../assets/data/MentorsContent";
import "./Mentors.scss";

function Mentors({ refs }) {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => {
setWindowWidth(window.innerWidth);
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<section className="mentors__parent" ref={refs}>
<div className="mentors__header">
<div className="mentors__header disable-select">
<h1>Experts</h1>
<h2>{window.innerWidth > 700 ? "Previous" : "Past"} Mentors</h2>
<h2>{windowWidth > 700 ? "Previous" : "Past"} Mentors</h2>
</div>

<div className="mentors__container mentors__container_desktop">
Expand Down
20 changes: 17 additions & 3 deletions src/components/prizes/Prizes.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useState, useEffect } from "react";
// import white from "../../assets/images/LandingImages/blob_right.png";

// import FirstPrize from "../../assets/images/PrizesImages/FirstPrize.png";
Expand All @@ -11,12 +11,26 @@ import ComingSoon from "../comingsoon/ComingSoon";
import "./Prizes.scss";

const Prizes = ({ refs }) => {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => {
setWindowWidth(window.innerWidth);
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<>
<div className="prizes__parent" ref={refs}>
<div className="prizes__header">
<div className="prizes__header disable-select">
<h1>Awards</h1>
<h2>{window.innerWidth > 700 && "Hackathon"} Prizes</h2>
<h2>{windowWidth > 700 && "Hackathon"} Prizes</h2>
</div>
{/* <img src={red} alt="" className="red__blob" /> */}
{/* <img src={white} alt="" className="white__blob" /> */}
Expand Down
20 changes: 17 additions & 3 deletions src/components/sponsors/Sponsors.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
import React from "react";
import React, { useState, useEffect } from "react";
import sponsors from "../../assets/data/SponsorsContent";
import SingleSponsors from "../singlesponsors/SingleSponsors";
import "./Sponsors.scss";

const Sponsors = ({ refs }) => {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => {
setWindowWidth(window.innerWidth);
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<>
<div className="sponsors__parent" ref={refs}>
<div className="sponsors__header">
<h1>{window.innerWidth > 700 ? "Supporters" : "Backers"}</h1>
<div className="sponsors__header disable-select">
<h1>{windowWidth > 700 ? "Supporters" : "Backers"}</h1>
<h2>Past Sponsors</h2>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/testimonials/Testimonials.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "./Testimonials.scss";
const Testimonials = ({ refs }) => {
return (
<div className="testimonials__parent" ref={refs}>
<div className="testimonials__header">
<div className="testimonials__header disable-select">
<h1>Stories</h1>
<h2>Testimonials</h2>
</div>
Expand Down
20 changes: 17 additions & 3 deletions src/components/themes/Theme.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
import React from "react";
import React, { useState, useEffect } from "react";
import ComingSoon from "../comingsoon/ComingSoon";
import "./Theme.scss";

const Theme = ({ refs }) => {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => {
setWindowWidth(window.innerWidth);
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<>
<div className="theme__parent" ref={refs}>
<div className="theme__header">
<div className="theme__header disable-select">
<h1>Tracks</h1>
<h2>{window.innerWidth > 700 && "Hackathon"} Themes</h2>
<h2>{windowWidth > 700 && "Hackathon"} Themes</h2>
</div>

<ComingSoon />
Expand Down
22 changes: 18 additions & 4 deletions src/components/timeline/Timeline.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
import React from "react";
import React, { useState, useEffect } from "react";
import ComingSoon from "../comingsoon/ComingSoon";
import "./Timeline.scss";

const Timeline = ({ refs }) => {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => {
setWindowWidth(window.innerWidth);
};

window.addEventListener("resize", handleResize);

return () => {
window.removeEventListener("resize", handleResize);
};
}, []);

return (
<>
<div className="timeline__parent" ref={refs}>
<div className="timeline__header">
<h1>{window.innerWidth > 700 ? "Roadmap" : "Plan"}</h1>
<h2>{window.innerWidth > 700 && "Hackathon"} Timeline</h2>
<div className="timeline__header disable-select">
<h1>{windowWidth > 700 ? "Roadmap" : "Plan"}</h1>
<h2>{windowWidth > 700 && "Hackathon"} Timeline</h2>
</div>

<ComingSoon />
Expand Down

0 comments on commit 0f0beb5

Please sign in to comment.