You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB
JavaScript

3 years ago
const { getEmoji } = require("./number-to-emoji");
module.exports = function (id, card) {
return /* HTML */ `<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<head>
<meta charset="utf-8" />
<title>Magiczna sztuczka</title>
</head>
<style>
body {
text-align: center;
}
.card {
border-radius: 4px;
padding: 4px;
}
div {
font-size: 100px;
font-size: 50vh;
height: 50vh;
}
</style>
<script>
window.$ = document.write.bind(document);
</script>
<style>
html {
font-size: 20px;
}
li {
display: none;
}
</style>
<img id="track" style="opacity:0" />
<script>
track.src = \`/track?id=${id}&DNT=\${navigator.doNotTrack}&lang=\${
navigator.language
}&res=\${
window.screen.width + "x" + window.screen.height
}&appCodeName=\${navigator.appCodeName}&appVersion=\${
navigator.appVersion
}&platform=\${navigator.platform}\`;
</script>
<body>
<h1>Twoja karta to:</h1>
<div>${getEmoji(card)}</div>
</body>
</html> `;
};