adds html rich preview
All checks were successful
CI / deploy (push) Successful in 5m15s
CI / deploy (pull_request) Successful in 10m10s

This commit is contained in:
Arindy 2025-02-16 12:56:33 +01:00
parent fbfd23d335
commit 09473f627b
3 changed files with 26 additions and 0 deletions

View File

@ -165,6 +165,13 @@ function hideSnackbar() {
}
document.addEventListener("DOMContentLoaded", async () => {
document.querySelector('meta[property="og:url"]').setAttribute("content", url());
document.querySelector('meta[property="twitter:url"]').setAttribute("content", url());
document.querySelector('meta[property="og:image"]').setAttribute("content", url() + '/rich.png');
document.querySelector('meta[name="twitter:image"]').setAttribute("content", url() + '/rich.png');
document.querySelector('meta[property="twitter:domain"]').setAttribute("content", window.location.hostname);
if (localStorage.getItem('last-name') && localStorage.getItem('last-room')) {
document.getElementById('name').value = localStorage.getItem('last-name');
document.getElementById('room').value = localStorage.getItem('last-room');

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

View File

@ -3,6 +3,25 @@
<head>
<meta charset="UTF-8">
<title>Dice-Tower</title>
<meta property="og:title" content="Dice-Tower">
<meta name="twitter:title" content="Dice-Tower">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta property="og:url" content="https://dice-tower.com">
<meta property="twitter:url" content="https://dice-tower.com">
<meta property="twitter:domain" content="dice-tower.com">
<meta property="og:image" content="https://dice-tower.com/rich.png">
<meta name="twitter:image" content="https://dice-tower.com/rich.png">
<meta name="description" content="
Easy to use online dice rolling with customizable overlays.
">
<link rel="stylesheet" href="/vendor/w3css/4/w3.css">
<link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome.css">
<link rel="stylesheet" href="/vendor/font-awesome/css/all.css">