diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79518f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ab78a95 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9573023 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..aa9aac4 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Sliver Complex - Landing Site + +The landing site of Sliver Complex, powered by SvelteKit. \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100644 index 0000000..3be9020 Binary files /dev/null and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..a351fa9 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,33 @@ +import js from '@eslint/js'; +import ts from 'typescript-eslint'; +import svelte from 'eslint-plugin-svelte'; +import prettier from 'eslint-config-prettier'; +import globals from 'globals'; + +/** @type {import('eslint').Linter.FlatConfig[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs['flat/recommended'], + prettier, + ...svelte.configs['flat/prettier'], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ['**/*.svelte'], + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ['build/', '.svelte-kit/', 'dist/'] + } +]; diff --git a/package.json b/package.json new file mode 100644 index 0000000..e407733 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "s-complex", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/adapter-static": "^3.0.2", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^8.56.7", + "@unocss/extractor-svelte": "^0.61.3", + "@unocss/transformer-compile-class": "^0.61.3", + "eslint": "^9.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.20", + "unocss": "^0.61.3", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "@unocss/reset": "^0.61.3", + "svelte-theme-select": "^0.0.7" + } +} diff --git a/src/app.d.ts b/src/app.d.ts new file mode 100644 index 0000000..743f07b --- /dev/null +++ b/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..f273cc5 --- /dev/null +++ b/src/app.html @@ -0,0 +1,11 @@ + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/src/components/Footer.svelte b/src/components/Footer.svelte new file mode 100644 index 0000000..fe2b157 --- /dev/null +++ b/src/components/Footer.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/components/Header.svelte b/src/components/Header.svelte new file mode 100644 index 0000000..bf4d204 --- /dev/null +++ b/src/components/Header.svelte @@ -0,0 +1,10 @@ +
+ +
diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 0000000..856f2b6 --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1 @@ +// place files you want to import through the `$lib` alias in this folder. diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte new file mode 100644 index 0000000..1c33622 --- /dev/null +++ b/src/routes/+layout.svelte @@ -0,0 +1,39 @@ + + + + Sliver Complex + + + + +
+
+
+ +
+
+ + + + diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts new file mode 100644 index 0000000..c8cacf0 --- /dev/null +++ b/src/routes/+layout.ts @@ -0,0 +1 @@ +export const prerender = true; \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte new file mode 100644 index 0000000..25cfb02 --- /dev/null +++ b/src/routes/+page.svelte @@ -0,0 +1,23 @@ +
+
+ + Sliver Complex logo + +
+

Sliver Complex

+

+ Personal lab of @gxres042 and + slivermoe +

+
+
+

* We use domain slirv.vip to serve some services, such as the comment system and the self-hosted analysis service.

+

+
+
diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte new file mode 100644 index 0000000..a7363bd --- /dev/null +++ b/src/routes/about/+page.svelte @@ -0,0 +1,22 @@ +

About

+

Sliver Complex is a personal lab belongs to Restent Ou and SliverRiver.

+

Direction

+

+ We focus on the production of every front-end project, which will finally be used on our website + or others. +

+

+ We usually use Vue as the main front-end framework. At the same time, we sometimes use React and + Svelte in other projects. +

+

Services

+

+ Now, the GitHub organization of Sliver Complex hosts our website project, and its associated + domain, slirv.vip, also provides some of the services that complement our website. +

+

+ However, we are glad to help others building their websites, such as personal homepage and blog, + although our current capacity is still limited. Contact us if you are interested. +

diff --git a/src/routes/project/+page.svelte b/src/routes/project/+page.svelte new file mode 100644 index 0000000..1cf9489 --- /dev/null +++ b/src/routes/project/+page.svelte @@ -0,0 +1,43 @@ + + +
+

Project

+

List of projects that are visible to everyone in this lab.

+
+ +{#if isLoading} +

Loading...

+{:else} +
+ {#each repos as repo (repo.name)} + +
+

{repo.name}

+

{repo.description}

+
+
+ {/each} +
+{/if} diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/static/favicon.png differ diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..68f4004 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,19 @@ +import adapter from '@sveltejs/adapter-static' +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + }, + +}; + +export default config; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..fc93cbd --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 0000000..0e3ab4d --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,25 @@ +import { defineConfig, presetUno, presetWebFonts, transformerDirectives } from 'unocss'; +import transformerCompileClass from '@unocss/transformer-compile-class'; + +export default defineConfig({ + presets: [ + presetUno(), + presetWebFonts({ + provider: 'bunny', + fonts: { + sans: 'Noto Sans', + mono: 'Jetbrains Mono' + } + }) + ], + shortcuts: { + 'nav-item': + 'px-2 py-3 hover:bg-neutral-100 dark:hover:bg-neutral-600 flex items-center text-black dark:text-white no-underline' + }, + transformers: [ + transformerCompileClass(), + transformerDirectives({ + applyVariable: ['--apply'] + }) + ] +}); diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..0721b4f --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,7 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; +import UnoCSS from 'unocss/vite'; + +export default defineConfig({ + plugins: [UnoCSS(), sveltekit()] +});