hi
This commit is contained in:
parent
9970de958f
commit
a859fb4dc7
12 changed files with 174 additions and 95 deletions
BIN
lightning/public/5Q14.gif
Normal file
BIN
lightning/public/5Q14.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
20
lightning/src/components/Counter.css
Normal file
20
lightning/src/components/Counter.css
Normal 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);
|
||||||
|
}
|
11
lightning/src/components/Counter.tsx
Normal file
11
lightning/src/components/Counter.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
|
@ -28,6 +28,10 @@ p {
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
line-height: 1.35;
|
line-height: 1.35;
|
||||||
}
|
}
|
||||||
|
ul {
|
||||||
|
max-width: 7rem;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 480px) {
|
@media (min-width: 480px) {
|
||||||
h1 {
|
h1 {
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {
|
||||||
Scripts,
|
Scripts,
|
||||||
Title,
|
Title,
|
||||||
} from "solid-start";
|
} from "solid-start";
|
||||||
|
import BadassMap from './components/BadassMap.tsx'
|
||||||
import "./root.css";
|
import "./root.css";
|
||||||
|
|
||||||
export default function Root() {
|
export default function Root() {
|
||||||
|
@ -25,8 +26,9 @@ export default function Root() {
|
||||||
<Body>
|
<Body>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<A href="/">Index</A>
|
<A href="/">Map</A>
|
||||||
<A href="/about">About</A>
|
<A href="/about">About</A>
|
||||||
|
<BadassMap />
|
||||||
<Routes>
|
<Routes>
|
||||||
<FileRoutes />
|
<FileRoutes />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|
38
lightning/src/routes/about.tsx
Normal file
38
lightning/src/routes/about.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
import { Title } from "solid-start";
|
import { Title } from "solid-start";
|
||||||
import BadassMap from "~/components/BadassMap";
|
import Counter from "~/components/Counter";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<Title>Lightning</Title>
|
<Title>Lightning</Title>
|
||||||
<h1>Lightning</h1>
|
<h1>Lightning</h1>
|
||||||
<BadassMap />
|
<Counter />
|
||||||
<p>Click and drag to watch me explode!
|
<p>Click and drag to watch me explode!
|
||||||
</p>
|
</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -8,10 +8,14 @@
|
||||||
"jsxImportSource": "solid-js",
|
"jsxImportSource": "solid-js",
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"types": ["solid-start/env"],
|
"types": [
|
||||||
|
"solid-start/env"
|
||||||
|
],
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
"~/*": ["./src/*"]
|
"~/*": [
|
||||||
|
"./src/*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue