import { library } from "@fortawesome/fontawesome-svg-core"; import { fab } from "@fortawesome/free-brands-svg-icons"; import { far } from "@fortawesome/free-regular-svg-icons"; import { fas } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Image from "next/image"; import Config from "../../config.json"; library.add(fab, far, fas); // Loading in the icons from FontAwesome export default function Home() { const { background, infoCard, avatar, name, links, options, description, theme = "dark", // Fallback to dark if no theme was found } = Config; // All of the settings pulled from the config file // Theme colors to use when using the selected theme const themeColors: { [key: string]: { background: string; textColor: string; }; } = { dark: { background: "bg-neutral-900", textColor: "text-white", }, light: { background: "bg-white", textColor: "text-black", }, }; const selectedTheme = themeColors[theme]; // The theme to use return ( <>
Avatar

{name}

{description}

{links.map((link, index) => { const icons: any = link.icon?.split(" ") ?? []; return ( {link.icon && ( <>
)}

{link.title}

); })}
{options.showSourceLink && (

Website Source

)}
); }