website-to-remarkable/index.html
2020-05-26 13:51:28 +01:00

58 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='manifest' href='/manifest.json'>
<title>Website to reMarkable</title>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js');
}
</script>
<style>
* {
box-sizing: border-box;
}
body {
font-size: 2em;
display: flex;
flex-direction: column;
justify-content: center;
height: 100vh;
margin: 0;
padding: 0;
text-align: center;
}
img {
width: max-content;
margin: 0 auto;
}
input, button {
margin: 10px 10px;
font-size: 1.8em;
line-height: 1.5em;
text-align: center;
}
</style>
</head>
<body>
<img src="rocket.png" />
<input type="url" id="URL" />
<button id="sendButton">SEND</button>
<script>
document.getElementById('sendButton').addEventListener('click', () => {
window.location = window.location + `?website=${document.getElementById("URL").value}`;
})
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@pwabuilder/pwainstall"></script>
<pwa-install></pwa-install>
</body>
</html>