Skip to content

Commit d4ce1b9

Browse files
authored
Merge pull request #13 from Daschi1/development
1.1.0
2 parents 4567483 + 6ccea26 commit d4ce1b9

11 files changed

+218
-169
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ generate `licenses.json`.
2828
license-checker --customPath lc-checker-format.json --json --out static/licenses.json
2929
```
3030

31-
### Currently deployed version
31+
### Current Deployment Command
3232

3333
```shell
3434
docker run -d \

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "green-hell-maps",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Green Hell interactive maps",
55
"repository": "https://github.com/Daschi1/green-hell-maps",
66
"author": "Daschi",
77
"private": false,
8-
"packageManager": "[email protected].0",
8+
"packageManager": "[email protected].1",
99
"scripts": {
1010
"dev": "vite dev",
1111
"build": "vite build",
@@ -16,8 +16,8 @@
1616
"format": "prettier --write ."
1717
},
1818
"devDependencies": {
19-
"@sveltejs/adapter-node": "^5.2.1",
20-
"@sveltejs/kit": "^2.5.21",
19+
"@sveltejs/adapter-node": "^5.2.2",
20+
"@sveltejs/kit": "^2.5.22",
2121
"@sveltejs/vite-plugin-svelte": "^3.1.1",
2222
"@types/eslint": "^9.6.0",
2323
"autoprefixer": "^10.4.20",
@@ -35,13 +35,13 @@
3535
"prettier": "^3.3.3",
3636
"prettier-plugin-svelte": "^3.2.6",
3737
"prettier-plugin-tailwindcss": "^0.6.6",
38-
"svelte": "^5.0.0-next.217",
38+
"svelte": "^5.0.0-next.224",
3939
"svelte-check": "^3.8.5",
4040
"sveltekit-search-params": "^3.0.0",
41-
"tailwindcss": "^3.4.9",
41+
"tailwindcss": "^3.4.10",
4242
"typescript": "^5.5.4",
43-
"typescript-eslint": "^8.0.1",
44-
"vite": "^5.4.0"
43+
"typescript-eslint": "^8.1.0",
44+
"vite": "^5.4.1"
4545
},
4646
"type": "module"
4747
}

pnpm-lock.yaml

+125-125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/Map.svelte

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script lang="ts">
22
import Coordinate from "./Coordinate.svelte";
3+
import { mapOverlayOpacity } from "$lib/settings";
34
45
interface Props {
56
src: string;
7+
blend?: string;
68
}
79
8-
let { src }: Props = $props();
10+
let { src, blend }: Props = $props();
911
1012
const westStart = 56;
1113
const westEnd = 20;
@@ -17,7 +19,20 @@
1719
</script>
1820

1921
<div class="relative h-[2899px] w-[2751px]">
20-
<img class="pointer-events-none" alt={src} {src} />
22+
<img
23+
style="opacity: {blend ? 1 - $mapOverlayOpacity : '100'}"
24+
class="pointer-events-none {blend ? 'opacity-50' : ''}"
25+
alt={src}
26+
{src}
27+
/>
28+
{#if blend}
29+
<img
30+
style="opacity: {$mapOverlayOpacity}"
31+
class="pointer-events-none absolute left-0 top-0"
32+
alt={blend}
33+
src={blend}
34+
/>
35+
{/if}
2136

2237
<div
2338
class="absolute left-0 top-0 grid h-full w-full grid-cols-[repeat(37,_minmax(0,_1fr))] grid-rows-[repeat(39,_minmax(0,_1fr))]"

src/lib/Navbar.svelte

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@
1919
pathname="/spirits-of-amazonia"
2020
><Span>Spirits of Amazonia</Span>
2121
</NavbarA>
22-
<!-- TODO: add blend map -->
22+
<NavbarA {activePathname} href="/comparison{$page.url.search}" pathname="/comparison"
23+
><Span>Comparison</Span>
24+
</NavbarA>
25+
<NavbarA {activePathname} href="/licenses{$page.url.search}" pathname="/licenses"
26+
><Span>Licenses</Span>
27+
</NavbarA>
2328
</div>

src/lib/Settings.svelte

+13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script lang="ts">
22
import { Checkbox, Label, Range } from "flowbite-svelte";
33
import { CloseOutline, UndoOutline } from "flowbite-svelte-icons";
4+
import { page } from "$app/stores";
45
import {
56
alwaysShowCoordinateOverlay,
67
clickedCoordinates,
78
coordinateOverlayOpacity,
9+
mapOverlayOpacity,
810
} from "$lib/settings";
911
</script>
1012

@@ -30,4 +32,15 @@
3032
Unselect all coordinates
3133
<CloseOutline class="-ml-1" />
3234
</button>
35+
36+
{#if "/comparison".includes($page.url.pathname)}
37+
<Label class="flex items-center gap-2">
38+
<span class="flex-shrink-0">Map overlay opacity</span>
39+
<span><Range max={1} min={0} step={0.05} bind:value={$mapOverlayOpacity} /></span>
40+
<UndoOutline
41+
class="cursor-pointer hover:text-red-500"
42+
onclick={() => ($mapOverlayOpacity = 0.5)}
43+
/>
44+
</Label>
45+
{/if}
3346
</div>

src/lib/settings.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const clickedCoordinates = queryParam<number[]>("coordinates", {
77
encode: (value: number[]) => clickedCoordinatesEncode(value),
88
decode: (value: string | null) => clickedCoordinatesDecode(value),
99
});
10+
export const mapOverlayOpacity = writable(0.5);
1011

1112
/**
1213
* Encodes an array of four-digit integers into a compact string representation.

src/routes/+layout.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="flex flex-col gap-2 p-2">
99
<div class="flex flex-row items-center gap-4">
1010
<Navbar />
11-
{#if ["/story-mode", "/spirits-of-amazonia"].includes($page.url.pathname)}
11+
{#if ["/story-mode", "/spirits-of-amazonia", "/comparison"].includes($page.url.pathname)}
1212
<Settings />
1313
{/if}
1414
</div>

src/routes/+page.svelte

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<br />
2323
<div>
2424
<Heading tag="h5">Credits</Heading>
25-
<div class="flex flex-col gap-1">
25+
<div class="flex flex-col gap-2">
2626
<div>
2727
<P>
2828
Map design by <A href="https://www.reddit.com/user/alex3omg/" target="_blank"
@@ -45,9 +45,11 @@
4545

4646
<div>
4747
<P class="group flex w-fit items-center gap-1">
48-
Created with
48+
Created by
49+
<A href="https://github.com/Daschi1" target="_blank">Daschi</A>
50+
with
4951
<HeartOutline
50-
class="group-hover:motion-safe:animate-pulse group-hover:fill-red-500 group-hover:text-red-500"
52+
class="group-hover:fill-red-500 group-hover:text-red-500 group-hover:motion-safe:animate-pulse"
5153
/>
5254
and many <span><A href="/licenses">open-source projects</A>!</span>
5355
</P>

src/routes/comparison/+page.svelte

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script lang="ts">
2+
import Map from "$lib/Map.svelte";
3+
</script>
4+
5+
<svelte:head>
6+
<title>Green Hell Maps - Comparison</title>
7+
<meta
8+
name="description"
9+
content="Green Hell interactive map comparing Story Mode and Spirits of Amazonia"
10+
/>
11+
</svelte:head>
12+
13+
<Map blend="soa-map-updated.png" src="sm-map-updated.png" />

static/licenses.json

+28-28
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
"version": "2.1.4",
5151
"description": "An object schema merger/validator"
5252
},
53-
"@sveltejs/[email protected].1": {
53+
"@sveltejs/[email protected].2": {
5454
"licenses": "MIT",
5555
"repository": "https://github.com/sveltejs/kit",
5656
"name": "@sveltejs/adapter-node",
57-
"version": "5.2.1",
57+
"version": "5.2.2",
5858
"description": "Adapter for SvelteKit apps that generates a standalone Node server",
5959
"copyright": "Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)"
6060
},
61-
"@sveltejs/[email protected].21": {
61+
"@sveltejs/[email protected].22": {
6262
"licenses": "MIT",
6363
"repository": "https://github.com/sveltejs/kit",
6464
"name": "@sveltejs/kit",
65-
"version": "2.5.21",
65+
"version": "2.5.22",
6666
"description": "SvelteKit is the fastest way to build Svelte apps",
6767
"copyright": "Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)"
6868
},
@@ -82,65 +82,65 @@
8282
"version": "9.6.0",
8383
"description": "TypeScript definitions for eslint"
8484
},
85-
"@typescript-eslint/eslint-plugin@8.0.1": {
85+
"@typescript-eslint/eslint-plugin@8.1.0": {
8686
"licenses": "MIT",
8787
"repository": "https://github.com/typescript-eslint/typescript-eslint",
8888
"name": "@typescript-eslint/eslint-plugin",
89-
"version": "8.0.1",
89+
"version": "8.1.0",
9090
"description": "TypeScript plugin for ESLint",
9191
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
9292
},
93-
"@typescript-eslint/parser@8.0.1": {
93+
"@typescript-eslint/parser@8.1.0": {
9494
"licenses": "BSD-2-Clause",
9595
"repository": "https://github.com/typescript-eslint/typescript-eslint",
9696
"name": "@typescript-eslint/parser",
97-
"version": "8.0.1",
97+
"version": "8.1.0",
9898
"description": "An ESLint custom parser which leverages TypeScript ESTree"
9999
},
100-
"@typescript-eslint/scope-manager@8.0.1": {
100+
"@typescript-eslint/scope-manager@8.1.0": {
101101
"licenses": "MIT",
102102
"repository": "https://github.com/typescript-eslint/typescript-eslint",
103103
"name": "@typescript-eslint/scope-manager",
104-
"version": "8.0.1",
104+
"version": "8.1.0",
105105
"description": "TypeScript scope analyser for ESLint",
106106
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
107107
},
108-
"@typescript-eslint/type-utils@8.0.1": {
108+
"@typescript-eslint/type-utils@8.1.0": {
109109
"licenses": "MIT",
110110
"repository": "https://github.com/typescript-eslint/typescript-eslint",
111111
"name": "@typescript-eslint/type-utils",
112-
"version": "8.0.1",
112+
"version": "8.1.0",
113113
"description": "Type utilities for working with TypeScript + ESLint together",
114114
"copyright": "Copyright (c) 2021 typescript-eslint and other contributors"
115115
},
116-
"@typescript-eslint/types@8.0.1": {
116+
"@typescript-eslint/types@8.1.0": {
117117
"licenses": "MIT",
118118
"repository": "https://github.com/typescript-eslint/typescript-eslint",
119119
"name": "@typescript-eslint/types",
120-
"version": "8.0.1",
120+
"version": "8.1.0",
121121
"description": "Types for the TypeScript-ESTree AST spec",
122122
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
123123
},
124-
"@typescript-eslint/typescript-estree@8.0.1": {
124+
"@typescript-eslint/typescript-estree@8.1.0": {
125125
"licenses": "BSD-2-Clause",
126126
"repository": "https://github.com/typescript-eslint/typescript-eslint",
127127
"name": "@typescript-eslint/typescript-estree",
128-
"version": "8.0.1",
128+
"version": "8.1.0",
129129
"description": "A parser that converts TypeScript source code into an ESTree compatible form"
130130
},
131-
"@typescript-eslint/utils@8.0.1": {
131+
"@typescript-eslint/utils@8.1.0": {
132132
"licenses": "MIT",
133133
"repository": "https://github.com/typescript-eslint/typescript-eslint",
134134
"name": "@typescript-eslint/utils",
135-
"version": "8.0.1",
135+
"version": "8.1.0",
136136
"description": "Utilities for working with TypeScript + ESLint together",
137137
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
138138
},
139-
"@typescript-eslint/visitor-keys@8.0.1": {
139+
"@typescript-eslint/visitor-keys@8.1.0": {
140140
"licenses": "MIT",
141141
"repository": "https://github.com/typescript-eslint/typescript-eslint",
142142
"name": "@typescript-eslint/visitor-keys",
143-
"version": "8.0.1",
143+
"version": "8.1.0",
144144
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
145145
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
146146
},
@@ -344,11 +344,11 @@
344344
"description": "Svelte parser for ESLint",
345345
"copyright": "Copyright (c) 2021 Yosuke Ota"
346346
},
347-
347+
348348
"licenses": "MIT",
349349
"repository": "https://github.com/sveltejs/svelte",
350350
"name": "svelte",
351-
"version": "5.0.0-next.217",
351+
"version": "5.0.0-next.224",
352352
"description": "Cybernetically enhanced web apps",
353353
"copyright": "Copyright (c) 2016-24 [these people](https://github.com/sveltejs/svelte/graphs/contributors)"
354354
},
@@ -361,19 +361,19 @@
361361
"description": "The fastest way to read **AND WRITE** from query search params in [sveltekit](https://github.com/sveltejs/kit).",
362362
"copyright": "Copyright (c) 2022 Paolo Ricciuti"
363363
},
364-
364+
365365
"licenses": "MIT",
366366
"repository": "https://github.com/tailwindlabs/tailwindcss",
367367
"name": "tailwindcss",
368-
"version": "3.4.9",
368+
"version": "3.4.10",
369369
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
370370
"copyright": "Copyright (c) Tailwind Labs, Inc."
371371
},
372-
"typescript-eslint@8.0.1": {
372+
"typescript-eslint@8.1.0": {
373373
"licenses": "MIT",
374374
"repository": "https://github.com/typescript-eslint/typescript-eslint",
375375
"name": "typescript-eslint",
376-
"version": "8.0.1",
376+
"version": "8.1.0",
377377
"description": "Tooling which enables you to use TypeScript with ESLint",
378378
"copyright": "Copyright (c) 2019 typescript-eslint and other contributors"
379379
},
@@ -385,12 +385,12 @@
385385
"version": "5.5.4",
386386
"description": "TypeScript is a language for application scale JavaScript development"
387387
},
388-
388+
389389
"licenses": "MIT",
390390
"repository": "https://github.com/vitejs/vite",
391391
"publisher": "Evan You",
392392
"name": "vite",
393-
"version": "5.4.0",
393+
"version": "5.4.1",
394394
"description": "Native-ESM powered web dev build tool",
395395
"copyright": "Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors"
396396
}

0 commit comments

Comments
 (0)