This commit is contained in:
Adam 2023-04-15 04:34:50 -04:00
parent 9970de958f
commit a859fb4dc7
12 changed files with 174 additions and 95 deletions

View file

@ -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"
}
}
"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"
}
}

BIN
lightning/public/5Q14.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -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);
}

View file

@ -0,0 +1,11 @@
import { createSignal } from "solid-js";
import "./Counter.css";
export default function Counter() {
const [count, setCount] = createSignal(0);
return (
<button class="increment" onClick={() => setCount(count() + 1)}>
Clicks: {count()}
</button>
);
}

View file

@ -1,9 +1,9 @@
import {
createHandler,
renderAsync,
StartServer,
createHandler,
renderAsync,
StartServer,
} from "solid-start/entry-server";
export default createHandler(
renderAsync((event) => <StartServer event={event} />)
renderAsync((event) => <StartServer event={event} />)
);

View file

@ -28,6 +28,10 @@ p {
margin: 2rem auto;
line-height: 1.35;
}
ul {
max-width: 7rem;
margin: auto;
}
@media (min-width: 480px) {
h1 {

View file

@ -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 (
<Html lang="en">
<Head>
<Title>SolidStart - Bare</Title>
<Meta charset="utf-8" />
<Meta name="viewport" content="width=device-width, initial-scale=1" />
</Head>
<Body>
<Suspense>
<ErrorBoundary>
<A href="/">Index</A>
<A href="/about">About</A>
<Routes>
<FileRoutes />
</Routes>
</ErrorBoundary>
</Suspense>
<Scripts />
</Body>
</Html>
);
return (
<Html lang="en">
<Head>
<Title>SolidStart - Bare</Title>
<Meta charset="utf-8" />
<Meta name="viewport" content="width=device-width, initial-scale=1" />
</Head>
<Body>
<Suspense>
<ErrorBoundary>
<A href="/">Map</A>
<A href="/about">About</A>
<BadassMap />
<Routes>
<FileRoutes />
</Routes>
</ErrorBoundary>
</Suspense>
<Scripts />
</Body>
</Html>
);
}

View file

@ -2,18 +2,18 @@ import { Title } from "solid-start";
import { HttpStatusCode } from "solid-start/server";
export default function NotFound() {
return (
<main>
<Title>Not Found</Title>
<HttpStatusCode code={404} />
<h1>Page Not Found</h1>
<p>
Visit{" "}
<a href="https://start.solidjs.com" target="_blank">
start.solidjs.com
</a>{" "}
to learn how to build SolidStart apps.
</p>
</main>
);
return (
<main>
<Title>Not Found</Title>
<HttpStatusCode code={404} />
<h1>Page Not Found</h1>
<p>
Visit{" "}
<a href="https://start.solidjs.com" target="_blank">
start.solidjs.com
</a>{" "}
to learn how to build SolidStart apps.
</p>
</main>
);
}

View file

@ -0,0 +1,38 @@
import { Title } from 'solid-start';
export default function Home() {
return (
<main>
<Title>Lightning</Title>
<h1>About</h1>
<ul>
<li>
<a href="https://maplibre.org/" target="_blank">
MapLibre
</a>
</li>
<li>
<a href="https://openmaptiles.org/" target="_blank">
OpenMapTiles
</a>
</li>
<li>
<a href="https://start.solidjs.com/" target="_blank">
SolidStart
</a>
</li>
<li>
<a href="https://gis-hub.gitbook.io/solid-map-gl/" target="_blank">
Solid Map GL
</a>
</li>
</ul>
<img src='5Q14.gif' />
<p>
<a href="https://github.com/adoyle0/maps" target="_blank">
github.com/adoyle0/maps
</a>
</p>
</main>
);
}

View file

@ -1,12 +1,12 @@
import { Title } from "solid-start";
import BadassMap from "~/components/BadassMap";
import Counter from "~/components/Counter";
export default function Home() {
return (
<main>
<Title>Lightning</Title>
<h1>Lightning</h1>
<BadassMap />
<Counter />
<p>Click and drag to watch me explode!
</p>
</main>

View file

@ -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/*"
]
}
}
}
}

View file

@ -2,5 +2,5 @@ import solid from "solid-start/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [solid()],
plugins: [solid()],
});