generated from nhcarrigan/template
chore: end position at streamcord (#58)
### Explanation _No response_ ### Issue _No response_ ### Attestations - [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [ ] I have pinned the dependencies to a specific patch version. ### Style - [ ] I have run the linter and resolved any errors. - [ ] My pull request uses an appropriate title, matching the conventional commit standards. - [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning _No response_ Reviewed-on: https://codeberg.org/nhcarrigan/portfolio/pulls/58 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
parent
6652319941
commit
bcfa49cd67
@ -8,7 +8,8 @@ import React, { type JSX } from "react";
|
|||||||
import { NavItems } from "../config/NavItems";
|
import { NavItems } from "../config/NavItems";
|
||||||
|
|
||||||
const generateRandomColor = (): string => {
|
const generateRandomColor = (): string => {
|
||||||
return `#${Math.floor(Math.random() * 16_777_215).toString(16).
|
return `#${Math.floor(Math.random() * 16_777_215).
|
||||||
|
toString(16).
|
||||||
padStart(6, "0")}`;
|
padStart(6, "0")}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -31,29 +32,31 @@ const getLuminance = (hexColor: string): number => {
|
|||||||
return rl + gl + bl;
|
return rl + gl + bl;
|
||||||
};
|
};
|
||||||
|
|
||||||
const adjustColorLuminosity
|
const adjustColorLuminosity = (
|
||||||
= (hexColor: string, luminosityChange: number): string => {
|
hexColor: string,
|
||||||
let r = Number.parseInt(hexColor.slice(1, 3), 16);
|
luminosityChange: number,
|
||||||
let g = Number.parseInt(hexColor.slice(3, 5), 16);
|
): string => {
|
||||||
let b = Number.parseInt(hexColor.slice(5, 7), 16);
|
let r = Number.parseInt(hexColor.slice(1, 3), 16);
|
||||||
r = Math.round(r * luminosityChange);
|
let g = Number.parseInt(hexColor.slice(3, 5), 16);
|
||||||
g = Math.round(g * luminosityChange);
|
let b = Number.parseInt(hexColor.slice(5, 7), 16);
|
||||||
b = Math.round(b * luminosityChange);
|
r = Math.round(r * luminosityChange);
|
||||||
r = Math.min(255, Math.max(0, r));
|
g = Math.round(g * luminosityChange);
|
||||||
g = Math.min(255, Math.max(0, g));
|
b = Math.round(b * luminosityChange);
|
||||||
b = Math.min(255, Math.max(0, b));
|
r = Math.min(255, Math.max(0, r));
|
||||||
return `#${
|
g = Math.min(255, Math.max(0, g));
|
||||||
r.toString(16).padStart(2, "0")
|
b = Math.min(255, Math.max(0, b));
|
||||||
}${g.toString(16).padStart(2, "0")
|
return `#${r.toString(16).padStart(2, "0")}${g.
|
||||||
}${b.toString(16).padStart(2, "0")}`;
|
toString(16).
|
||||||
};
|
padStart(2, "0")}${b.toString(16).padStart(2, "0")}`;
|
||||||
|
};
|
||||||
|
|
||||||
const generateColorPair = (): { background: string; color: string } => {
|
const generateColorPair = (): { background: string; color: string } => {
|
||||||
const backgroundColor = generateRandomColor();
|
const backgroundColor = generateRandomColor();
|
||||||
const backgroundLuminance = getLuminance(backgroundColor);
|
const backgroundLuminance = getLuminance(backgroundColor);
|
||||||
const textColor = backgroundLuminance > 0.5
|
const textColor
|
||||||
? adjustColorLuminosity(backgroundColor, 0)
|
= backgroundLuminance > 0.5
|
||||||
: adjustColorLuminosity(backgroundColor, 5);
|
? adjustColorLuminosity(backgroundColor, 0)
|
||||||
|
: adjustColorLuminosity(backgroundColor, 5);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
background: backgroundColor,
|
background: backgroundColor,
|
||||||
@ -85,13 +88,11 @@ const Home = (): JSX.Element => {
|
|||||||
items-center border-solid border-2 rounded-3xl h-14 p-8 my-4"
|
items-center border-solid border-2 rounded-3xl h-14 p-8 my-4"
|
||||||
href={item.href}
|
href={item.href}
|
||||||
key={item.href}
|
key={item.href}
|
||||||
rel="noreferrer"
|
|
||||||
style={{
|
style={{
|
||||||
background: background,
|
background: background,
|
||||||
borderColor: color,
|
borderColor: color,
|
||||||
color: color,
|
color: color,
|
||||||
}}
|
}}
|
||||||
target="_blank"
|
|
||||||
>
|
>
|
||||||
{index % 2 === 1
|
{index % 2 === 1
|
||||||
? "🩷"
|
? "🩷"
|
||||||
|
@ -54,7 +54,7 @@ const Work = (): JSX.Element => {
|
|||||||
<td>
|
<td>
|
||||||
<FontAwesomeIcon className="h-14" icon={Volunteer} />
|
<FontAwesomeIcon className="h-14" icon={Volunteer} />
|
||||||
</td>
|
</td>
|
||||||
<td>{`Planned`}</td>
|
<td>{`Pro-bono Contract`}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -175,4 +175,10 @@ export const Games: Array<{
|
|||||||
name: "Monster Hunter: World",
|
name: "Monster Hunter: World",
|
||||||
url: "https://store.steampowered.com/app/582010/Monster_Hunter_World/",
|
url: "https://store.steampowered.com/app/582010/Monster_Hunter_World/",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
alt: "A 3D character model showing a female figure wearing a bright neon green futuristic bodysuit with black armored accents and panels. The suit features geometric patterns and protective plating across the torso, limbs, and joints. The character has brown hair styled with side-swept bangs and stands in a neutral pose against a dark background. Text at the top of the image reads \"Origin: Human\" and \"Naomi\".",
|
||||||
|
img: "empyrion.jpg",
|
||||||
|
name: "Empyrion: Galactic Survival",
|
||||||
|
url: "https://store.steampowered.com/app/383120/Empyrion__Galactic_Survival/",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
@ -402,7 +402,7 @@ Additionally, I guided and mentored other developers in the design and coding of
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>`,
|
</div>`,
|
||||||
end: null,
|
end: new Date("December 5 2024"),
|
||||||
link: "https://streamcord.io",
|
link: "https://streamcord.io",
|
||||||
logo: "streamcord.jpeg",
|
logo: "streamcord.jpeg",
|
||||||
start: new Date("August 5 2021"),
|
start: new Date("August 5 2021"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user