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

Add Gradient Shadow and Effect to Hero Section Image #1675

Closed
wants to merge 1 commit into from
Closed
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
73 changes: 31 additions & 42 deletions components/UI/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Suspense } from "react";
import React from "react";
import Link from "next/link";
import SectionSubtitle from "./SectionSubtitle";
import { Container, Row, Col, Button } from "reactstrap";
import { Container, Row, Col } from "reactstrap";
import { BsDiscord } from "react-icons/bs";
import Image from "next/image";
import heroImg from "../../public/images/PiyushGarg.png";
Expand All @@ -10,11 +10,11 @@ import classNames from "../../styles/subtitle.module.css";

const Hero = () => {
return (
<section className={` ${classes.hero} `}>
<section className={`${classes.hero}`}>
{/* desktop / large screen view */}
<Container id="hero-section " className="md:flex hidden">
<Row>
<Col lg="6" md="6">
<Container id="hero-section" className="md:flex hidden">
<Row className="items-center">
<Col lg="6" md="6" className="pr-8">
<div className={`${classes.hero__content}`}>
<SectionSubtitle subtitle="Hello" />
<h2 className="mt-3 mb-3">I&apos;m Piyush Garg</h2>
Expand All @@ -26,56 +26,53 @@ const Hero = () => {
knowledge and experience with others.
</p>
</div>
<div className="mt-5 flex place-content-center md:block">
<div className="mt-5">
<div className="relative inline-flex group">
<div className="absolute transitiona-all duration-1000 opacity-70 -inset-px bg-gradient-to-r animate-pulse hover:animate-none from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-xl blur-lg group-hover:opacity-100 group-hover:-inset-1 group-hover:duration-200 animate-tilt"></div>
<div className="absolute transition-all duration-1000 opacity-70 -inset-px bg-gradient-to-r animate-pulse hover:animate-none from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-xl blur-lg group-hover:opacity-100 group-hover:-inset-1 group-hover:duration-200 animate-tilt"></div>
<Link
target="_blank"
href="https://discord.gg/kRSRxBQ6xf"
className="relative text-sm sm:text-md md:text-lg text-center items-center justify-center px-8 py-4 font-bold text-white transition-all duration-200 bg-gray-900 font-pj rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
className="relative text-sm sm:text-md md:text-lg text-center items-center justify-center px-8 py-4 font-bold text-white transition-all duration-200 bg-gray-900 font-pj rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
role="button"
>
<span
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
gap: "10px",
}}
className="block"
>
<span className="flex items-center justify-center gap-2">
Join Discord Server <BsDiscord />
</span>
</Link>
</div>
</div>
</Col>
<Col lg="6" md="6">
<div className={`${classes.hero__img} text-end`}>
<Image alt="Piyush Garg" src={heroImg} width="450" height="450" />
<Col lg="6" md="6" className="flex justify-end">
<div className="relative inline-flex group">
<div className="absolute inset-0 transition-all duration-1000 opacity-70 bg-gradient-to-r from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-full blur-lg group-hover:opacity-100 md:opacity-50"></div>
<div className="relative z-10">
<Image alt="Piyush Garg" src={heroImg} width="450" height="450" />
</div>
</div>
</Col>
</Row>
</Container>

{/* mobile / small screen view */}

<Container id="hero-section" className="md:hidden">
<Row>
<Col lg="6" md="6">
<div className={`${classes.hero__content}`}>
<div className="flex flex-col items-center justify-center">
<Col lg="6" md="6">
<div className={`${classes.hero__img} text-end`}>
<Image
alt="Piyush Garg"
src={heroImg}
width="450"
height="450"
/>
<div className="relative inline-flex group text-end">
<div className="absolute inset-0 transition-all duration-1000 opacity-70 bg-gradient-to-r from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-full blur-lg group-hover:opacity-100"></div>
<div className="relative z-10">
<Image
alt="Piyush Garg"
src={heroImg}
width="450"
height="450"
/>
</div>
</div>
</Col>
<h2 className="mt-3 mb-3">
<h2 className="mt-4 mb-3">
<span className={`${classNames.section__subtitle}`}>
Hello !{" "}
</span>
Expand All @@ -92,22 +89,14 @@ const Hero = () => {
</div>
<div className="mt-5 flex flex-col items-center justify-center">
<div className="relative inline-flex group">
<div className="absolute w-full transitiona-all duration-1000 opacity-70 -inset-px bg-gradient-to-r animate-pulse hover:animate-none from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-xl blur-lg group-hover:opacity-100 group-hover:-inset-1 group-hover:duration-200 animate-tilt"></div>
<div className="absolute w-full transition-all duration-1000 opacity-70 -inset-px bg-gradient-to-r animate-pulse hover:animate-none from-[#44BCFF] via-[#FF44EC] to-[#FF675E] rounded-xl blur-lg group-hover:opacity-100 group-hover:-inset-1 group-hover:duration-200 animate-tilt"></div>
<Link
target="_blank"
href="https://discord.gg/kRSRxBQ6xf"
className="relative w-full text-sm sm:text-md md:text-lg text-center items-center justify-center px-8 py-4 font-bold text-white transition-all duration-200 bg-gray-900 font-pj rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
className="relative w-full text-sm sm:text-md md:text-lg text-center items-center justify-center px-8 py-4 font-bold text-white transition-all duration-200 bg-gray-900 font-pj rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900"
role="button"
>
<span
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
gap: "10px",
}}
className="block"
>
<span className="flex items-center justify-center gap-2">
Join Discord Server <BsDiscord />
</span>
</Link>
Expand All @@ -120,4 +109,4 @@ const Hero = () => {
);
};

export default Hero;
export default Hero;
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
"google-spreadsheet": "^3.3.0",
"googleapis": "^110.0.0",
"mongodb": "^4.13.0",
"next": "^13.1.1",
"next": "^13.5.6",
"next-auth": "^4.18.10",
"react": "18.2.0",
"react-browser-ui": "^1.3.5",
"react": "^18.3.1",
"react-device-detect": "^2.2.2",
"react-dom": "18.2.0",
"react-dom": "^18.3.1",
"react-icons": "^4.9.0",
"react-loader-spinner": "^5.3.4",
"react-slick": "^0.29.0",
Expand Down
Loading
Loading