Skip to content
Open
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
21 changes: 13 additions & 8 deletions src/app/components/Contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,37 @@ import {
import { faEnvelope } from "@fortawesome/free-solid-svg-icons"
import "./contact.css"

function BlackIconWrapper({ icon, ...rest }) {
function BlackIconWrapper({ icon, arialabel, ...rest }) {
return (
<IconWrapper
icon={icon}
bgColor='bg-[#264653]'
textColor='text-[#E76F51]'
arialabel={arialabel}
{...rest}
/>
)
}

function RedIconWrapper({ icon, ...rest }) {
function RedIconWrapper({ icon, arialabel, ...rest }) {
return (
<IconWrapper
icon={icon}
bgColor='bg-[#E9C46A]'
textColor='text-[#2A9D8F]'
arialabel={arialabel}
{...rest}
/>
)
}

function IconWrapper({ icon, bgColor, textColor, target, isEmail }) {
function IconWrapper({ icon, bgColor, textColor, target, isEmail, arialabel }) {
return (
<a
href={isEmail ? `mailto:${target}` : target}
className={`w-20 h-20 md:w-14 md:h-14 lg:w-20 lg:h-20 ${bgColor} flex items-center justify-center text-3xl transition-all hover:text-4xl cursor-pointer border border-black`}
target='_blank' // this is need to open in a new tab and not in the same
aria-label={arialabel} // discernible text for screen readers
>
<FontAwesomeIcon icon={icon} className={textColor} />
</a>
Expand Down Expand Up @@ -174,12 +178,13 @@ export default function Contact() {
<BlackIconWrapper
icon={faInstagram}
target='https://www.instagram.com/thecodedose/'
arialabel="This is my Instagram profile"
/>
<RedIconWrapper icon={faXTwitter} target="https://x.com/thecodedose" />
<BlackIconWrapper icon={faYoutube} target="https://www.youtube.com/channel/UCUqYu_GiAzFL4ErDEiK9xbA" />
<RedIconWrapper icon={faLinkedinIn} target="https://www.linkedin.com/in/ihsavru/" />
<BlackIconWrapper icon={faGithub} target="https://github.com/thecodedose" />
<RedIconWrapper icon={faEnvelope} target="urvashi@thecodedose.com" isEmail />
<RedIconWrapper icon={faXTwitter} target="https://x.com/thecodedose" arialabel=" This is my X profile" />
<BlackIconWrapper icon={faYoutube} target="https://www.youtube.com/channel/UCUqYu_GiAzFL4ErDEiK9xbA" arialabel="this is my Youtube channel" />
<RedIconWrapper icon={faLinkedinIn} target="https://www.linkedin.com/in/ihsavru/" arialabel="Linkedin" />
<BlackIconWrapper icon={faGithub} target="https://github.com/thecodedose" arialabel="this is my Github profile" />
<RedIconWrapper icon={faEnvelope} target="urvashi@thecodedose.com" isEmail arialabel="this is my email"/>
</div>
</>
)
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/HomeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ export default function HomeGrid({ setCurrentGrid, animatedStyles }) {
style={trails[0]}
className='h-full w-full p-10 bg-[#e9c46a] border border-black flex flex-col items-center justify-center gap-3'
>
<div className='border border-neutral-900 bg-[#264653] w-fit px-5 py-3'>
<div className='border border-neutral-900 bg-[#264653] text-[#e9c46a] w-fit px-5 py-3'>
<span className='text-5xl font-bold' id='home'>
{name.slice(0, nameIdx).join("")}
<span className='inline-block mx-2 w-6 h-1 bg-[#2A9D8F] animate-pulse'></span>
</span>
</div>
<div className='border text-center border-neutral-900 bg-[#264653] w-fit px-5 py-2'>
<div className='border text-center border-neutral-900 bg-[#264653] text-[#e9c46a] w-fit px-5 py-2'>
<span className='md:text-md'>
{subheading.slice(0, subheadingIdx).join("")}
<span className='inline-block w-3 h-0.5 mx-1 bg-[#2A9D8F] animate-pulse'></span>
Expand Down