-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da1fb2d
commit 23d0b72
Showing
7 changed files
with
106 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Allow: / |
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,9 +1,28 @@ | ||
import { Component, JSX } from "solid-js"; | ||
import { JSX } from "solid-js"; | ||
|
||
type LinkProps<P = {}> = P & { children?: JSX.Element, url: string, secure?: boolean }; | ||
type LinkComponent<P = {}> = Component<LinkProps<P>>; | ||
interface LinkProps { | ||
children: JSX.Element, | ||
url: string, | ||
class?: string, | ||
secure?: boolean, | ||
noReferrer?: boolean, | ||
} | ||
|
||
export const Link: LinkComponent = (props: LinkProps) => { | ||
let rel = props.secure ? "noopener noreferrer" : "noopener"; | ||
return <a href={props.url} rel={rel} class="transition-colors text-pink-100 hover:text-pink-200">{props.children}</a>; | ||
} | ||
export function Link(props: LinkProps): JSX.Element { | ||
let rel = props.secure | ||
? "noopener noreferrer" | ||
: "noopener"; | ||
let referrer: JSX.HTMLReferrerPolicy = props.noReferrer | ||
? "no-referrer" | ||
: "strict-origin" | ||
|
||
return <> | ||
<a href={props.url} | ||
rel={rel} | ||
referrerpolicy={referrer} | ||
class={`transition-colors text-pink-100 hover:text-pink-200 | ||
underline underline-offset-2 hover:underline hover:decoration-pink-300 ${props.class ?? ""}`}> | ||
{props.children} | ||
</a> | ||
</>; | ||
} |
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,40 @@ | ||
import { For, JSX } from "solid-js"; | ||
import { Link } from "./Link"; | ||
import { BLOG_URL, GITHUB_PROFILE_URL } from "./constants"; | ||
import { ImBlog } from "solid-icons/im"; | ||
import { OcMarkgithub2 } from "solid-icons/oc"; | ||
|
||
const SOCIALS = [ | ||
{ | ||
name: "GitHub", | ||
url: GITHUB_PROFILE_URL, | ||
icon: () => <OcMarkgithub2 size={32} color="#FFFFFF"/>, | ||
}, | ||
{ | ||
name: "Blog", | ||
url: BLOG_URL, | ||
icon: () => <ImBlog size={32} color="#FFFFFF"/>, | ||
} | ||
] | ||
|
||
function SocialsItem(props: (typeof SOCIALS)[0]): JSX.Element { | ||
return <> | ||
<Link secure url={props.url}> | ||
<div class="group flex space-x-3 text-lg hover-offset"> | ||
{props.icon()} | ||
<p class="pt-1 text-pink-100 no-underline group-hover:underline group-hover:text-pink-300">{props.name}</p> | ||
</div> | ||
</Link> | ||
</>; | ||
} | ||
|
||
export function Socials(): JSX.Element { | ||
return <> | ||
<div class="flex flex-col justify-center space-y-5 items-start | ||
border-l-[0.5px] border-white border-opacity-30 pl-10"> | ||
<For each={SOCIALS}> | ||
{(item) => SocialsItem(item)} | ||
</For> | ||
</div> | ||
</>; | ||
} |
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,2 +1,2 @@ | ||
/** My current GitHub profile. */ | ||
export const GITHUB: string = "https://github.com/rushiiMachine"; | ||
export const GITHUB_PROFILE_URL: string = "https://github.com/rushiiMachine"; | ||
export const BLOG_URL: string = "https://rushii.materii.dev" |
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