This commit is contained in:
Heidi
2026-05-15 00:38:23 +01:00
parent 4a0a00cbb8
commit 0f57bcdfc4
5 changed files with 158 additions and 6 deletions
+30 -2
View File
@@ -3,8 +3,36 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#ff9d00" /> <meta name="theme-color" content="#e82517" />
<title>TSS Bot</title> <meta
name="description"
content="Live TSS team leaderboards, battle logs, team profiles, uptime, and consented viewer analytics for Toothless' TSS Bot."
/>
<meta name="robots" content="index, follow" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Toothless' TSS Bot" />
<meta property="og:url" content="__PUBLIC_ORIGIN__/" />
<meta property="og:title" content="Toothless' TSS Bot" />
<meta
property="og:description"
content="Live TSS team leaderboards, battle logs, team profiles, uptime, and consented viewer analytics."
/>
<meta property="og:image" content="__PUBLIC_ORIGIN__/embed.svg" />
<meta property="og:image:type" content="image/svg+xml" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Toothless' TSS Bot" />
<meta
name="twitter:description"
content="Live TSS team leaderboards, battle logs, team profiles, uptime, and consented viewer analytics."
/>
<meta name="twitter:image" content="__PUBLIC_ORIGIN__/embed.svg" />
<link rel="icon" type="image/svg+xml" href="/embed-icon.svg" />
<title>Toothless' TSS Bot</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
+22
View File
@@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 96 96" role="img" aria-labelledby="title">
<title id="title">Toothless' TSS Bot tree icon</title>
<rect width="96" height="96" rx="18" fill="#fefde7"/>
<rect x="7" y="7" width="82" height="82" rx="14" fill="#fff2e6" stroke="#fdca9b" stroke-width="4"/>
<g shape-rendering="crispEdges">
<rect x="43" y="48" width="10" height="26" fill="#c96303"/>
<rect x="39" y="62" width="18" height="10" fill="#c96303"/>
<rect x="34" y="70" width="28" height="5" fill="#c96303"/>
<rect x="18" y="28" width="28" height="14" fill="#ed5145"/>
<rect x="28" y="18" width="28" height="15" fill="#ed5145"/>
<rect x="48" y="24" width="30" height="16" fill="#ed5145"/>
<rect x="28" y="40" width="40" height="16" fill="#ed5145"/>
<rect x="24" y="32" width="18" height="6" fill="#fdb068"/>
<rect x="34" y="22" width="18" height="6" fill="#fdb068"/>
<rect x="54" y="28" width="18" height="6" fill="#fdb068"/>
<rect x="38" y="44" width="20" height="6" fill="#fdb068"/>
<rect x="40" y="25" width="8" height="4" fill="#fee5cd"/>
<rect x="56" y="31" width="8" height="4" fill="#fee5cd"/>
<rect x="46" y="47" width="8" height="4" fill="#fee5cd"/>
<rect x="14" y="76" width="68" height="6" fill="#fdca9b"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+80
View File
@@ -0,0 +1,80 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-labelledby="title description">
<title id="title">Toothless' TSS Bot</title>
<desc id="description">A share card for Toothless' TSS Bot using the pixel tree from the home page.</desc>
<rect width="1200" height="630" fill="#fefde7"/>
<path d="M0 452 120 384l118 42 152-126 168 112 132-76 124 84 174-154 212 176v188H0Z" fill="#fcfbcf"/>
<path d="M0 498 130 430l110 42 142-92 170 102 120-54 132 66 180-112 216 128v120H0Z" fill="#f9f69f"/>
<rect x="72" y="72" width="1056" height="486" rx="28" fill="#fefde7" stroke="#fdca9b" stroke-width="6"/>
<rect x="96" y="96" width="1008" height="438" rx="18" fill="#fff2e6" opacity=".54"/>
<g transform="translate(786 88) scale(.72)" shape-rendering="crispEdges">
<rect x="0" y="0" width="500" height="420" fill="#fefde7" stroke="#fdca9b" stroke-width="6"/>
<path d="M0 372c55-16 116-12 173 3 46 12 101 20 157 4 58-17 112-10 170 5v36H0Z" fill="#fee5cd"/>
<path d="M0 394c54-10 110-8 172 6 54 12 108 10 160-4 58-15 112-10 168 4v20H0Z" fill="#fdca9b"/>
<g fill="#c96303">
<rect x="232" y="248" width="38" height="118"/>
<rect x="224" y="300" width="54" height="72"/>
<rect x="214" y="346" width="76" height="34"/>
<rect x="198" y="366" width="112" height="18"/>
<rect x="196" y="232" width="62" height="16" transform="rotate(-28 196 232)"/>
<rect x="248" y="222" width="64" height="14" transform="rotate(25 248 222)"/>
<rect x="176" y="198" width="88" height="14" transform="rotate(-46 176 198)"/>
<rect x="242" y="188" width="88" height="14" transform="rotate(42 242 188)"/>
<rect x="150" y="164" width="92" height="12" transform="rotate(-20 150 164)"/>
<rect x="270" y="154" width="98" height="12" transform="rotate(18 270 154)"/>
<rect x="212" y="120" width="82" height="12" transform="rotate(-72 212 120)"/>
<rect x="246" y="118" width="78" height="12" transform="rotate(68 246 118)"/>
</g>
<g fill="#ed5145">
<rect x="76" y="110" width="112" height="52"/>
<rect x="114" y="70" width="128" height="62"/>
<rect x="198" y="48" width="116" height="68"/>
<rect x="278" y="76" width="132" height="60"/>
<rect x="334" y="126" width="92" height="54"/>
<rect x="102" y="160" width="116" height="58"/>
<rect x="190" y="134" width="148" height="66"/>
<rect x="278" y="172" width="116" height="58"/>
</g>
<g fill="#fdb068">
<rect x="98" y="124" width="84" height="26"/>
<rect x="138" y="84" width="92" height="30"/>
<rect x="216" y="66" width="82" height="28"/>
<rect x="292" y="92" width="96" height="30"/>
<rect x="354" y="142" width="58" height="24"/>
<rect x="126" y="178" width="78" height="24"/>
<rect x="210" y="150" width="104" height="28"/>
<rect x="300" y="190" width="76" height="24"/>
</g>
<g fill="#fee5cd">
<rect x="150" y="98" width="44" height="16"/>
<rect x="238" y="76" width="38" height="16"/>
<rect x="314" y="104" width="48" height="16"/>
<rect x="230" y="160" width="48" height="16"/>
<rect x="322" y="202" width="36" height="14"/>
</g>
<g fill="#fb7b04">
<rect x="74" y="360" width="6" height="18"/>
<rect x="116" y="366" width="6" height="16"/>
<rect x="342" y="362" width="6" height="20"/>
<rect x="402" y="370" width="6" height="14"/>
<rect x="444" y="364" width="6" height="18"/>
</g>
</g>
<g transform="translate(122 128)">
<text x="0" y="36" fill="#e82517" font-family="Inter, Segoe UI, Arial, sans-serif" font-size="26" font-weight="800" letter-spacing="2">LIVE TSS INTEL</text>
<text x="0" y="132" fill="#000" font-family="Inter, Segoe UI, Arial, sans-serif" font-size="76" font-weight="900">Toothless'</text>
<text x="0" y="216" fill="#000" font-family="Inter, Segoe UI, Arial, sans-serif" font-size="76" font-weight="900">TSS Bot</text>
<text x="0" y="282" fill="#555" font-family="Inter, Segoe UI, Arial, sans-serif" font-size="30" font-weight="600">Leaderboards, battle logs, uptime, and viewer analytics.</text>
</g>
<g transform="translate(122 458)" fill="#000" font-family="Inter, Segoe UI, Arial, sans-serif" font-size="24" font-weight="800">
<rect x="0" y="-34" width="184" height="54" rx="8" fill="#fcfbcf" stroke="#fdca9b"/>
<text x="24" y="2">Teams</text>
<rect x="208" y="-34" width="214" height="54" rx="8" fill="#fcfbcf" stroke="#fdca9b"/>
<text x="232" y="2">Battle Logs</text>
<rect x="446" y="-34" width="154" height="54" rx="8" fill="#fcfbcf" stroke="#fdca9b"/>
<text x="470" y="2">Uptime</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

+24 -2
View File
@@ -793,6 +793,23 @@ function proxyRequest(req, res) {
req.pipe(proxy) req.pipe(proxy)
} }
function pagePublicOrigin(req) {
const configured = PUBLIC_ORIGIN.split(',').map((origin) => origin.trim()).filter(Boolean)[0]
if (configured) return configured.replace(/\/$/, '')
const host = req.headers['x-forwarded-host'] || req.headers.host || `localhost:${PORT}`
const proto = req.headers['x-forwarded-proto'] || (req.socket.encrypted ? 'https' : 'http')
return `${String(proto).split(',')[0].trim()}://${String(host).split(',')[0].trim()}`.replace(/\/$/, '')
}
function sendHtml(req, res, data, status = 200) {
const html = data.toString('utf8').replaceAll('__PUBLIC_ORIGIN__', pagePublicOrigin(req))
send(res, status, html, {
'content-type': mimeTypes['.html'],
'cache-control': 'no-cache',
})
}
function serveStatic(req, res) { function serveStatic(req, res) {
const requestPath = decodeURIComponent(new URL(req.url, `http://localhost:${PORT}`).pathname) const requestPath = decodeURIComponent(new URL(req.url, `http://localhost:${PORT}`).pathname)
const relativePath = requestPath === '/' ? '/index.html' : requestPath const relativePath = requestPath === '/' ? '/index.html' : requestPath
@@ -811,15 +828,20 @@ function serveStatic(req, res) {
}) })
} }
send(res, 200, indexData, { 'content-type': mimeTypes['.html'] }) sendHtml(req, res, indexData)
}) })
return return
} }
const ext = path.extname(filePath) const ext = path.extname(filePath)
if (ext === '.html') {
sendHtml(req, res, data)
return
}
send(res, 200, data, { send(res, 200, data, {
'content-type': mimeTypes[ext] || 'application/octet-stream', 'content-type': mimeTypes[ext] || 'application/octet-stream',
'cache-control': ext === '.html' ? 'no-cache' : 'public, max-age=31536000, immutable', 'cache-control': 'public, max-age=31536000, immutable',
}) })
}) })
} }
+2 -2
View File
@@ -390,7 +390,7 @@ function App() {
: route.page === 'uptime' : route.page === 'uptime'
? "Uptime | Toothless' TSS Bot" ? "Uptime | Toothless' TSS Bot"
: route.page === 'viewers' : route.page === 'viewers'
? "viewers | Toothless' TSS Bot" ? "Viewers | Toothless' TSS Bot"
: route.page === 'privacy' : route.page === 'privacy'
? "Privacy notice | Toothless' TSS Bot" ? "Privacy notice | Toothless' TSS Bot"
: "Toothless' TSS Bot" : "Toothless' TSS Bot"
@@ -959,7 +959,7 @@ function Footer({ navigate }) {
onClick={() => navigate('/viewers')} onClick={() => navigate('/viewers')}
type="button" type="button"
> >
viewers Viewers
</button> </button>
<button <button
className="w-fit font-semibold text-fury-cyan transition hover:text-text" className="w-fit font-semibold text-fury-cyan transition hover:text-text"