diff --git a/lightning/package.json b/lightning/package.json index 401648a..6489559 100644 --- a/lightning/package.json +++ b/lightning/package.json @@ -1,30 +1,30 @@ { - "name": "lightning", - "scripts": { - "dev": "solid-start dev", - "build": "solid-start build", - "start": "solid-start start" - }, - "type": "module", - "devDependencies": { - "@types/node": "^18.11.18", - "esbuild": "^0.14.54", - "postcss": "^8.4.21", - "solid-start-node": "^0.2.19", - "typescript": "^4.9.4", - "vite": "^4.1.4" - }, - "dependencies": { - "@solidjs/meta": "^0.28.2", - "@solidjs/router": "^0.8.2", - "mapbox-gl": "npm:empty-npm-package@1.0.0", - "maplibre-gl": "^2.4.0", - "solid-js": "^1.7.2", - "solid-map-gl": "^1.7.2", - "solid-start": "^0.2.26", - "undici": "^5.15.1" - }, - "engines": { - "node": ">=16.8" - } -} \ No newline at end of file + "name": "lightning", + "scripts": { + "dev": "solid-start dev", + "build": "solid-start build", + "start": "solid-start start" + }, + "type": "module", + "devDependencies": { + "@types/node": "^18.11.18", + "esbuild": "^0.14.54", + "postcss": "^8.4.21", + "solid-start-node": "^0.2.19", + "typescript": "^4.9.4", + "vite": "^4.1.4" + }, + "dependencies": { + "@solidjs/meta": "^0.28.2", + "@solidjs/router": "^0.8.2", + "mapbox-gl": "npm:empty-npm-package@1.0.0", + "maplibre-gl": "^2.4.0", + "solid-js": "^1.7.2", + "solid-map-gl": "^1.7.2", + "solid-start": "^0.2.26", + "undici": "^5.15.1" + }, + "engines": { + "node": ">=16.8" + } +} diff --git a/lightning/public/5Q14.gif b/lightning/public/5Q14.gif new file mode 100644 index 0000000..971fcea Binary files /dev/null and b/lightning/public/5Q14.gif differ diff --git a/lightning/src/components/Counter.css b/lightning/src/components/Counter.css new file mode 100644 index 0000000..8bd0eb3 --- /dev/null +++ b/lightning/src/components/Counter.css @@ -0,0 +1,20 @@ +.increment { + font-family: inherit; + font-size: inherit; + padding: 1em 2em; + color: #335d92; + background-color: rgba(68, 107, 158, 0.1); + border-radius: 2em; + border: 2px solid rgba(68, 107, 158, 0); + outline: none; + width: 200px; + font-variant-numeric: tabular-nums; +} + +.increment:focus { + border: 2px solid #335d92; +} + +.increment:active { + background-color: rgba(68, 107, 158, 0.2); +} \ No newline at end of file diff --git a/lightning/src/components/Counter.tsx b/lightning/src/components/Counter.tsx new file mode 100644 index 0000000..55a4e67 --- /dev/null +++ b/lightning/src/components/Counter.tsx @@ -0,0 +1,11 @@ +import { createSignal } from "solid-js"; +import "./Counter.css"; + +export default function Counter() { + const [count, setCount] = createSignal(0); + return ( + + ); +} diff --git a/lightning/src/entry-server.tsx b/lightning/src/entry-server.tsx index 86898c9..a796995 100644 --- a/lightning/src/entry-server.tsx +++ b/lightning/src/entry-server.tsx @@ -1,9 +1,9 @@ import { - createHandler, - renderAsync, - StartServer, + createHandler, + renderAsync, + StartServer, } from "solid-start/entry-server"; export default createHandler( - renderAsync((event) => ) + renderAsync((event) => ) ); diff --git a/lightning/src/root.css b/lightning/src/root.css index 5955a5a..fb59b86 100644 --- a/lightning/src/root.css +++ b/lightning/src/root.css @@ -28,6 +28,10 @@ p { margin: 2rem auto; line-height: 1.35; } +ul { + max-width: 7rem; + margin: auto; +} @media (min-width: 480px) { h1 { diff --git a/lightning/src/root.tsx b/lightning/src/root.tsx index 250d1d4..753d3c3 100644 --- a/lightning/src/root.tsx +++ b/lightning/src/root.tsx @@ -1,39 +1,41 @@ // @refresh reload import { Suspense } from "solid-js"; import { - A, - Body, - ErrorBoundary, - FileRoutes, - Head, - Html, - Meta, - Routes, - Scripts, - Title, + A, + Body, + ErrorBoundary, + FileRoutes, + Head, + Html, + Meta, + Routes, + Scripts, + Title, } from "solid-start"; +import BadassMap from './components/BadassMap.tsx' import "./root.css"; export default function Root() { - return ( - - - SolidStart - Bare - - - - - - - Index - About - - - - - - - - - ); + return ( + + + SolidStart - Bare + + + + + + + Map + About + + + + + + + + + + ); } diff --git a/lightning/src/routes/[...404].tsx b/lightning/src/routes/[...404].tsx index 1089460..fa43b53 100644 --- a/lightning/src/routes/[...404].tsx +++ b/lightning/src/routes/[...404].tsx @@ -2,18 +2,18 @@ import { Title } from "solid-start"; import { HttpStatusCode } from "solid-start/server"; export default function NotFound() { - return ( -
- Not Found - -

Page Not Found

-

- Visit{" "} - - start.solidjs.com - {" "} - to learn how to build SolidStart apps. -

-
- ); + return ( +
+ Not Found + +

Page Not Found

+

+ Visit{" "} + + start.solidjs.com + {" "} + to learn how to build SolidStart apps. +

+
+ ); } diff --git a/lightning/src/routes/about.tsx b/lightning/src/routes/about.tsx new file mode 100644 index 0000000..1a81a21 --- /dev/null +++ b/lightning/src/routes/about.tsx @@ -0,0 +1,38 @@ +import { Title } from 'solid-start'; + +export default function Home() { + return ( +
+ Lightning +

About

+ + +

+ + github.com/adoyle0/maps + +

+
+ ); +} diff --git a/lightning/src/routes/index.tsx b/lightning/src/routes/index.tsx index 2139e83..4fb57ec 100644 --- a/lightning/src/routes/index.tsx +++ b/lightning/src/routes/index.tsx @@ -1,12 +1,12 @@ import { Title } from "solid-start"; -import BadassMap from "~/components/BadassMap"; +import Counter from "~/components/Counter"; export default function Home() { return (
Lightning

Lightning

- +

Click and drag to watch me explode!

diff --git a/lightning/tsconfig.json b/lightning/tsconfig.json index d888d62..2412d87 100644 --- a/lightning/tsconfig.json +++ b/lightning/tsconfig.json @@ -1,17 +1,21 @@ { - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "node", - "jsxImportSource": "solid-js", - "jsx": "preserve", - "strict": true, - "types": ["solid-start/env"], - "baseUrl": "./", - "paths": { - "~/*": ["./src/*"] + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "jsxImportSource": "solid-js", + "jsx": "preserve", + "strict": true, + "types": [ + "solid-start/env" + ], + "baseUrl": "./", + "paths": { + "~/*": [ + "./src/*" + ] + } } - } } diff --git a/lightning/vite.config.ts b/lightning/vite.config.ts index 2921bd7..3e83231 100644 --- a/lightning/vite.config.ts +++ b/lightning/vite.config.ts @@ -2,5 +2,5 @@ import solid from "solid-start/vite"; import { defineConfig } from "vite"; export default defineConfig({ - plugins: [solid()], + plugins: [solid()], });