aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorPauline <git@ethanlibs.co>2023-10-14 22:27:27 -0400
committerPauline <git@ethanlibs.co>2023-10-14 22:27:27 -0400
commit2582162cea2b3a59cd21c78f8b73cb03d0acad40 (patch)
tree432057475f3b51850a85e2cba9969bcb79f3a8e6 /apps
parent06f51ccdc496a6581d098edc424f3973e550221d (diff)
downloadNexus-2582162cea2b3a59cd21c78f8b73cb03d0acad40.tar.gz
Nexus-2582162cea2b3a59cd21c78f8b73cb03d0acad40.tar.bz2
Nexus-2582162cea2b3a59cd21c78f8b73cb03d0acad40.zip
refactor(trunk): refactor the entire project idk
Diffstat (limited to 'apps')
-rw-r--r--apps/website/.eslintrc.js8
-rw-r--r--apps/website/astro.config.ts7
-rw-r--r--apps/website/config.ts158
-rw-r--r--apps/website/package.json4
-rw-r--r--apps/website/src/styles/global.css10
-rw-r--r--apps/website/src/types/Config.d.ts48
-rw-r--r--apps/website/tailwind.config.cjs53
-rw-r--r--apps/website/tsconfig.json11
8 files changed, 177 insertions, 122 deletions
diff --git a/apps/website/.eslintrc.js b/apps/website/.eslintrc.js
new file mode 100644
index 0000000..f80eaa9
--- /dev/null
+++ b/apps/website/.eslintrc.js
@@ -0,0 +1,8 @@
+/** @type {import('eslint').ESLint.ConfigData} */
+module.exports = {
+ extends: [require.resolve('@polyfrost/config/eslint/web.js')],
+ parserOptions: {
+ tsconfigRootDir: __dirname,
+ project: './tsconfig.json'
+ }
+};
diff --git a/apps/website/astro.config.ts b/apps/website/astro.config.ts
index c929648..98351a4 100644
--- a/apps/website/astro.config.ts
+++ b/apps/website/astro.config.ts
@@ -1,10 +1,7 @@
-import { defineConfig } from 'astro/config';
-
import tailwind from '@astrojs/tailwind';
+import { defineConfig } from 'astro/config';
// https://astro.build/config
export default defineConfig({
- integrations: [
- tailwind(),
- ]
+ integrations: [tailwind()]
});
diff --git a/apps/website/config.ts b/apps/website/config.ts
index 1b45557..19c92a4 100644
--- a/apps/website/config.ts
+++ b/apps/website/config.ts
@@ -1,93 +1,83 @@
-import type { Config, NavbarDropdown, NavbarElement, Project } from "@webtypes/Config";
+import type { Config, NavbarDropdown, NavbarElement, Project } from '@webtypes/Config';
export const configConst = {
- projects: getProjects(),
- logos: [
- "oneconfig.minimal",
- "polyfrost.full",
- "polyfrost.minimal",
- "polyfrost.minimal_bg",
- ],
- navbar: {
- left: [
- {
- logo: ["polyfrost.full", -1],
- path: "/",
- }
- ],
- right: [
- {
- text: "Home",
- path: "/",
- },
- {
- text: "Projects",
- dropdown: (getProjects().map((project) => {
- (project as any).path = `/projects/${project.name.toLowerCase()}`;
- return project;
- }) as unknown as NavbarDropdown[])
- }
- ]
- }
+ projects: getProjects(),
+ logos: ['oneconfig.minimal', 'polyfrost.full', 'polyfrost.minimal', 'polyfrost.minimal_bg'],
+ navbar: {
+ left: [
+ {
+ logo: ['polyfrost.full', -1],
+ path: '/'
+ }
+ ],
+ right: [
+ {
+ text: 'Home',
+ path: '/'
+ },
+ {
+ text: 'Projects',
+ dropdown: getProjects().map((project) => {
+ (project as any).path = `/projects/${project.name.toLowerCase()}`;
+ return project;
+ }) as unknown as NavbarDropdown[]
+ }
+ ]
+ }
} as const satisfies Config;
function getProjects(): Project[] {
- return [
- {
- name: "OneConfig",
- description: "The next-generation config library for Forge and Fabric",
- logo: "oneconfig.minimal",
- tag: "BETA"
- },
- {
- name: "OneLauncher",
- description: "The next-generation launcher for Forge and Fabric",
- logo: "polyfrost.minimal",
- tag: "SOON"
- },
- {
- name: "OneConfig",
- description: "The next-generation config library for Forge and Fabric",
- logo: "oneconfig.minimal",
- tag: "BETA"
- },
- {
- name: "OneLauncher",
- description: "The next-generation launcher for Forge and Fabric",
- logo: "polyfrost.minimal",
- tag: "SOON"
- },
- {
- name: "OneConfig",
- description: "The next-generation config library for Forge and Fabric",
- logo: "oneconfig.minimal",
- tag: "BETA"
- },
- {
- name: "OneLauncher",
- description: "The next-generation launcher for Forge and Fabric",
- logo: "polyfrost.minimal",
- tag: "SOON"
- },
- {
- name: "OneConfig",
- description: "The next-generation config library for Forge and Fabric",
- logo: "oneconfig.minimal",
- tag: "BETA"
- },
- {
- name: "OneLauncher",
- description: "The next-generation launcher for Forge and Fabric",
- logo: "polyfrost.minimal",
- tag: "SOON"
- },
- ]
+ return [
+ {
+ name: 'OneConfig',
+ description: 'The next-generation config library for Forge and Fabric',
+ logo: 'oneconfig.minimal',
+ tag: 'BETA'
+ },
+ {
+ name: 'OneLauncher',
+ description: 'The next-generation launcher for Forge and Fabric',
+ logo: 'polyfrost.minimal',
+ tag: 'SOON'
+ },
+ {
+ name: 'OneConfig',
+ description: 'The next-generation config library for Forge and Fabric',
+ logo: 'oneconfig.minimal',
+ tag: 'BETA'
+ },
+ {
+ name: 'OneLauncher',
+ description: 'The next-generation launcher for Forge and Fabric',
+ logo: 'polyfrost.minimal',
+ tag: 'SOON'
+ },
+ {
+ name: 'OneConfig',
+ description: 'The next-generation config library for Forge and Fabric',
+ logo: 'oneconfig.minimal',
+ tag: 'BETA'
+ },
+ {
+ name: 'OneLauncher',
+ description: 'The next-generation launcher for Forge and Fabric',
+ logo: 'polyfrost.minimal',
+ tag: 'SOON'
+ },
+ {
+ name: 'OneConfig',
+ description: 'The next-generation config library for Forge and Fabric',
+ logo: 'oneconfig.minimal',
+ tag: 'BETA'
+ },
+ {
+ name: 'OneLauncher',
+ description: 'The next-generation launcher for Forge and Fabric',
+ logo: 'polyfrost.minimal',
+ tag: 'SOON'
+ }
+ ];
}
-
-
-
-
-
// -------------------- NO TOUCH --------------------- //
export default configConst as unknown as Config;
diff --git a/apps/website/package.json b/apps/website/package.json
index 556cae9..214a306 100644
--- a/apps/website/package.json
+++ b/apps/website/package.json
@@ -1,7 +1,7 @@
{
"name": "@polyfrost/website",
"type": "module",
- "private": true,
+ "private": true,
"scripts": {
"dev": "astro dev",
"start": "astro start",
@@ -14,6 +14,8 @@
"tailwindcss": "^3.3.3"
},
"devDependencies": {
+ "@polyfrost/config": "workspace:*",
+ "@types/node": "~18.17.19",
"typescript": "^5.2.2"
}
}
diff --git a/apps/website/src/styles/global.css b/apps/website/src/styles/global.css
index 51f3c19..6520592 100644
--- a/apps/website/src/styles/global.css
+++ b/apps/website/src/styles/global.css
@@ -1,11 +1,11 @@
@tailwind base;
* {
- font-family: 'Poppins', sans-serif;
+ font-family: 'Poppins', sans-serif;
}
@layer base {
- :focus-visible {
- @apply outline-none ring ring-blue-500;
- }
-} \ No newline at end of file
+ :focus-visible {
+ @apply outline-none ring ring-blue-500;
+ }
+}
diff --git a/apps/website/src/types/Config.d.ts b/apps/website/src/types/Config.d.ts
index 82eb4d7..2781b1b 100644
--- a/apps/website/src/types/Config.d.ts
+++ b/apps/website/src/types/Config.d.ts
@@ -1,34 +1,34 @@
-import { type configConst } from "config";
+import { type configConst } from 'config';
-export type LogoType = typeof configConst.logos[number];
+export type LogoType = (typeof configConst.logos)[number];
export interface Project {
- name: string,
- description: string,
- logo?: LogoType,
- tag?: string,
+ name: string;
+ description: string;
+ logo?: LogoType;
+ tag?: string;
}
export type NavbarDropdown = {
- name: string,
- description: string,
- path: string,
- logo?: LogoType,
- tag?: string
-}
+ name: string;
+ description: string;
+ path: string;
+ logo?: LogoType;
+ tag?: string;
+};
export type NavbarElement = {
- text?: string,
- logo?: [string, number],
- path?: string,
- dropdown?: NavbarDropdown[],
-}
+ text?: string;
+ logo?: [string, number];
+ path?: string;
+ dropdown?: NavbarDropdown[];
+};
export interface Config {
- projects: Project[],
- logos: string[],
- navbar: {
- left: NavbarElement[],
- right: NavbarElement[],
- },
-} \ No newline at end of file
+ projects: Project[];
+ logos: string[];
+ navbar: {
+ left: NavbarElement[];
+ right: NavbarElement[];
+ };
+}
diff --git a/apps/website/tailwind.config.cjs b/apps/website/tailwind.config.cjs
new file mode 100644
index 0000000..3cf5259
--- /dev/null
+++ b/apps/website/tailwind.config.cjs
@@ -0,0 +1,53 @@
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
+ theme: {
+ colors: {
+ blue: {
+ 500: 'rgba(31, 101, 214, 1)'
+ },
+ gray: {
+ 50: 'rgba(240, 242, 244, 1)',
+ 400: 'rgba(138, 150, 168, 1)',
+ 700: 'rgba(65, 74, 88, 1)',
+ 800: 'rgba(42, 47, 55, 1)'
+ },
+ white: {
+ DEFAULT: 'rgba(255, 255, 255, 1)',
+ secondary: 'rgba(238, 241, 254, 1)',
+ hover: 'rgba(231, 235, 252, 1)'
+ },
+ black: {
+ DEFAULT: 'rgba(0, 0, 0, 1)'
+ },
+ text: {
+ DEFAULT: 'rgba(2, 3, 7, 1)',
+ primary: 'rgba(2, 3, 7, 1)'
+ }
+ },
+ borderRadius: {
+ none: '0',
+ sm: '3px',
+ md: '5px',
+ lg: '8px',
+ xl: '12px',
+ full: '100vw'
+ },
+ fontSize: {
+ 'xs': '12px',
+ 'sm': '14px',
+ 'md': '16px',
+ 'lg': '18px',
+
+ 'header-sm': '24px',
+ 'header': '28px',
+ 'header-lg': '32px',
+
+ 'body-sm': '15px',
+ 'body': '16px',
+ 'body-lg': '17px'
+ },
+ extend: {}
+ },
+ plugins: []
+};
diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json
index 17881e6..dbadc64 100644
--- a/apps/website/tsconfig.json
+++ b/apps/website/tsconfig.json
@@ -1,10 +1,15 @@
{
- "extends": "astro/tsconfigs/base",
+ "extends": "astro/tsconfigs/strict",
"compilerOptions": {
+ "baseUrl": ".",
+ "composite": true,
"paths": {
- "@layouts/*": ["src/layouts/*"],
"@components/*": ["src/components/*"],
- "@pages/*": ["src/pages/*"]
+ "@layouts/*": ["src/layouts/*"],
+ "@webtypes/*": ["src/types/*"],
+ "@lib/*": ["src/lib/*"],
+ "@public/*": ["public/*"],
+ "@config": ["config.ts"]
}
}
}