-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): add contact section to the home page (#77)
- Loading branch information
Showing
14 changed files
with
301 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useState, useEffect } from 'react'; | ||
|
||
// if you wish to update this, please update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"use client"; | ||
|
||
import { | ||
createContext, | ||
useState, | ||
type Dispatch, | ||
type SetStateAction, | ||
type ReactNode, | ||
type FC, | ||
} from "react"; | ||
|
||
export type AreSocialsOpenContextProps = { | ||
areSocialsOpen: boolean; | ||
setAreSocialsOpen: Dispatch<SetStateAction<boolean>>; | ||
}; | ||
|
||
export const AreSocialsOpenContext = createContext<AreSocialsOpenContextProps>({ | ||
areSocialsOpen: false, | ||
setAreSocialsOpen: () => { | ||
console.log("AreSocialsOpenContext needs to be initialized before usage!"); | ||
}, | ||
}); | ||
|
||
export type AreSocialsOpenProviderProps = { | ||
children: ReactNode; | ||
}; | ||
|
||
export const AreSocialsOpenProvider: FC<AreSocialsOpenProviderProps> = ({ children }) => { | ||
const [areSocialsOpen, setAreSocialsOpen] = useState(false); | ||
|
||
return ( | ||
<AreSocialsOpenContext.Provider value={{ areSocialsOpen, setAreSocialsOpen }}> | ||
{children} | ||
</AreSocialsOpenContext.Provider> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export * from "./trpc_provider"; | ||
export * from "./session_provider_wrapper"; | ||
export * from "./is_not_found_provider"; | ||
export * from "./are_socials_open_provider"; | ||
|
||
import type { ReactNode, FC } from "react"; | ||
import { TRPCProvider } from "./trpc_provider"; | ||
import { SessionProviderWrapper } from "./session_provider_wrapper"; | ||
import { IsNotFoundProvider } from "./is_not_found_provider"; | ||
import { AreSocialsOpenProvider } from "./are_socials_open_provider"; | ||
|
||
export type ProvidersProps = { | ||
children: ReactNode; | ||
}; | ||
|
||
export const Providers: FC<ProvidersProps> = ({ children }) => ( | ||
<TRPCProvider> | ||
<SessionProviderWrapper> | ||
<IsNotFoundProvider> | ||
<AreSocialsOpenProvider> | ||
{children} | ||
</AreSocialsOpenProvider> | ||
</IsNotFoundProvider> | ||
</SessionProviderWrapper> | ||
</TRPCProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
export type account = { | ||
siteName: string; | ||
href: string; | ||
hrefText: string; | ||
}; | ||
|
||
export const accounts: account[] = [ | ||
{ | ||
siteName: "mail", | ||
href: "mailto:[email protected]", | ||
hrefText: "[email protected]", | ||
}, | ||
{ | ||
siteName: "twitch", | ||
href: "https://twitch.tv/khenziii", | ||
hrefText: "twitch.tv/khenziii", | ||
}, | ||
{ | ||
siteName: "reddit", | ||
href: "https://reddit.com/u/khenziii", | ||
hrefText: "reddit.com/u/khenziii", | ||
}, | ||
{ | ||
siteName: "wikipedia", | ||
href: "https://wikipedia.org/wiki/user:khenziii", | ||
hrefText: "wikipedia.org/wiki/user:khenziii", | ||
}, | ||
{ | ||
siteName: "soundcloud", | ||
href: "https://soundcloud.com/khenzii", | ||
hrefText: "soundcloud.com/khenzii", | ||
}, | ||
{ | ||
siteName: "letterboxd", | ||
href: "https://letterboxd.com/khenzii", | ||
hrefText: "letterboxd.com/khenzii", | ||
}, | ||
{ | ||
siteName: "pinterest", | ||
href: "https://pinterest.com/khenziii", | ||
hrefText: "pinterest.com/khenziii", | ||
}, | ||
{ | ||
siteName: "monkeytype", | ||
href: "https://monkeytype.com/profile/khenzii", | ||
hrefText: "monkeytype.com/profile/khenzii", | ||
}, | ||
{ | ||
siteName: "lichess", | ||
href: "https://lichess.org/@/khenzii", | ||
hrefText: "lichess.org/@/khenzii", | ||
}, | ||
{ | ||
siteName: "imgur", | ||
href: "https://imgur.com/user/khenzii", | ||
hrefText: "imgur.com/user/khenzii", | ||
}, | ||
{ | ||
siteName: "itch.io", | ||
href: "https://khenzii.itch.io", | ||
hrefText: "khenzii.itch.io", | ||
}, | ||
{ | ||
siteName: "leetcode", | ||
href: "https://leetcode.com/u/khenzii", | ||
hrefText: "leetcode.com/u/khenzii", | ||
}, | ||
{ | ||
siteName: "docker hub", | ||
href: "https://hub.docker.com/u/khenzii", | ||
hrefText: "hub.docker.com/u/khenzii", | ||
}, | ||
{ | ||
siteName: "stackoverflow", | ||
href: "https://stackoverflow.com/users/22290899/khenzii", | ||
hrefText: "stackoverflow.com/users/22290899/khenzii", | ||
}, | ||
{ | ||
siteName: "archive", | ||
href: "https://archive.org/details/@khenzii", | ||
hrefText: "archive.org/details/@khenzii", | ||
}, | ||
{ | ||
siteName: "npm", | ||
href: "https://npmjs.com/~khenzii", | ||
hrefText: "npmjs.com/~khenzii", | ||
}, | ||
{ | ||
siteName: "gitlab", | ||
href: "https://gitlab.com/khenzii", | ||
hrefText: "gitlab.com/khenzii", | ||
}, | ||
{ | ||
siteName: "codeberg", | ||
href: "https://codeberg.org/khenzii", | ||
hrefText: "codeberg.org/khenzii", | ||
}, | ||
{ | ||
siteName: "nixos discourse", | ||
href: "https://discourse.nixos.org/u/khenzii", | ||
hrefText: "discourse.nixos.org/u/khenzii", | ||
}, | ||
{ | ||
siteName: "rust discourse", | ||
href: "https://users.rust-lang.org/u/khenzii", | ||
hrefText: "users.rust-lang.org/u/khenzii", | ||
}, | ||
{ | ||
siteName: "wikidot", | ||
href: "https://wikidot.com/user:info/khenzii", | ||
hrefText: "wikidot.com/user:info/khenzii", | ||
}, | ||
{ | ||
siteName: "typeracer", | ||
href: "https://data.typeracer.com/pit/profile?user=khenzii", | ||
hrefText: "data.typeracer.com/pit/profile?user=khenzii", | ||
}, | ||
{ | ||
siteName: "replit", | ||
href: "https://replit.com/@khenzii", | ||
hrefText: "replit.com/@khenzii", | ||
}, | ||
{ | ||
siteName: "medal", | ||
href: "https://medal.tv/u/khenzii", | ||
hrefText: "medal.tv/u/khenzii", | ||
}, | ||
{ | ||
siteName: "opencollective", | ||
href: "https://opencollective.com/khenzii", | ||
hrefText: "opencollective.com/khenzii", | ||
}, | ||
{ | ||
siteName: "pastebin", | ||
href: "https://pastebin.com/u/khenziii", | ||
hrefText: "pastebin.com/u/khenziii", | ||
}, | ||
{ | ||
siteName: "sketchfab", | ||
href: "https://sketchfab.com/khenzii", | ||
hrefText: "sketchfab.com/khenzii", | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@import "../../../styles/constants.scss"; | ||
|
||
.span { | ||
cursor: pointer; | ||
text-decoration: underline; | ||
|
||
&:hover { | ||
color: $textDarkened; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export * from "./accounts"; | ||
|
||
import { type FC, useContext } from "react"; | ||
import { AreSocialsOpenContext } from "@khenzii-dev/providers"; | ||
import { useMobile } from "@khenzii-dev/hooks"; | ||
import { | ||
Flex, | ||
Header, | ||
Paragraph, | ||
} from "@khenzii-dev/ui/atoms"; | ||
import style from "./index.module.scss"; | ||
|
||
export type ContactProps = { | ||
openDialog: () => void; | ||
}; | ||
|
||
export const Contact: FC<ContactProps> = ({ openDialog }) => { | ||
const { setAreSocialsOpen } = useContext(AreSocialsOpenContext); | ||
const mobile = useMobile(); | ||
|
||
return ( | ||
<Flex direction={"column"} align={"flex-start"}> | ||
<Header fontSize={mobile ? 1.75 : 2}>Contact</Header> | ||
|
||
<Paragraph fontSize={1.25} styles={{ width: "fit-content" }}> | ||
{"If you want to contact me, I'm the most likely to give a quick response "} | ||
<span onClick={() => setAreSocialsOpen(true)} className={style.span}>{"here"}</span> | ||
{", I use those platforms the most."} | ||
</Paragraph> | ||
|
||
<Paragraph fontSize={1.25}> | ||
{"However, you can also find me on "} | ||
<span onClick={openDialog} className={style.span}>{"various sites"}</span> | ||
{" all over the web!"} | ||
</Paragraph> | ||
</Flex> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.