151 lines
3.9 KiB
HTML
151 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>UUID</title>
|
|
<meta property="og:title" content="UUID" />
|
|
<meta property="og:image" content="http://shots.wayl.one/shot/?url=https://uuid.wayl.one/&height=630&width=1200&scaled_width=1200&scaled_height=630&selectors=" />
|
|
<meta property="og:description" content="It's just a UUID, thats it, thats all it needs to do, it generagets, displays and copies the UUID" />
|
|
<meta property="og:url" content="https://uuid.wayl.one/" />
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:site_name" content="UUID" />
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
<meta name="twitter:title" content="UUID" />
|
|
<meta name="twitter:description" content="It's just a UUID, thats it, thats all it needs to do, it generagets, displays and copies the UUID" />
|
|
<meta name="twitter:image" content="http://shots.wayl.one/shot/?url=https://uuid.wayl.one/&height=630&width=1200&scaled_width=1200&scaled_height=640&selectors=" />
|
|
<style>
|
|
body {
|
|
background: black;
|
|
color: lime;
|
|
font-family: sans-serif;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
margin: 0;
|
|
}
|
|
.container {
|
|
text-align: center;
|
|
font-size: 4rem;
|
|
line-height: 1.2;
|
|
}
|
|
#rolls {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 6rem;
|
|
margin-top: 1rem;
|
|
color: lime;
|
|
}
|
|
#rolls li {
|
|
border: 4px solid #005500;
|
|
background: #00ff0024;
|
|
box-shadow: 0 0 3rem 1rem #00ff0017;
|
|
aspect-ratio: 1;
|
|
border-radius: .5rem;
|
|
height: 1.5em;
|
|
width: 1.5em;
|
|
line-height: 1.5em;
|
|
text-align: center;
|
|
display: inline-block;
|
|
padding: 0.5rem;
|
|
margin: 2rem;
|
|
}
|
|
.total {
|
|
margin-top: 0.5rem;
|
|
font-weight: bold;
|
|
}
|
|
/* Modal styles */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background: rgba(0, 0, 0, 0.75);
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
}
|
|
.modal {
|
|
box-shadow: 0 0 3rem 1rem #00ff0017;
|
|
background: black;
|
|
border: 2px solid lime;
|
|
border-radius: 0.5rem;
|
|
padding: 2rem;
|
|
max-width: 90%;
|
|
color: lime;
|
|
text-align: left;
|
|
font-size: 1.5rem;
|
|
}
|
|
.modal h2 {
|
|
margin-top: 0;
|
|
color: #008e00;
|
|
}
|
|
.modal ul {
|
|
color: #00ae00;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div id="uuid"></div>
|
|
</div>
|
|
<label>
|
|
Select a color:
|
|
<input type="color" colorspace="display-p3" alpha>
|
|
</label>
|
|
|
|
<!-- Modal -->
|
|
<div id="modal-overlay" class="modal-overlay">
|
|
<div class="modal">
|
|
<h2>Help</h2>
|
|
<p>
|
|
It's just a UUID, thats it, thats all it needs to do, it generagets, displays and copies the UUID
|
|
</p>
|
|
<p>
|
|
Copy with <kbd>Ctrl</kbd> + <kbd>c</kbd>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
// Display
|
|
const uuid = crypto.randomUUID();
|
|
document.getElementById('uuid').textContent = uuid;
|
|
console.log(uuid);
|
|
// on control c put uuid on clipboard
|
|
|
|
document.addEventListener('keydown', e => {
|
|
if (e.key === 'c' && e.ctrlKey) {
|
|
navigator.clipboard.writeText(uuid);
|
|
}
|
|
})
|
|
|
|
// ---- Modal logic ----
|
|
const overlay = document.getElementById('modal-overlay');
|
|
|
|
function toggleModal() {
|
|
if (overlay.style.display === 'none') {
|
|
overlay.style.display = 'flex';
|
|
} else {
|
|
overlay.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
overlay.addEventListener('click', e => {
|
|
if (e.target === overlay) hideModal();
|
|
});
|
|
document.addEventListener('keydown', e => {
|
|
if (e.key === '?') {
|
|
toggleModal();
|
|
}
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|