website-to-remarkable/index.html

60 lines
1.3 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;
background-color: #e54655;
}
img {
width: max-content;
max-width: 100%;
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>