262 lines
7.2 KiB
HTML
262 lines
7.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Ninji Ticker Link-Generator</title>
|
|
<style>
|
|
:root {
|
|
--bg-color: #0f172a;
|
|
--card-bg: #1e293b;
|
|
--text-main: #f8fafc;
|
|
--text-muted: #94a3b8;
|
|
--accent: #38bdf8;
|
|
--border-color: #334155;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--bg-color);
|
|
color: var(--text-main);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.generator-container {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 30px;
|
|
width: 100%;
|
|
max-width: 600px;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 20px;
|
|
color: var(--accent);
|
|
text-align: center;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
label {
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
input[type="text"],
|
|
input[type="number"],
|
|
select {
|
|
background: #0f172a;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
color: var(--text-main);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
input[type="color"] {
|
|
-webkit-appearance: none;
|
|
border: none;
|
|
width: 100%;
|
|
height: 40px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
background: none;
|
|
}
|
|
|
|
input[type="color"]::-webkit-color-swatch-wrapper {
|
|
padding: 0;
|
|
}
|
|
|
|
input[type="color"]::-webkit-color-swatch {
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.checkbox-group {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
input[type="checkbox"] {
|
|
width: 18px;
|
|
height: 18px;
|
|
accent-color: var(--accent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.checkbox-group label {
|
|
color: var(--text-main);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.result-section {
|
|
margin-top: 25px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid var(--border-color);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.result-box {
|
|
background: #0f172a;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
word-break: break-all;
|
|
font-family: monospace;
|
|
font-size: 0.85rem;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.button-row {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
button {
|
|
flex: 1;
|
|
background: var(--accent);
|
|
color: #0f172a;
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
button:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
button.secondary {
|
|
background: #334155;
|
|
color: var(--text-main);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="generator-container">
|
|
<h1>Ninji Ticker Link-Generator</h1>
|
|
|
|
<div class="form-group">
|
|
<label for="user">Twitch/Player Username</label>
|
|
<input type="text" id="user" value="kaizobrothers" oninput="generateLink()">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="speed">Speed (Basis-Sekunden für 10 Karten)</label>
|
|
<input type="number" id="speed" value="200" min="5" max="1000" oninput="generateLink()">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="bg">Hintergrundfarbe (Chroma-Key)</label>
|
|
<input type="color" id="bg" value="#00ff00" oninput="generateLink()">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="framecolor">Rahmenfarbe (Highlight)</label>
|
|
<input type="color" id="framecolor" value="#000000" oninput="generateLink()">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="fix">User fixieren</label>
|
|
<select id="fix" onchange="generateLink()">
|
|
<option value="">Nicht fixieren (ganz normal scrollen)</option>
|
|
<option value="left">Links fixieren</option>
|
|
<option value="right">Rechts fixieren</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="fixdivision">Divisions-Karte fixieren</label>
|
|
<select id="fixdivision" onchange="generateLink()">
|
|
<option value="">Nicht fixieren (mitscrollen)</option>
|
|
<option value="left">Links fixieren</option>
|
|
<option value="right">Rechts fixieren</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group checkbox-group">
|
|
<input type="checkbox" id="showdivision" onchange="generateLink()">
|
|
<label for="showdivision">Divisions-Icon bei jeder Karte anzeigen</label>
|
|
</div>
|
|
|
|
<div class="result-section">
|
|
<label>Generierter Link:</label>
|
|
<div class="result-box" id="resultLink"></div>
|
|
<div class="button-row">
|
|
<button onclick="copyLink()">Link kopieren</button>
|
|
<button class="secondary" onclick="openLink()">Testen (Öffnen)</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function generateLink() {
|
|
const user = document.getElementById('user').value.trim();
|
|
const speed = document.getElementById('speed').value;
|
|
const bg = document.getElementById('bg').value.replace('#', '');
|
|
const framecolor = document.getElementById('framecolor').value.replace('#', '');
|
|
const fix = document.getElementById('fix').value;
|
|
const fixdivision = document.getElementById('fixdivision').value;
|
|
const showdivision = document.getElementById('showdivision').checked;
|
|
|
|
// Basis-URL zur ninjiclassic.html im selben Verzeichnis ermitteln
|
|
const baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('/') + 1) + 'ninjiclassic.html';
|
|
|
|
const params = new URLSearchParams();
|
|
if (user) params.append('user', user);
|
|
if (speed && speed !== '240') params.append('speed', speed);
|
|
if (bg && bg !== '00ff00') params.append('bg', bg);
|
|
if (framecolor && framecolor !== '000000') params.append('framecolor', framecolor);
|
|
if (fix) params.append('fix', fix);
|
|
if (fixdivision) params.append('fixdivision', fixdivision);
|
|
if (showdivision) params.append('showdivision', 'true');
|
|
|
|
const queryString = params.toString();
|
|
const finalLink = baseUrl + (queryString ? '?' + queryString : '');
|
|
|
|
document.getElementById('resultLink').innerText = finalLink;
|
|
}
|
|
|
|
function copyLink() {
|
|
const linkText = document.getElementById('resultLink').innerText;
|
|
navigator.clipboard.writeText(linkText).then(() => {
|
|
alert('Link in die Zwischenablage kopiert!');
|
|
});
|
|
}
|
|
|
|
function openLink() {
|
|
const linkText = document.getElementById('resultLink').innerText;
|
|
window.open(linkText, '_blank');
|
|
}
|
|
|
|
// Direkt beim Laden ausführen
|
|
generateLink();
|
|
</script>
|
|
</body>
|
|
</html> |