Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🤖 prompt users for internet archive URL #1009

Merged
merged 2 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dist/leaflet.distortableimage.css
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ a.leaflet-toolbar-icon[title='Loading...'] {
fill: #c10d0d;
}

input[type="text"]::-webkit-input-placeholder {
color: #979797;
}

@keyframes ldi-spin {
0% {
-webkit-transform: rotate(0);
Expand Down
63 changes: 63 additions & 0 deletions examples/archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>MapKnitter Lite</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>

<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css">
<link rel="stylesheet" href="../dist/vendor.css">
<link rel="stylesheet" href="../dist/leaflet.distortableimage.css" media="screen" title="no title">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<script src="../node_modules/leaflet/dist/leaflet.js" type="text/javascript" charset="utf-8"></script>
<script src="../dist/vendor.js"></script>
<script src="../dist/leaflet.distortableimage.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>
<body style="margin:0;">
<div id="map" style="width:100%; height:100%; position:absolute; top:0;"></div>

<div class="modal fade" id="welcomeModal" aria-labelledby="exampleModalLabel" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content bg-light">
<div class="modal-header d-block">
<div class="d-flex justify-content-between align-items-center">
<h2 class="modal-title">Welcome to MapKnitter Lite</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<p> <small>(while MapKnitter is offline)</small> </p>
</div>
<div class="modal-body">
<p>First, you’ll need to go to <a href="https://archive.org/" target="_blank">archive.org</a>, create an account, and then upload your images.
<a href="https://archive.org/embed/help-upload-overview" target="_blank">Watch this helpful video guide.</a>
</p>
<p>You’ll get an address that looks like this:
<a href="https://archive.org/details/texas-barnraising/" target="_blank">
https://archive.org/details/texas-barnraising/
</a>
</p>
<p>Paste it here to begin:</p>
<input type="text" class="form-control" placeholder="https://archive.org/details/...">
<button class="btn btn-primary mt-4 mb-5">Begin</button>
</div>
</div>
</div>
</div>
</body>
<script>
let map;

const setupMap = () => {
map = L.map('map').setView([51.505, -0.09], 13);
map.addGoogleMutant();

map.whenReady(function() {
new bootstrap.Modal(document.getElementById('welcomeModal')).show()
});
}

setupMap();
</script>
</html>