diff --git a/README.md b/README.md index 6986a58..0086e2c 100644 --- a/README.md +++ b/README.md @@ -33,69 +33,69 @@ Simple Links is a lightweight alternative to Linktree and others. ```json { - "name": "Your Name", // The name you want to display on the site - "description": "A description about yourself", // The description you want to use - "avatar": "https://cdn.fascinated.cc/KWprz2.jpg", // The avatar that is shown at the top of the site - "background": { - // If you want to use a custom (not dark) background - "showBackground": true, // Whether it is enabled or not - "blur": true, // Should we blur the background? - "darken": { - // Should we darken the background? - "enabled": true, - "amount": 0.7 - }, - "backgroundImage": "https://cdn.fascinated.cc/8twdW8.jpg" // The image to use in the background - }, - "theme": "dark", // "dark" or "light" themes - "infoCard": { - // The card that displays your info and buttons - "transparency": 0.85 // How transparent should it be? - }, - "options": { - // Website options - "showSourceLink": true // Should we show the "Source Code" link - }, - "metadata": { - // Search engine and embedding metadata (discord, twitter, etc embeds) - "title": "Your Name", // The title of the embed - "description": "website description", // The description of the embed - "themeColor": "#6441a5", // The color of the embed - "authors": [ - // SEO metadata - { - "name": "Fascinated", - "url": "https://fascinated.cc" - } - ] - }, - "links": [ - // The buttons to show links for - { - "title": "Git", // The shown title of the button - "url": "https://git.fascinated.cc", // Where the button goes to when clicked - "icon": "fab fa-github", // The icon of the button (can be removed to show no icon) - "color": { - // The color of the icon (tailwindcss colors) - "normal": "bg-green-700" - } - }, - { - "title": "Twitch", - "url": "https://twitch.tv/fascinated_", - "icon": "fab fa-twitch", - "color": { - "normal": "bg-[#6441a5]" - } - }, - { - "title": "Documentation", - "url": "https://docs.fascinated.cc", - "color": { - "normal": "bg-neutral-700" - } - } - ] + "name": "Your Name", // The name you want to display on the site + "description": "A description about yourself", // The description you want to use + "avatar": "https://cdn.fascinated.cc/KWprz2.jpg", // The avatar that is shown at the top of the site + "background": { + // If you want to use a custom (not dark) background + "showBackground": true, // Whether it is enabled or not + "blur": true, // Should we blur the background? + "darken": { + // Should we darken the background? + "enabled": true, + "amount": 0.7 + }, + "backgroundImage": "https://cdn.fascinated.cc/8twdW8.jpg" // The image to use in the background + }, + "theme": "dark", // "dark" or "light" themes + "infoCard": { + // The card that displays your info and buttons + "transparency": 0.85 // How transparent should it be? + }, + "options": { + // Website options + "showSourceLink": true // Should we show the "Source Code" link + }, + "metadata": { + // Search engine and embedding metadata (discord, twitter, etc embeds) + "title": "Your Name", // The title of the embed + "description": "website description", // The description of the embed + "themeColor": "#6441a5", // The color of the embed + "authors": [ + // SEO metadata + { + "name": "Fascinated", + "url": "https://fascinated.cc" + } + ] + }, + "links": [ + // The buttons to show links for + { + "title": "Git", // The shown title of the button + "url": "https://git.fascinated.cc", // Where the button goes to when clicked + "icon": "fab fa-github", // The icon of the button (can be removed to show no icon) + "color": { + // The color of the icon (tailwindcss colors) + "normal": "bg-green-700" + } + }, + { + "title": "Twitch", + "url": "https://twitch.tv/fascinated_", + "icon": "fab fa-twitch", + "color": { + "normal": "bg-[#6441a5]" + } + }, + { + "title": "Documentation", + "url": "https://docs.fascinated.cc", + "color": { + "normal": "bg-neutral-700" + } + } + ] } ``` diff --git a/config.json b/config.json index 6124a05..3d33b06 100644 --- a/config.json +++ b/config.json @@ -1,58 +1,58 @@ { - "configVersion": "0.1.2", - "name": "Your Name", - "description": "A description about yourself", - "avatar": "https://cdn.fascinated.cc/KWprz2.jpg", - "background": { - "showBackground": true, - "blur": true, - "darken": { - "enabled": true, - "amount": 0.7 - }, - "backgroundImage": "https://cdn.fascinated.cc/8twdW8.jpg" - }, - "theme": "dark", - "infoCard": { - "transparency": 0.85 - }, - "options": { - "showSourceLink": true - }, - "metadata": { - "title": "Your Name", - "description": "website description", - "themeColor": "#6441a5", - "authors": [ - { - "name": "Fascinated", - "url": "https://fascinated.cc" - } - ] - }, - "links": [ - { - "title": "Git", - "url": "https://git.fascinated.cc", - "icon": "fab fa-github", - "color": { - "normal": "bg-green-700" - } - }, - { - "title": "Twitch", - "url": "https://twitch.tv/fascinated_", - "icon": "fab fa-twitch", - "color": { - "normal": "bg-[#6441a5]" - } - }, - { - "title": "Documentation", - "url": "https://docs.fascinated.cc", - "color": { - "normal": "bg-neutral-700" - } - } - ] + "configVersion": "0.1.2", + "name": "Your Name", + "description": "A description about yourself", + "avatar": "https://cdn.fascinated.cc/KWprz2.jpg", + "background": { + "showBackground": true, + "blur": true, + "darken": { + "enabled": true, + "amount": 0.7 + }, + "backgroundImage": "https://cdn.fascinated.cc/8twdW8.jpg" + }, + "theme": "dark", + "infoCard": { + "transparency": 0.85 + }, + "options": { + "showSourceLink": true + }, + "metadata": { + "title": "Your Name", + "description": "website description", + "themeColor": "#6441a5", + "authors": [ + { + "name": "Fascinated", + "url": "https://fascinated.cc" + } + ] + }, + "links": [ + { + "title": "Git", + "url": "https://git.fascinated.cc", + "icon": "fab fa-github", + "color": { + "normal": "bg-green-700" + } + }, + { + "title": "Twitch", + "url": "https://twitch.tv/fascinated_", + "icon": "fab fa-twitch", + "color": { + "normal": "bg-[#6441a5]" + } + }, + { + "title": "Documentation", + "url": "https://docs.fascinated.cc", + "color": { + "normal": "bg-neutral-700" + } + } + ] } diff --git a/postcss.config.js b/postcss.config.js index 33ad091..12a703d 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f7b1c2c..b51dfe2 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -11,13 +11,13 @@ const inter = Inter({ subsets: ["latin"] }); export const metadata = Config.metadata; // Site metadata from the config export default function RootLayout({ - children, + children, }: { - children: React.ReactNode; + children: React.ReactNode; }) { - return ( - - {children} - - ); + return ( + + {children} + + ); } diff --git a/src/app/page.tsx b/src/app/page.tsx index ecb9f48..4ee8de8 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,123 +9,123 @@ 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, // Fallback to dark if no theme was found - } = Config; // All of the settings pulled from the config file + const { + background, + infoCard, + avatar, + name, + links, + options, + description, + theme, // 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 - // all used colors are from TailwindCSS - const themeColors: { - [key: string]: { - background: string; - textColor: string; - buttonTextColor: string; - }; - } = { - dark: { - background: "bg-neutral-900", - textColor: "text-white", - buttonTextColor: "text-white", - }, - light: { - background: "bg-white", - textColor: "text-black", - buttonTextColor: "text-white", - }, - }; - const selectedTheme = themeColors[theme]; // The theme to use + // Theme colors to use when using the selected theme + // all used colors are from TailwindCSS + const themeColors: { + [key: string]: { + background: string; + textColor: string; + buttonTextColor: string; + }; + } = { + dark: { + background: "bg-neutral-900", + textColor: "text-white", + buttonTextColor: "text-white", + }, + light: { + background: "bg-white", + textColor: "text-black", + buttonTextColor: "text-white", + }, + }; + const selectedTheme = themeColors[theme]; // The theme to use - return ( - <> -
-
+
+
-
-
-
- Avatar -
-

{name}

-
+ : `url(${background.backgroundImage})`, + backgroundSize: "cover", + backgroundBlendMode: "multiply", + } + : {} + } + >
+
+
+
+ Avatar +
+

{name}

+
-

{description}

+

{description}

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

{link.title}

-
- ); - })} -
-
-
+ > + {link.icon && ( + <> + +
+ + )} +

{link.title}

+ + ); + })} +
+
+
-
- {options.showSourceLink && ( - - Website Source - - )} -
-
- - ); +
+ {options.showSourceLink && ( + + Website Source + + )} +
+ + + ); }