commit 9451ffb0aca67163862d3526b418745b10fdcd85 Author: LittleSheep Date: Sat Mar 16 17:17:32 2024 +0800 :tada: Inital Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..298a34e --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +*.lockb \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..88cdad7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "tabWidth": 2, + "singleQuote": false, + "printWidth": 120, + "trailingComma": "none" +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..b90ff61 --- /dev/null +++ b/index.html @@ -0,0 +1,41 @@ + + + + + + + SmartSheep → Solsynth + + +
+
+ + +

Redirecting...

+ +

SmartSheep is now known as Solsynth

+

We also updated our domain.

+ +
+ smartsheep.studio + + solsynth.dev +
+ +

Please add our new domain to your browser favorites.

+ +
+

You are going to redirect to

+ https://solsynth.dev +

in 5 seconds

+
+ +
+

Copyright © 2024 Solsynth

+
+
+
+ + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..3961dc3 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "redirector", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@types/node": "^20.11.28", + "typescript": "^5.2.2", + "vite": "^5.1.6" + }, + "dependencies": { + "@fontsource/roboto": "^5.0.12", + "@unocss/reset": "^0.58.6", + "unocss": "^0.58.6" + } +} diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100755 index 0000000..8b0f492 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..ab1b61b --- /dev/null +++ b/src/main.ts @@ -0,0 +1,16 @@ +import "./style.css" + +import "virtual:uno.css" + +import "@unocss/reset/tailwind.css" +import "@fontsource/roboto/latin.css" + +import { sitemap } from "./site" + +const site = sitemap[location.host] ?? location.host.replace("smartsheep.studio", "solsynth.dev") +const url = location.protocol + "//" + site + location.pathname + location.search + location.hash + +const target = document.querySelector("#redirect-target") +if (target) target.innerHTML = url + +setTimeout(() => window.open(url, "_self"), 5000) \ No newline at end of file diff --git a/src/site.ts b/src/site.ts new file mode 100644 index 0000000..e8da765 --- /dev/null +++ b/src/site.ts @@ -0,0 +1,9 @@ +export const sitemap: { [id: string]: string } = { + // Goatworks + "smartsheep.studio": "solsynth.dev", + "code.smartsheep.studio": "git.solsynth.dev", + + // Hydrogen + "id.smartsheep.studio": "id.solsynth.dev", + "feed.smartsheep.studio": "co.solsynth.dev" +} diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..98dbcc1 --- /dev/null +++ b/src/style.css @@ -0,0 +1,3 @@ +html, body { + font-family: "Roboto", system-ui, sans; +} \ No newline at end of file diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/unocss.config.ts b/unocss.config.ts new file mode 100644 index 0000000..199f2f2 --- /dev/null +++ b/unocss.config.ts @@ -0,0 +1,5 @@ +import { defineConfig, presetAttributify, presetTypography, presetUno } from "unocss"; + +export default defineConfig({ + presets: [presetAttributify(), presetTypography(), presetUno({ preflight: false })] +}) \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..a3da511 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,14 @@ +import { fileURLToPath, URL } from "node:url" + +import { defineConfig } from "vite" +import unocss from "unocss/vite" + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [unocss()], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)) + } + }, +})