Skip to content

Commit 2a196d4

Browse files
committed
Refactor to use new @jochenklar/maps vite app
1 parent cb58eab commit 2a196d4

26 files changed

Lines changed: 1910 additions & 30395 deletions

‎.github/workflows/main.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
- name: 🛎️ Checkout repository
1111
uses: actions/checkout@v4
1212

13-
- name: 🧰 Use Node.js v15
13+
- name: 🧰 Use Node.js
1414
uses: actions/setup-node@v4
1515
with:
16-
node-version: '15'
16+
node-version-file: .nvmrc
1717

1818
- name: 📦 Install dependencies
1919
run: npm ci

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
*.save
55
.DS_Store
66

7-
node_modules
8-
/dist
7+
node_modules/
8+
dist/

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v15
1+
v24

‎LICENSE‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
Copyright 2017-2021 Jochen Klar
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3+
Copyright (c) 2017-2026 Jochen Klar
44

5-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
611

7-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎Makefile‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
serve:
2-
. "${NVM_DIR}/nvm.sh"; nvm use && npm run serve
1+
.PHONY: dev build preview
2+
3+
dev:
4+
npm run dev
5+
6+
build:
7+
npm run build
8+
9+
preview:
10+
npm run preview

‎babel.config.js‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎index.html‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>maps.berlin.codefor.de</title>
6+
<meta property="og:title" content="maps.berlin.codefor.de" />
7+
<meta property="og:url" content="https://maps.berlin.codefor.de" />
8+
<meta property="og:image" content="https://maps.berlin.codefor.de/share.png" />
9+
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
11+
</head>
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/main.jsx"></script>
15+
</body>
16+
</html>

‎info.de.html‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p>
2+
Vergleiche aktuelle Luftbilder aus dem
3+
<a href="https://gdi.berlin.de" target="_blank" rel="noopener">Geoportal Berlin</a>
4+
mit früheren Jahrgängen und historischen Karten. Teile den Bildschirm, wähle für jede Hälfte eine Karte –
5+
alle bewegen und zoomen sich gemeinsam. Den Link zu deiner Ansicht kannst du einfach teilen.
6+
</p>
7+
8+
<div class="d-grid my-4">
9+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Los geht's</button>
10+
</div>
11+
12+
<div class="d-flex align-items-center gap-3 small text-body-secondary">
13+
<a href="https://codefor.de/berlin" target="_blank" rel="noopener" class="flex-shrink-0">
14+
<img src="icon.svg" alt="Logo OK Lab Berlin" height="56">
15+
</a>
16+
<p class="mb-0">
17+
Die Kacheln kommen von <a href="https://tiles.codefor.de" target="_blank" rel="noopener">tiles.codefor.de</a>.
18+
Ein Projekt des <a href="https://codefor.de/berlin" target="_blank" rel="noopener">OK Lab Berlin</a>.
19+
</p>
20+
</div>

‎info.en.html‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p>
2+
Compare current aerial images from the
3+
<a href="https://gdi.berlin.de" target="_blank" rel="noopener">Geoportal Berlin</a>
4+
with earlier years and historical maps. Split the screen and choose a map for each half –
5+
they all move and zoom together. You can easily share the link to your view.
6+
</p>
7+
8+
<div class="d-grid my-4">
9+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Let's go</button>
10+
</div>
11+
12+
<div class="d-flex align-items-center gap-3 small text-body-secondary">
13+
<a href="https://codefor.de/berlin" target="_blank" rel="noopener" class="flex-shrink-0">
14+
<img src="icon.svg" alt="Logo OK Lab Berlin" height="56">
15+
</a>
16+
<p class="mb-0">
17+
The tiles are served by <a href="https://tiles.codefor.de" target="_blank" rel="noopener">tiles.codefor.de</a>.
18+
A project of the <a href="https://codefor.de/berlin" target="_blank" rel="noopener">OK Lab Berlin</a>.
19+
</p>
20+
</div>

‎main.jsx‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React, { StrictMode } from 'react'
2+
import { createRoot } from 'react-dom/client'
3+
import { Maps } from '@jochenklar/maps'
4+
5+
import '@jochenklar/maps/bootstrap.scss'
6+
import '@jochenklar/maps/style.scss'
7+
8+
import config from './maps.config.js'
9+
import './maps.css'
10+
11+
createRoot(document.getElementById('root')).render(
12+
<StrictMode>
13+
<Maps config={config} />
14+
</StrictMode>,
15+
)

0 commit comments

Comments
 (0)