Compare commits
18 Commits
63298248c7
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01759611fd | ||
|
|
cc3a5984e8 | ||
|
|
ae5c506154 | ||
| 6151379f81 | |||
|
|
7ffb9dcac4 | ||
|
|
db73585839 | ||
|
|
678e4d5089 | ||
|
|
5673154e69 | ||
| 624ef64c5e | |||
| 74db15fc24 | |||
| 0477eb207e | |||
|
|
5d1549e90e | ||
| bd2fea40fc | |||
| be159bcbf0 | |||
|
|
b1ffd825db | ||
|
|
02940021e2 | ||
| 374be205b7 | |||
| 2e3c937b99 |
@@ -1,172 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Crossword Puzzle</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #000;
|
||||
margin-bottom: 20px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.grid-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.crossword-grid {
|
||||
display: inline-grid;
|
||||
gap: 0;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 1px solid #000;
|
||||
background: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cell.blocked {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.cell input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cell-number {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 2px;
|
||||
font-size: 8px;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.clues {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 30px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.clues-section h3 {
|
||||
font-size: 18px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 2px solid #000;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.clue {
|
||||
padding: 5px 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Crossword Puzzle - 21×21</h1>
|
||||
|
||||
<div class="grid-wrapper">
|
||||
<div class="crossword-grid" id="grid"></div>
|
||||
</div>
|
||||
|
||||
<div class="clues">
|
||||
<div class="clues-section">
|
||||
<h3>Across</h3>
|
||||
<div id="cluesAcross">
|
||||
</div>
|
||||
</div>
|
||||
<div class="clues-section">
|
||||
<h3>Down</h3>
|
||||
<div id="cluesDown">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const GRID_SIZE = 21;
|
||||
|
||||
function createGrid() {
|
||||
const grid = document.getElementById('grid');
|
||||
grid.style.gridTemplateColumns = `repeat(${GRID_SIZE}, 30px)`;
|
||||
|
||||
let clueNumber = 1;
|
||||
|
||||
for (let r = 0; r < GRID_SIZE; r++) {
|
||||
for (let c = 0; c < GRID_SIZE; c++) {
|
||||
const cell = document.createElement('div');
|
||||
cell.className = 'cell';
|
||||
|
||||
const isBlocked = (r + c) % 7 === 0 && r % 3 === 0;
|
||||
|
||||
if (isBlocked) {
|
||||
cell.classList.add('blocked');
|
||||
} else {
|
||||
const needsNumber = (c === 0 || (c > 0 && isBlackSquare(r, c-1))) ||
|
||||
(r === 0 || (r > 0 && isBlackSquare(r-1, c)));
|
||||
|
||||
if (needsNumber && (c < GRID_SIZE-1 || r < GRID_SIZE-1)) {
|
||||
const num = document.createElement('span');
|
||||
num.className = 'cell-number';
|
||||
num.textContent = clueNumber++;
|
||||
cell.appendChild(num);
|
||||
}
|
||||
|
||||
const input = document.createElement('input');
|
||||
input.maxLength = 1;
|
||||
cell.appendChild(input);
|
||||
}
|
||||
|
||||
grid.appendChild(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isBlackSquare(r, c) {
|
||||
return (r + c) % 7 === 0 && r % 3 === 0;
|
||||
}
|
||||
|
||||
createGrid();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
285
MainPage/Abdelaziz/kreuzwortratsel.html
Normal file
285
MainPage/Abdelaziz/kreuzwortratsel.html
Normal file
@@ -0,0 +1,285 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Rätsel</title>
|
||||
<style>
|
||||
|
||||
body { font-family: Arial, sans-serif; font-size: 13px; padding: 10px; }
|
||||
h1 { font-size: 15px; margin-bottom: 6px; }
|
||||
|
||||
.tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
|
||||
.tab-group { font-size: 10px; color: #666; padding: 4px 6px; }
|
||||
.tab { padding: 4px 10px; border: 1px solid #999; background: #f0f0f0; cursor: pointer; font-size: 12px; border-radius: 3px; }
|
||||
.tab.active { background: #000; color: #fff; border-color: #000; }
|
||||
|
||||
.richtung { display: flex; gap: 4px; margin-bottom: 6px; }
|
||||
.rbtn { padding: 3px 9px; border: 1px solid #aaa; background: #f5f5f5; cursor: pointer; font-size: 11px; }
|
||||
.rbtn.active { background: #444; color: #fff; }
|
||||
.layout { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
|
||||
|
||||
.grid { display: grid; border-top: 2px solid #000; border-left: 2px solid #000; }
|
||||
.z {
|
||||
width: 26px; height: 26px;
|
||||
border-right: 1px solid #bbb; border-bottom: 1px solid #bbb;
|
||||
position: relative;
|
||||
}
|
||||
.z.er { border-right: 2px solid #000; }
|
||||
.z.eb { border-bottom: 2px solid #000; }
|
||||
.z.schwarz { background: #000; }
|
||||
.z.markiert { background: #c5ddf7; }
|
||||
.z.aktiv { background: #3a6fd8; }
|
||||
.z.aktiv input, .z.aktiv .nr { color: #fff; }
|
||||
.z.richtig { background: #b8f0c8 !important; }
|
||||
.z.falsch { background: #f0b8b8 !important; }
|
||||
|
||||
.z input {
|
||||
width: 100%; height: 100%;
|
||||
border: none; background: transparent;
|
||||
font-size: 11px; font-weight: bold;
|
||||
text-align: center; text-transform: uppercase;
|
||||
outline: none; padding-top: 4px; caret-color: transparent;
|
||||
}
|
||||
|
||||
.nr { position: absolute; top: 1px; left: 2px; font-size: 6px; pointer-events: none; color: #666; }
|
||||
|
||||
.knopfe { display: flex; gap: 5px; margin-top: 7px; }
|
||||
.k { padding: 4px 10px; border: 1px solid #555; background: #fff; cursor: pointer; font-size: 11px; }
|
||||
.k:hover { background: #eee; }
|
||||
.k.los { background: #000; color: #fff; border-color: #000; }
|
||||
#info { margin-top: 5px; font-size: 12px; font-weight: bold; min-height: 14px; }
|
||||
.gut { color: green; }
|
||||
.nein { color: #c00; }
|
||||
|
||||
.hinweise { max-width: 340px; flex: 1; max-height: 560px; overflow-y: auto; }
|
||||
.hw { font-size: 11px; font-weight: bold; border-bottom: 1px solid #000; margin: 8px 0 3px; text-transform: uppercase; }
|
||||
.h { display: flex; gap: 4px; font-size: 11px; line-height: 1.5; padding: 1px 3px; }
|
||||
.hnum { min-width: 20px; flex-shrink: 0; font-weight: bold; color: #666; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rätsel</h1>
|
||||
<div class="tabs">
|
||||
<span class="tab-group">Deutsch:</span>
|
||||
<button class="tab active" onclick="lade(0)">Tiere</button>
|
||||
<button class="tab" onclick="lade(1)">Essen</button>
|
||||
<button class="tab" onclick="lade(2)">Europa</button>
|
||||
<button class="tab" onclick="lade(3)">Körper</button>
|
||||
<span class="tab-group">English:</span>
|
||||
<button class="tab" onclick="lade(4)">Puzzle A</button>
|
||||
<button class="tab" onclick="lade(5)">Puzzle B</button>
|
||||
</div>
|
||||
<div class="layout">
|
||||
<div>
|
||||
<div class="richtung">
|
||||
<button class="rbtn active" id="btnQ" onclick="setDir('across')">→ Waagerecht</button>
|
||||
<button class="rbtn" id="btnW" onclick="setDir('down')">↓ Senkrecht</button>
|
||||
</div>
|
||||
<div class="grid" id="grid"></div>
|
||||
<div class="knopfe">
|
||||
<button class="k los" onclick="pruefen()">Prüfen / Check</button>
|
||||
<button class="k" onclick="loesung()">Lösung</button>
|
||||
<button class="k" onclick="loeschen()">✕ Löschen</button>
|
||||
</div>
|
||||
<div id="info"></div>
|
||||
</div>
|
||||
<div class="hinweise" id="hinweise"></div>
|
||||
</div>
|
||||
<script>
|
||||
let richtung='across', ar=-1, ac=-1;
|
||||
let felder=[], nummern={across:{},down:{}};
|
||||
let lsg, ha, hd;
|
||||
let GR=13;
|
||||
|
||||
const RAETSEL=[
|
||||
{gr:13,titel:'Tiere',
|
||||
lsg:{"0,0":"F","0,1":"U","0,2":"C","0,3":"H","0,4":"S","0,7":"Z","0,8":"E","0,9":"B","0,10":"R","0,11":"A","1,0":"A","1,1":"H","1,4":"T","2,0":"L","2,1":"U","2,2":"F","2,3":"T","2,4":"O","3,0":"K","3,1":"A","3,2":"T","3,3":"E","3,4":"R","4,0":"E","4,1":"L","4,2":"C","4,3":"H","4,4":"C","5,4":"H","5,5":"U","5,6":"N","5,7":"D","6,6":"R","6,7":"A","6,8":"B","6,9":"E","7,5":"L","7,6":"A","7,7":"C","7,8":"H","7,9":"S","8,7":"H","8,8":"A","8,9":"D","8,10":"L","8,11":"E","8,12":"R","9,4":"M","9,5":"A","9,6":"U","9,7":"S","9,8":"H","10,6":"G","10,7":"A","10,8":"N","10,9":"S","11,8":"W","11,9":"O","11,10":"L","11,11":"F"},
|
||||
ha:{1:"Rotbraunes Tier mit buschigem Schwanz (5)",4:"Afrikanisches Tier mit Streifen (5)",6:"Was Vögel zum Fliegen brauchen (4)",9:"Männliche Katze (5)",10:"Großes Tier aus dem Norden — wie ein Hirsch (4)",11:"Bester Freund des Menschen (4)",14:"Schwarzer, kluger Vogel (4)",17:"Rosa Fisch aus dem Fluss (5)",19:"Kleines graues Nagetier (4)",21:"Weißer Hausvogel, gackert (4)",23:"Wilder Vorfahre des Hundes (4)"},
|
||||
hd:{1:"Greifvogel, Wappentier Deutschlands (5)",2:"Nachtvogel mit großen Augen (3)",3:"Großer Zugvogel — nistet auf Dächern (6)",13:"Flaches, stacheliges Tier — gräbt Baue (5)"}},
|
||||
|
||||
{gr:13,titel:'Essen',
|
||||
lsg:{"0,3":"W","0,4":"A","0,5":"S","0,6":"S","0,7":"E","0,8":"R","1,3":"E","1,4":"P","1,5":"A","1,8":"E","1,9":"S","1,10":"S","1,11":"E","1,12":"N","2,3":"I","2,4":"F","2,5":"H","2,7":"M","2,8":"I","2,9":"L","2,10":"C","2,11":"H","2,12":"U","3,3":"N","3,4":"E","3,5":"N","3,8":"S","3,9":"I","3,12":"S","4,4":"L","4,5":"E","4,6":"B","4,7":"E","4,8":"R","4,9":"N","4,12":"S","5,6":"I","5,7":"R","5,9":"S","6,0":"S","6,1":"A","6,2":"L","6,3":"Z","6,6":"R","6,7":"B","6,9":"E","7,0":"E","7,1":"N","7,2":"T","7,3":"E","7,6":"N","7,7":"S","8,0":"N","8,1":"I","8,6":"E","8,7":"E","9,0":"F","9,1":"S","10,0":"F","10,1":"I","10,2":"S","10,3":"C","10,4":"H"},
|
||||
ha:{1:"Das wichtigste Getränk — klar, keine Kalorien (6)",6:"Mahlzeit haben — auch eine Stadt im Ruhrgebiet (5)",12:"Weißes Getränk von der Kuh (5)",15:"Organ im Körper — auch gebraten in der Pfanne (5)",19:"Gewürz aus dem Meer (4)",24:"Wasservogel — beliebt zu Weihnachten (4)",29:"Lebt im Wasser, hat Schuppen (5)"},
|
||||
hd:{1:"Rotes oder weißes Getränk aus Trauben (4)",2:"Frucht — täglich gesund (5)",3:"Weiße Sauce für Desserts (5)",4:"Asiatische Beilage zu Curry (4)",10:"Harte Frucht vom Baum (4)",16:"Runde gelbe Frucht — hält den Arzt fern (5)",17:"Kleine grüne Hülsenfrucht (5)",19:"Gelbes, scharfes Gewürz auf Würstchen (4)",20:"Orientalisches Gewürz (4)"}},
|
||||
|
||||
{gr:13,titel:'Europa',
|
||||
lsg:{"0,1":"P","0,2":"A","0,3":"R","0,4":"I","0,5":"S","0,7":"B","0,8":"E","0,9":"R","0,10":"L","0,11":"I","0,12":"N","1,1":"R","1,3":"H","1,5":"O","1,9":"E","1,12":"I","2,0":"H","2,1":"A","2,2":"I","2,3":"E","2,5":"F","2,9":"G","2,12":"L","3,1":"G","3,3":"I","3,5":"I","3,9":"E","4,3":"N","4,5":"A","4,6":"L","4,7":"P","4,8":"E","4,9":"N","5,6":"E","5,7":"I","5,8":"L","5,9":"O","5,10":"D","5,11":"Z","6,6":"C","6,7":"S","6,8":"B","6,9":"R","7,6":"H","7,7":"A","7,8":"E","7,9":"D","8,0":"E","8,1":"U","8,2":"R","8,3":"O","8,4":"P","8,5":"A","8,9":"E","9,0":"S","9,2":"U","9,9":"N","10,0":"S","10,1":"C","10,2":"H","10,3":"W","10,4":"E","10,5":"I","10,6":"Z","11,0":"E","11,2":"R","11,3":"H","11,4":"O","11,5":"N","11,6":"E","12,0":"N","12,1":"I","12,2":"Z","12,3":"Z","12,4":"A"},
|
||||
ha:{1:"Hauptstadt Frankreichs (5)",4:"Hauptstadt Deutschlands (6)",7:"Haifische (4)",8:"Gebirge zwischen Deutschland, Österreich und Schweiz (5)",15:"Unser Kontinent (6)",17:"Kleines Alpenland — Uhren und Schokolade (7)",22:"Großer Fluss in Frankreich (5)",23:"Französische Riviera-Stadt (5)"},
|
||||
hd:{1:"Hauptstadt Tschechiens (4)",2:"Wichtiger Fluss durch Köln (5)",3:"Hauptstadt Bulgariens (5)",5:"Wasser, das vom Himmel fällt (5)",6:"Längster Fluss der Welt (3)",9:"Fluss in Bayern (4)",10:"Ital. Stadt mit schiefem Turm (4)",11:"Fluss in Deutschland — mündet bei Hamburg (4)",15:"Stadt im Ruhrgebiet (5)",16:"Industriegebiet in Westdeutschland (4)"}},
|
||||
|
||||
{gr:13,titel:'Körper',
|
||||
lsg:{"0,3":"K","0,4":"R","0,5":"A","0,6":"F","0,7":"T","1,4":"K","1,5":"N","1,6":"I","1,7":"E","2,4":"L","2,5":"U","2,6":"N","2,7":"G","2,8":"E","3,4":"M","3,5":"A","3,6":"G","3,7":"E","3,8":"N","4,4":"N","4,5":"I","4,6":"E","4,7":"R","4,8":"E","5,4":"H","5,5":"E","5,6":"R","5,7":"Z","5,8":"R","6,5":"H","6,6":"U","6,7":"N","6,8":"G","6,9":"E","6,10":"R","7,0":"B","7,1":"L","7,2":"U","7,3":"T","7,8":"I","8,6":"F","8,7":"I","8,8":"E","8,9":"B","8,10":"E","8,11":"R","9,0":"A","9,1":"R","9,2":"Z","9,3":"T","10,0":"S","10,1":"C","10,2":"H","10,3":"M","10,4":"E","10,5":"R","10,6":"Z","11,0":"A","11,1":"T","11,2":"E","11,3":"M","12,0":"S","12,1":"C","12,2":"H","12,3":"L","12,4":"A","12,5":"F"},
|
||||
ha:{1:"Körperliche Stärke (5)",6:"Gelenk zwischen Ober- und Unterschenkel (4)",7:"Organ zum Atmen (5)",9:"Verdauungsorgan (5)",10:"Organ zur Blutfilterung (5)",11:"Pumpt das Blut (4)",12:"Wenn der Magen leer ist (6)",13:"Rote Flüssigkeit im Körper (4)",14:"Erhöhte Körpertemperatur (6)",15:"Mediziner, Doktor (4)",19:"Körperlicher Schmerz (7)",20:"Einatmen und ausatmen (4)",21:"Nachtruhe, Schlummer (6)"},
|
||||
hd:{4:"Körperteil mit fünf Gliedern an der Hand (6)",8:"Körperliche Kraft und Vitalität (7)"}},
|
||||
|
||||
{gr:15,titel:'Puzzle A',
|
||||
lsg:{"0,0":"B","0,1":"O","0,2":"Z","0,3":"O","0,4":"S","0,6":"A","0,7":"B","0,8":"D","0,9":"U","0,10":"L","0,12":"R","0,13":"A","0,14":"G","1,0":"I","1,1":"R","1,2":"A","1,3":"T","1,4":"E","1,6":"W","1,7":"E","1,8":"E","1,9":"P","1,10":"S","1,12":"E","1,13":"R","1,14":"A","2,0":"B","2,1":"A","2,2":"C","2,3":"H","2,4":"E","2,5":"L","2,6":"O","2,7":"R","2,8":"P","2,9":"A","2,10":"D","2,12":"C","2,13":"E","2,14":"L","3,1":"E","3,2":"Y","3,3":"E","3,4":"L","3,5":"E","3,6":"T","3,11":"B","3,12":"O","3,13":"N","3,14":"A","4,0":"O","4,1":"U","4,2":"T","4,3":"R","4,4":"O","4,5":"S","4,7":"T","4,8":"H","4,9":"E","4,10":"L","4,11":"O","4,12":"R","4,13":"A","4,14":"X","5,0":"U","5,1":"S","5,2":"A","5,4":"U","5,5":"S","5,6":"B","5,9":"W","5,10":"O","5,11":"O","5,12":"D","5,13":"S","5,14":"Y","6,0":"R","6,1":"E","6,2":"R","6,3":"A","6,4":"N","6,6":"R","6,7":"A","6,8":"C","6,9":"E","6,10":"B","6,11":"Y","7,1":"R","7,2":"O","7,3":"L","7,4":"E","7,5":"R","7,6":"E","7,7":"V","7,8":"E","7,9":"R","7,10":"S","7,11":"A","7,12":"L","7,13":"S","8,2":"I","8,3":"V","8,4":"O","8,5":"T","8,6":"E","8,7":"D","8,10":"T","8,11":"H","8,12":"E","8,13":"I","8,14":"R","9,0":"C","9,1":"H","9,2":"A","9,3":"S","9,4":"E","9,5":"D","9,7":"E","9,8":"S","9,9":"E","9,12":"F","9,13":"R","9,14":"O","10,0":"D","10,1":"E","10,2":"L","10,3":"O","10,4":"R","10,5":"E","10,6":"A","10,7":"N","10,9":"O","10,10":"R","10,11":"A","10,12":"T","10,13":"E","10,14":"D","11,0":"C","11,1":"A","11,2":"I","11,3":"N","11,5":"N","11,6":"I","11,7":"G","11,8":"H","11,9":"T","11,10":"S","12,0":"A","12,1":"T","12,2":"E","12,4":"N","12,5":"A","12,6":"V","12,7":"E","12,8":"L","12,9":"O","12,10":"R","12,11":"A","12,12":"N","12,13":"G","12,14":"E","13,0":"S","13,1":"U","13,2":"N","13,4":"T","13,5":"W","13,6":"I","13,7":"C","13,8":"E","13,10":"A","13,11":"D","13,12":"O","13,13":"R","13,14":"N","14,0":"E","14,1":"P","14,2":"S","14,4":"H","14,5":"E","14,6":"L","14,7":"E","14,8":"N","14,10":"P","14,11":"O","14,12":"S","14,13":"E","14,14":"D"},
|
||||
ha:{1:"Silly people; clowns (5)",6:"Common Arabic/Turkish man's name (5)",11:"Torn piece of cloth (3)",14:"Very angry (5)",15:"Cries (5)",16:"Historical period (3)",17:"Flat shared by unmarried men (11)",19:"Single frame of animation film (3)",20:"Small hole in fabric for a lace or cord (6)",21:"Latin: ___ fide — in good faith (4)",22:"Final segments of a show — plural (6)",23:"Dr. Seuss character who speaks for the trees (8)",26:"Country whose capital is Washington (3)",27:"Universal Serial Bus — cable standard (3)",29:"Having a natural, forest-like feel (6)",30:"Ran again, as an election (5)",32:"To pass a competitor quickly (6)",35:"When villain becomes hero and vice versa (13)",39:"Cast a ballot — two words merged (6)",40:"Belonging to them (5)",42:"Pursued (6)",44:"East-southeast abbr. (3)",46:"Short round hairstyle (3)",47:"Futuristic sports car from a 1985 time-travel film (8)",49:"Spoke formally at length (6)",51:"Biblical first murderer (4)",52:"Hours of darkness — plural (6)",54:"Consumed food — past tense (3)",55:"Round citrus fruit with a belly button (11)",60:"Star at the center of our solar system (3)",61:"Two times (5)",62:"To decorate or add ornament (5)",63:"Greek letters — plural (3)",64:"Woman's name — also a famous Greek queen (5)",65:"Stood still for a photo (5)"},
|
||||
hd:{1:"Curved part above the handle of a fishing rod (3)",2:"Seats in a theatre — plural (5)",3:"Large spiral galaxy visible from Earth (6)",4:"Belonging to that man (5)",5:"Old-fashioned word for what (4)",6:"Liquid in a bird's stomach (4)",7:"Drink of beer (4)",8:"Put down; set aside (4)",9:"Ripped open (4)",10:"Hallucinogenic drug abbr. (3)",11:"Written notes of a performance (6)",12:"Open spaces for public events — plural (6)",13:"Spiral shape — also a type of galaxy (6)",18:"Less than more (4)",21:"Enthusiastic cheer at celebrations (6)",22:"Pronoun for a group you belong to (3)",24:"Water-heating vessel with a spout (4)",25:"A freshwater fish dish (5)",28:"A type of soft cheese (4)",31:"A Scandinavian man's name (4)",33:"Another word for revenge (9)",34:"Two-letter word for a race at sea (2)",36:"Moved quickly past something (4)",37:"Departed; exited (4)",38:"One who sits on a throne (4)",41:"A thin stick or wand (3)",42:"Compact disc holder (6)",43:"To warm up; raise temperature (6)",45:"Musical note — doh, re, mi, ___ (4)",48:"Relating to the city (5)",50:"Moves quickly; runs fast (5)",53:"Abbreviation for a hill in a name (4)",55:"Not even the smallest amount (3)",56:"Fuss or commotion (3)",57:"Plural of no (3)",58:"Postgraduate degree abbr. (3)",59:"Final part; conclusion (3)"}},
|
||||
|
||||
{gr:15,titel:'Puzzle B',
|
||||
lsg:{"0,0":"W","0,1":"O","0,2":"R","0,3":"T","0,4":"H","0,6":"A","0,7":"S","0,8":"H","0,10":"H","0,11":"A","0,12":"L","0,13":"O","1,0":"E","1,1":"N","1,2":"N","1,3":"U","1,4":"I","1,6":"T","1,7":"I","1,8":"E","1,10":"P","1,11":"A","1,12":"R","1,13":"E","1,14":"R","2,0":"B","2,1":"O","2,2":"A","2,3":"R","2,4":"D","2,5":"R","2,6":"O","2,7":"O","2,8":"M","2,10":"A","2,11":"I","2,12":"R","2,13":"E","2,14":"D","3,3":"K","3,4":"E","3,5":"A","3,6":"N","3,7":"U","3,9":"A","3,10":"T","3,11":"T","3,12":"I","3,13":"R","3,14":"E","4,0":"M","4,1":"R","4,2":"T","4,4":"T","4,5":"A","4,6":"X","4,7":"I","4,8":"D","4,9":"R","4,10":"I","4,11":"V","4,12":"E","4,13":"R","5,0":"C","5,1":"O","5,2":"U","5,3":"N","5,4":"S","5,5":"E","5,6":"L","5,8":"G","5,9":"O","5,10":"O","5,12":"E","5,13":"D","5,14":"S","6,0":"A","6,1":"S","6,2":"S","6,3":"E","6,4":"T","6,7":"N","6,8":"O","6,9":"B","6,10":"L","6,11":"E","7,0":"T","7,1":"A","7,2":"K","7,3":"E","7,4":"O","7,5":"F","7,6":"F","7,7":"R","7,8":"O","7,9":"M","7,10":"W","7,11":"O","7,12":"R","7,13":"K","8,4":"D","8,5":"W","8,6":"E","8,7":"L","8,8":"L","8,10":"A","8,11":"A","8,12":"R","8,13":"O","8,14":"N","9,0":"E","9,1":"B","9,2":"B","9,4":"A","9,5":"T","9,6":"A","9,8":"P","9,9":"E","9,10":"N","9,11":"N","9,12":"A","9,13":"M","9,14":"E","10,0":"F","10,1":"L","10,2":"Y","10,3":"S","10,4":"W","10,5":"A","10,6":"T","10,7":"T","10,8":"E","10,9":"R","10,11":"L","10,12":"E","10,13":"E","11,0":"F","11,1":"I","11,2":"L","11,3":"I","11,4":"A","11,5":"L","11,7":"B","11,8":"R","11,9":"I","11,10":"C","11,11":"E","12,0":"E","12,1":"M","12,2":"I","12,3":"L","12,4":"Y","12,6":"T","12,7":"O","12,8":"U","12,9":"C","12,10":"H","12,11":"D","12,12":"O","12,13":"W","12,14":"N","13,0":"T","13,1":"E","13,2":"N","13,3":"T","13,4":"S","13,6":"I","13,7":"N","13,8":"S","13,10":"I","13,11":"G","13,12":"L","13,13":"O","13,14":"O","14,0":"E","14,1":"Y","14,2":"E","14,3":"S","14,6":"S","14,7":"E","14,8":"E","14,10":"C","14,11":"E","14,12":"D","14,13":"E","14,14":"D"},
|
||||
ha:{1:"Monetary value of something (5)",6:"Grey powder left after burning (3)",9:"Ring of light around a head in religious art (4)",13:"Deep feeling of boredom and emptiness (5)",14:"To bind or fasten together (3)",15:"Tool that peels vegetables (5)",17:"Main meeting room in a company (9)",19:"Broadcast on TV or radio (5)",20:"First name of actor known for action films set in Hawaii (5)",21:"Formal clothing for an event (6)",22:"Title for a married man — abbr. (3)",25:"A cab driver (10)",27:"Lawyer who gives advice (7)",29:"A sticky, slimy substance (3)",30:"Med school graduates — abbr. plural (3)",31:"Something of financial value on a balance sheet (5)",32:"Dignified and admirable in character (5)",34:"To take leave from work — three words merged (14)",39:"To live in a place; reside (5)",40:"Male name — also the first human in the Bible (5)",42:"The ocean's withdrawal from shore (3)",45:"Informal greeting — also a place to drink (3)",46:"A writer's false name (7)",48:"Flat tool used to kill flies (10)",51:"A name — also a compass point (3)",52:"Relating to family bonds (6)",53:"Woman's name — also French for price (5)",55:"Common English woman's name (5)",56:"In football: carrying ball into end zone (9)",60:"Small camping shelters — plural (5)",61:"Prepositions: within, inside — plural (3)",62:"Dome-shaped Inuit snow shelter (5)",63:"Organs of sight — plural (4)",64:"To look at; observe (3)",65:"Transferred ownership formally (5)"},
|
||||
hd:{1:"A spider's creation (3)",2:"Short musical syllable (3)",3:"Ribonucleic acid abbr. (3)",4:"Citizen of a Central Asian country between Russia and China (4)",5:"To conceal; go into hiding (7)",6:"To make up for a wrongdoing (5)",7:"Signs or indications — plural (5)",8:"Head covering (3)",9:"Outdoor relaxing space with plants (6)",10:"Ability to fly; a plane journey (6)",11:"A moving staircase (9)",12:"Person who prepares articles for publication (6)",16:"A red gemstone (4)",18:"Reed instrument used in orchestras (4)",21:"Large ocean creature (4)",22:"Med school admission test abbr. (4)",23:"Female name — also a dew-covered flower (4)",24:"Elephant's long tooth (4)",28:"Particle with a negative charge abbr. (3)",32:"Thin pieces of wood for writing (3)",33:"Part of a plant between root and leaf (9)",35:"A clever physical trick (4)",36:"To accomplish something (4)",37:"Back part of a shoe (4)",38:"Lines forming the letter K (4)",41:"Overused and stale — past tense (6)",42:"British exclamation of surprise (6)",43:"Text of a newspaper article (6)",47:"Biblical king of Israel (4)",49:"Deposits of fine earth left by water (5)",50:"A cut of beef with a bone (5)",54:"Stylish and elegant (4)",56:"It is — contracted (3)",57:"Aged; not new (3)",58:"Sadness or trouble (3)",59:"Small nod of agreement (3)"}}
|
||||
];
|
||||
|
||||
function setRichtung(d) {
|
||||
richtung = d;
|
||||
document.getElementById('btnQ').classList.toggle('active', d === 'across');
|
||||
document.getElementById('btnW').classList.toggle('active', d === 'down');
|
||||
}
|
||||
|
||||
function lade(idx) {
|
||||
document.querySelectorAll('.tab').forEach((b,i) => b.classList.toggle('active', i === idx));
|
||||
const p = RAETSEL[idx];
|
||||
GR = p.gr; lsg = p.lsg; ha = p.ha; hd = p.hd;
|
||||
setRichtung('across'); ar = -1; ac = -1;
|
||||
felder = Array.from({length: GR}, () => Array(GR).fill(null));
|
||||
nummern = {across: {}, down: {}};
|
||||
document.getElementById('grid').style.gridTemplateColumns = `repeat(${GR},26px)`;
|
||||
document.getElementById('info').textContent = '';
|
||||
bauGrid();
|
||||
}
|
||||
|
||||
function bauGrid() {
|
||||
const g = document.getElementById('grid');
|
||||
g.innerHTML = ''; let n = 1;
|
||||
for (let r = 0; r < GR; r++) for (let c = 0; c < GR; c++) {
|
||||
const el = document.createElement('div');
|
||||
el.className = 'z';
|
||||
if (c === GR-1) el.classList.add('er');
|
||||
if (r === GR-1) el.classList.add('eb');
|
||||
const k = `${r},${c}`;
|
||||
if (!lsg[k]) {
|
||||
el.classList.add('schwarz'); felder[r][c] = {bl: true, el};
|
||||
} else {
|
||||
const sa = (c===0 || !lsg[`${r},${c-1}`]) && lsg[`${r},${c+1}`];
|
||||
const sd = (r===0 || !lsg[`${r-1},${c}`]) && lsg[`${r+1},${c}`];
|
||||
if (sa || sd) {
|
||||
const sp = document.createElement('span');
|
||||
sp.className = 'nr'; sp.textContent = n;
|
||||
if (sa) nummern.across[n] = {r, c};
|
||||
if (sd) nummern.down[n] = {r, c};
|
||||
el.appendChild(sp); n++;
|
||||
}
|
||||
const inp = document.createElement('input');
|
||||
inp.type = 'text'; inp.maxLength = 1;
|
||||
inp.setAttribute('autocomplete', 'off');
|
||||
inp.setAttribute('autocorrect', 'off');
|
||||
inp.setAttribute('spellcheck', 'false');
|
||||
inp.addEventListener('focus', () => fokus(r, c));
|
||||
inp.addEventListener('click', () => klick(r, c));
|
||||
inp.addEventListener('keydown', e => taste(e, r, c));
|
||||
inp.addEventListener('input', () => eingabe(r, c));
|
||||
el.appendChild(inp);
|
||||
felder[r][c] = {bl: false, el, inp};
|
||||
}
|
||||
g.appendChild(el);
|
||||
}
|
||||
bauHinweise();
|
||||
}
|
||||
|
||||
function bauHinweise() {
|
||||
const p = document.getElementById('hinweise');
|
||||
p.innerHTML = '';
|
||||
[['across', '→ Waagerecht', ha], ['down', '↓ Senkrecht', hd]].forEach(([d, label, clues]) => {
|
||||
const h = document.createElement('div'); h.className = 'hw'; h.textContent = label; p.appendChild(h);
|
||||
const map = d === 'across' ? nummern.across : nummern.down;
|
||||
Object.keys(map).map(Number).sort((a,b) => a-b).forEach(num => {
|
||||
if (!clues[num]) return;
|
||||
const row = document.createElement('div');
|
||||
row.className = 'h'; row.id = `h${d[0]}${num}`;
|
||||
row.innerHTML = `<span class="hnum">${num}.</span><span>${clues[num]}</span>`;
|
||||
p.appendChild(row);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function wort(r, c, d) {
|
||||
const cs = [];
|
||||
if (d === 'across') { let sc=c; while(sc>0 && lsg[`${r},${sc-1}`]) sc--; while(sc<GR && lsg[`${r},${sc}`]) { cs.push([r,sc]); sc++; } }
|
||||
else { let sr=r; while(sr>0 && lsg[`${sr-1},${c}`]) sr--; while(sr<GR && lsg[`${sr},${c}`]) { cs.push([sr,c]); sr++; } }
|
||||
return cs;
|
||||
}
|
||||
|
||||
function zeigeAuswahl(r, c) {
|
||||
const wc = wort(r, c, richtung);
|
||||
for (let i=0; i<GR; i++) for (let j=0; j<GR; j++) { const d=felder[i][j]; if(d&&!d.bl) d.el.classList.remove('markiert','aktiv'); }
|
||||
wc.forEach(([wr,wc2]) => felder[wr][wc2].el.classList.add('markiert'));
|
||||
if (felder[r]?.[c] && !felder[r][c].bl) felder[r][c].el.classList.add('aktiv');
|
||||
|
||||
}
|
||||
|
||||
function fokus(r, c) { ar=r; ac=c; zeigeAuswahl(r, c); }
|
||||
function klick(r, c) {
|
||||
if (ar===r && ac===c) { setRichtung(richtung==='across' ? 'down' : 'across'); }
|
||||
ar=r; ac=c; zeigeAuswahl(r, c);
|
||||
}
|
||||
function setDir(d) { setRichtung(d); if (ar>=0) zeigeAuswahl(ar, ac); }
|
||||
|
||||
function taste(e, r, c) {
|
||||
const moves = {ArrowRight:[0,1], ArrowLeft:[0,-1], ArrowDown:[1,0], ArrowUp:[-1,0]};
|
||||
if (moves[e.key]) { e.preventDefault(); const [dr,dc]=moves[e.key]; geh(r,c,dr,dc); }
|
||||
else if (e.key==='Tab') { e.preventDefault(); naechstesWort(e.shiftKey ? -1 : 1); }
|
||||
else if (e.key==='Backspace' && felder[r][c].inp.value==='') { e.preventDefault(); zurueck(r,c); }
|
||||
}
|
||||
function eingabe(r, c) {
|
||||
const d = felder[r][c];
|
||||
if (!d.inp.value.length) return;
|
||||
d.inp.value = d.inp.value.slice(-1).toUpperCase();
|
||||
d.el.classList.remove('richtig','falsch');
|
||||
const wc = wort(r,c,richtung), idx = wc.findIndex(([wr,wc2]) => wr===r && wc2===c);
|
||||
if (idx !== -1 && idx < wc.length-1) felder[wc[idx+1][0]][wc[idx+1][1]].inp.focus();
|
||||
}
|
||||
function geh(r, c, dr, dc) {
|
||||
const nr=r+dr, nc=c+dc;
|
||||
if (nr>=0 && nr<GR && nc>=0 && nc<GR) { const d=felder[nr][nc]; if(d&&!d.bl) d.inp.focus(); }
|
||||
}
|
||||
function zurueck(r, c) {
|
||||
const wc=wort(r,c,richtung), idx=wc.findIndex(([wr,wc2]) => wr===r && wc2===c);
|
||||
if (idx > 0) { felder[wc[idx-1][0]][wc[idx-1][1]].inp.value=''; felder[wc[idx-1][0]][wc[idx-1][1]].inp.focus(); }
|
||||
}
|
||||
function naechstesWort(delta) {
|
||||
const map = richtung==='across' ? nummern.across : nummern.down;
|
||||
const keys = Object.keys(map).map(Number).sort((a,b) => a-b);
|
||||
const [sr,sc] = wort(ar,ac,richtung)[0];
|
||||
const cur = keys.find(n => map[n].r===sr && map[n].c===sc);
|
||||
const next = keys[((keys.indexOf(cur)+delta)+keys.length) % keys.length];
|
||||
setRichtung(richtung);
|
||||
felder[map[next].r][map[next].c].inp.focus();
|
||||
}
|
||||
|
||||
function alleFelder(fn) {
|
||||
for (let r=0; r<GR; r++) for (let c=0; c<GR; c++) {
|
||||
const d = felder[r][c]; if (!d || d.bl) continue;
|
||||
fn(d, r, c);
|
||||
}
|
||||
}
|
||||
function pruefen() {
|
||||
let ok=0, ng=0, em=0;
|
||||
alleFelder((d,r,c) => {
|
||||
d.el.classList.remove('richtig','falsch');
|
||||
const v=d.inp.value.toUpperCase(), s=lsg[`${r},${c}`];
|
||||
if (!v) { em++; return; }
|
||||
if (v===s) { d.el.classList.add('richtig'); ok++; } else { d.el.classList.add('falsch'); ng++; }
|
||||
});
|
||||
const inf = document.getElementById('info');
|
||||
if (ng===0 && em===0) { inf.textContent='Alles richtig! / All correct!'; inf.className='gut'; }
|
||||
else { inf.textContent=`✓ ${ok} ✗ ${ng} ? ${em}`; inf.className='nein'; }
|
||||
}
|
||||
function loesung() {
|
||||
alleFelder((d,r,c) => {
|
||||
const s = lsg[`${r},${c}`];
|
||||
if (s) { d.inp.value=s; d.el.classList.remove('falsch'); d.el.classList.add('richtig'); }
|
||||
});
|
||||
document.getElementById('info').textContent='Lösung angezeigt.'; document.getElementById('info').className='gut';
|
||||
}
|
||||
function loeschen() {
|
||||
alleFelder(d => { d.inp.value=''; d.el.classList.remove('richtig','falsch'); });
|
||||
document.getElementById('info').textContent='';
|
||||
}
|
||||
lade(0);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,7 +10,7 @@
|
||||
<h1>Team Game Platform</h1>
|
||||
|
||||
<div class="games-container">
|
||||
<div class="game-card" onclick="location.href='member1/game.html'">
|
||||
<div class="game-card" onclick="location.href='saad/index.html'">
|
||||
<h2>Game 1</h2>
|
||||
<p>Member 1</p>
|
||||
</div>
|
||||
@@ -25,14 +25,14 @@
|
||||
<p>Wörter lernen</p>
|
||||
</div>
|
||||
|
||||
<div class="game-card" onclick="location.href='Abdelaziz/CrossWords.html'">
|
||||
<div class="game-card" onclick="location.href='Abdelaziz/kreuzwortratsel.html'">
|
||||
<h2>CrossWord</h2>
|
||||
<p>Abdelaziz</p>
|
||||
</div>
|
||||
|
||||
<div class="game-card" onclick="location.href='member5/game.html'">
|
||||
<div class="game-card" onclick="location.href='ismail/index.html'">
|
||||
<h2>Game 5</h2>
|
||||
<p>Member 5</p>
|
||||
<p>Mathematik lernen</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
96
MainPage/ismail/index.html
Normal file
96
MainPage/ismail/index.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Mathematik Lernen</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1>Mathematik Lernen</h1>
|
||||
|
||||
<div id="setup">
|
||||
|
||||
<h2>Was willst du üben?</h2>
|
||||
|
||||
<div class="mode">
|
||||
<button id="btn-addition" onclick="waehleMode('addition', this)">Addition</button>
|
||||
<button id="btn-subtraktion" onclick="waehleMode('subtraktion', this)">Subtraktion</button>
|
||||
<button id="btn-multiplikation" onclick="waehleMode('multiplikation', this)">Multiplikation</button>
|
||||
<button id="btn-mix" onclick="waehleAlle()">Mix</button>
|
||||
</div>
|
||||
|
||||
<h2>Wie schwer?</h2>
|
||||
|
||||
<div class="level">
|
||||
<button onclick="waehleLevel('leicht', this)">Leicht (1-10)</button>
|
||||
<button onclick="waehleLevel('mittel', this)">Mittel (1-50)</button>
|
||||
<button onclick="waehleLevel('schwer', this)">Schwer (1-100)</button>
|
||||
</div>
|
||||
|
||||
<h2>Wie viele Fragen?</h2>
|
||||
|
||||
<div class="anzahl">
|
||||
<button onclick="waehleAnzahl(5, this)">5</button>
|
||||
<button onclick="waehleAnzahl(10, this)">10</button>
|
||||
<button onclick="waehleAnzahl(15, this)">15</button>
|
||||
<button onclick="waehleAnzahl(20, this)">20</button>
|
||||
<button onclick="waehleAnzahl(30, this)">30</button>
|
||||
</div>
|
||||
|
||||
<p id="fehler"></p>
|
||||
|
||||
<button id="start-button" onclick="spielStarten()">▶ Starten!</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="spiel">
|
||||
|
||||
<p id="fortschritt-text"></p>
|
||||
<p id="timer"></p>
|
||||
|
||||
<div class="question-box">
|
||||
|
||||
<h2 id="question"></h2>
|
||||
|
||||
<input type="number" id="answer" placeholder="Deine Antwort">
|
||||
|
||||
<br>
|
||||
|
||||
<button onclick="checkAnswer()">Überprüfen</button>
|
||||
|
||||
<p id="result"></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="score">
|
||||
Punktzahl: <span id="score">0</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="endscreen">
|
||||
|
||||
<h2 id="end-titel"></h2>
|
||||
|
||||
<div id="prozent"></div>
|
||||
|
||||
<p id="end-text"></p>
|
||||
|
||||
<p>Richtig: <b id="end-richtig"></b></p>
|
||||
|
||||
<p>Falsch: <b id="end-falsch"></b></p>
|
||||
|
||||
<button id="nochmal-button" onclick="nochmal()">Nochmal spielen</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
284
MainPage/ismail/script.js
Normal file
284
MainPage/ismail/script.js
Normal file
@@ -0,0 +1,284 @@
|
||||
let num1
|
||||
let num2
|
||||
let correctAnswer
|
||||
let score=0
|
||||
let currentMode=""
|
||||
|
||||
let gewaehlteModes=[]
|
||||
let gewaehltesLevel=""
|
||||
let gewaehltAnzahl=0
|
||||
|
||||
let aktFrage=0
|
||||
let richtigAnzahl=0
|
||||
let falschAnzahl=0
|
||||
|
||||
let timerZahl=15
|
||||
let timerInterval
|
||||
|
||||
let gesperrt=false
|
||||
|
||||
function waehleMode(mode,btn){
|
||||
|
||||
let index=gewaehlteModes.indexOf(mode)
|
||||
|
||||
if(index==-1){
|
||||
gewaehlteModes.push(mode)
|
||||
btn.classList.add("aktiv")
|
||||
}else{
|
||||
gewaehlteModes.splice(index,1)
|
||||
btn.classList.remove("aktiv")
|
||||
}
|
||||
|
||||
document.getElementById("btn-mix").classList.remove("aktiv")
|
||||
}
|
||||
|
||||
function waehleAlle(){
|
||||
|
||||
gewaehlteModes=["addition","subtraktion","multiplikation"]
|
||||
|
||||
document.getElementById("btn-addition").classList.add("aktiv")
|
||||
document.getElementById("btn-subtraktion").classList.add("aktiv")
|
||||
document.getElementById("btn-multiplikation").classList.add("aktiv")
|
||||
document.getElementById("btn-mix").classList.add("aktiv")
|
||||
|
||||
}
|
||||
|
||||
function waehleLevel(level,btn){
|
||||
|
||||
gewaehltesLevel=level
|
||||
|
||||
let alleLevel=document.querySelectorAll(".level button")
|
||||
|
||||
for(let i=0;i<alleLevel.length;i++){
|
||||
alleLevel[i].classList.remove("aktiv")
|
||||
}
|
||||
|
||||
btn.classList.add("aktiv")
|
||||
|
||||
}
|
||||
|
||||
function waehleAnzahl(anzahl,btn){
|
||||
|
||||
gewaehltAnzahl=anzahl
|
||||
|
||||
let alleAnzahl=document.querySelectorAll(".anzahl button")
|
||||
|
||||
for(let i=0;i<alleAnzahl.length;i++){
|
||||
alleAnzahl[i].classList.remove("aktiv")
|
||||
}
|
||||
|
||||
btn.classList.add("aktiv")
|
||||
|
||||
}
|
||||
|
||||
function spielStarten(){
|
||||
|
||||
if(gewaehlteModes.length==0){
|
||||
document.getElementById("fehler").textContent="Bitte eine Rechenart wählen"
|
||||
return
|
||||
}
|
||||
|
||||
if(gewaehltesLevel==""){
|
||||
document.getElementById("fehler").textContent="Bitte eine Schwierigkeit wählen"
|
||||
return
|
||||
}
|
||||
|
||||
if(gewaehltAnzahl==0){
|
||||
document.getElementById("fehler").textContent="Bitte Anzahl Fragen wählen"
|
||||
return
|
||||
}
|
||||
|
||||
score=0
|
||||
aktFrage=0
|
||||
richtigAnzahl=0
|
||||
falschAnzahl=0
|
||||
|
||||
document.getElementById("score").textContent=0
|
||||
|
||||
document.getElementById("setup").style.display="none"
|
||||
document.getElementById("spiel").style.display="block"
|
||||
document.getElementById("endscreen").style.display="none"
|
||||
|
||||
generateQuestion()
|
||||
|
||||
}
|
||||
|
||||
function generateQuestion(){
|
||||
|
||||
gesperrt=false
|
||||
|
||||
aktFrage++
|
||||
|
||||
document.getElementById("fortschritt-text").textContent="Frage "+aktFrage+" von "+gewaehltAnzahl
|
||||
|
||||
let zufallIndex=Math.floor(Math.random()*gewaehlteModes.length)
|
||||
|
||||
currentMode=gewaehlteModes[zufallIndex]
|
||||
|
||||
let maxZahl=10
|
||||
|
||||
if(gewaehltesLevel=="mittel")maxZahl=50
|
||||
if(gewaehltesLevel=="schwer")maxZahl=100
|
||||
|
||||
num1=Math.floor(Math.random()*maxZahl)+1
|
||||
num2=Math.floor(Math.random()*maxZahl)+1
|
||||
|
||||
if(currentMode==="addition"){
|
||||
correctAnswer=num1+num2
|
||||
document.getElementById("question").textContent=num1+" + "+num2+" = ?"
|
||||
}
|
||||
|
||||
if(currentMode==="subtraktion"){
|
||||
|
||||
if(num2>num1){
|
||||
let temp=num1
|
||||
num1=num2
|
||||
num2=temp
|
||||
}
|
||||
|
||||
correctAnswer=num1-num2
|
||||
document.getElementById("question").textContent=num1+" - "+num2+" = ?"
|
||||
}
|
||||
|
||||
if(currentMode==="multiplikation"){
|
||||
correctAnswer=num1*num2
|
||||
document.getElementById("question").textContent=num1+" × "+num2+" = ?"
|
||||
}
|
||||
|
||||
document.getElementById("answer").value=""
|
||||
document.getElementById("result").textContent=""
|
||||
document.getElementById("answer").focus()
|
||||
|
||||
timerStarten()
|
||||
|
||||
}
|
||||
|
||||
function timerStarten(){
|
||||
|
||||
clearInterval(timerInterval)
|
||||
|
||||
timerZahl=15
|
||||
|
||||
document.getElementById("timer").textContent="Zeit: "+timerZahl
|
||||
document.getElementById("timer").style.color="green"
|
||||
|
||||
timerInterval=setInterval(function(){
|
||||
|
||||
timerZahl--
|
||||
|
||||
document.getElementById("timer").textContent="Zeit: "+timerZahl
|
||||
|
||||
if(timerZahl<=5){
|
||||
document.getElementById("timer").style.color="red"
|
||||
}
|
||||
|
||||
if(timerZahl<=0){
|
||||
clearInterval(timerInterval)
|
||||
zeitAbgelaufen()
|
||||
}
|
||||
|
||||
},1000)
|
||||
|
||||
}
|
||||
|
||||
function zeitAbgelaufen(){
|
||||
|
||||
if(gesperrt)return
|
||||
|
||||
gesperrt=true
|
||||
|
||||
falschAnzahl++
|
||||
|
||||
document.getElementById("result").textContent="Zeit abgelaufen! Richtig wäre: "+correctAnswer
|
||||
document.getElementById("result").style.color="orange"
|
||||
|
||||
setTimeout(naechsteOderEnde,2000)
|
||||
|
||||
}
|
||||
|
||||
function checkAnswer(){
|
||||
|
||||
if(gesperrt)return
|
||||
|
||||
let userAnswer=Number(document.getElementById("answer").value)
|
||||
|
||||
if(document.getElementById("answer").value=="")return
|
||||
|
||||
clearInterval(timerInterval)
|
||||
|
||||
gesperrt=true
|
||||
|
||||
let resultText=document.getElementById("result")
|
||||
|
||||
if(userAnswer===correctAnswer){
|
||||
|
||||
resultText.textContent="Richtig! Antwort: "+correctAnswer
|
||||
resultText.style.color="green"
|
||||
|
||||
score++
|
||||
richtigAnzahl++
|
||||
|
||||
document.getElementById("score").textContent=score
|
||||
|
||||
}else{
|
||||
|
||||
resultText.textContent="Falsch! Richtige Antwort: "+correctAnswer
|
||||
resultText.style.color="red"
|
||||
|
||||
falschAnzahl++
|
||||
|
||||
}
|
||||
|
||||
setTimeout(naechsteOderEnde,2000)
|
||||
|
||||
}
|
||||
|
||||
function naechsteOderEnde(){
|
||||
|
||||
if(aktFrage>=gewaehltAnzahl){
|
||||
spielEnde()
|
||||
}else{
|
||||
generateQuestion()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function spielEnde(){
|
||||
|
||||
clearInterval(timerInterval)
|
||||
|
||||
document.getElementById("spiel").style.display="none"
|
||||
document.getElementById("endscreen").style.display="block"
|
||||
|
||||
let prozent=Math.round((richtigAnzahl/gewaehltAnzahl)*100)
|
||||
|
||||
document.getElementById("prozent").textContent=prozent+"%"
|
||||
document.getElementById("end-richtig").textContent=richtigAnzahl
|
||||
document.getElementById("end-falsch").textContent=falschAnzahl
|
||||
document.getElementById("end-text").textContent="Du hast "+richtigAnzahl+" von "+gewaehltAnzahl+" richtig"
|
||||
|
||||
if(prozent==100){
|
||||
document.getElementById("end-titel").textContent="Perfekt"
|
||||
document.getElementById("prozent").style.color="gold"
|
||||
}
|
||||
else if(prozent>=70){
|
||||
document.getElementById("end-titel").textContent="Sehr gut"
|
||||
document.getElementById("prozent").style.color="green"
|
||||
}
|
||||
else if(prozent>=50){
|
||||
document.getElementById("end-titel").textContent="Gut gemacht"
|
||||
document.getElementById("prozent").style.color="orange"
|
||||
}
|
||||
else{
|
||||
document.getElementById("end-titel").textContent="Weiter üben"
|
||||
document.getElementById("prozent").style.color="red"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function nochmal(){
|
||||
|
||||
document.getElementById("endscreen").style.display="none"
|
||||
document.getElementById("setup").style.display="block"
|
||||
|
||||
}
|
||||
146
MainPage/ismail/style.css
Normal file
146
MainPage/ismail/style.css
Normal file
@@ -0,0 +1,146 @@
|
||||
body{
|
||||
font-family:Arial,sans-serif;
|
||||
background:#f0f8ff;
|
||||
text-align:center;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.container{
|
||||
margin-top:40px;
|
||||
}
|
||||
|
||||
h1,h2{
|
||||
color:#333;
|
||||
}
|
||||
|
||||
button{
|
||||
padding:10px 20px;
|
||||
margin:5px;
|
||||
border:none;
|
||||
border-radius:8px;
|
||||
background:greenyellow;
|
||||
color:white;
|
||||
cursor:pointer;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
button:hover{
|
||||
background:greenyellow;
|
||||
}
|
||||
|
||||
.mode button{
|
||||
background:green;
|
||||
}
|
||||
|
||||
.mode button.aktiv{
|
||||
background:#1a7a1e;
|
||||
border:3px solid black;
|
||||
}
|
||||
|
||||
.level button{
|
||||
background:#2196F3;
|
||||
}
|
||||
|
||||
.level button:hover{
|
||||
background:blue;
|
||||
}
|
||||
|
||||
.level button.aktiv{
|
||||
background:darkblue;
|
||||
border:3px solid black;
|
||||
}
|
||||
|
||||
.anzahl button{
|
||||
background:orange;
|
||||
}
|
||||
|
||||
.anzahl button:hover{
|
||||
background:orange;
|
||||
}
|
||||
|
||||
.anzahl button.aktiv{
|
||||
background:brown;
|
||||
border:3px solid black;
|
||||
}
|
||||
|
||||
#start-button{
|
||||
background:red;
|
||||
font-size:18px;
|
||||
padding:12px 30px;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
#start-button:hover{
|
||||
background:red;
|
||||
}
|
||||
|
||||
input{
|
||||
padding:10px;
|
||||
font-size:16px;
|
||||
width:150px;
|
||||
margin-top:10px;
|
||||
border:2px solid gray;
|
||||
border-radius:5px;
|
||||
}
|
||||
|
||||
.question-box{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.score{
|
||||
margin-top:20px;
|
||||
font-size:20px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#timer{
|
||||
font-size:22px;
|
||||
font-weight:bold;
|
||||
color:green;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
#result{
|
||||
font-size:18px;
|
||||
font-weight:bold;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
#fortschritt-text{
|
||||
font-size:16px;
|
||||
color:gray;
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
#endscreen{
|
||||
display:none;
|
||||
margin-top:30px;
|
||||
}
|
||||
|
||||
#prozent{
|
||||
font-size:52px;
|
||||
font-weight:bold;
|
||||
color:green;
|
||||
}
|
||||
|
||||
#nochmal-button{
|
||||
background:green;
|
||||
font-size:18px;
|
||||
padding:12px 28px;
|
||||
margin-top:15px;
|
||||
}
|
||||
|
||||
#setup{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
#spiel{
|
||||
display:none;
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
#fehler{
|
||||
color:red;
|
||||
font-weight:bold;
|
||||
}
|
||||
692
MainPage/saad/index.html
Normal file
692
MainPage/saad/index.html
Normal file
@@ -0,0 +1,692 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>WORDLE</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg: #faf8f3;
|
||||
--surface: #f2ede4;
|
||||
--ink: #1a1612;
|
||||
--muted: #9e9488;
|
||||
--border: #d8d0c4;
|
||||
--correct: #4a7c59;
|
||||
--present: #c97d2a;
|
||||
--absent: #8a8278;
|
||||
--correct-light: #d4ead9;
|
||||
--present-light: #f5ddb8;
|
||||
--absent-light: #d4d0cb;
|
||||
--accent: #b5451b;
|
||||
}
|
||||
|
||||
* { margin:0; padding:0; box-sizing:border-box; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
font-family: 'DM Mono', monospace;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Paper texture */
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
padding: 24px 20px 16px;
|
||||
text-align: center;
|
||||
border-bottom: 2px solid var(--ink);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'DM Serif Display', serif;
|
||||
font-size: 2.8rem;
|
||||
letter-spacing: 0.15em;
|
||||
color: var(--ink);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 0.6rem;
|
||||
letter-spacing: 0.25em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
padding: 24px 16px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
/* Toast */
|
||||
#toast {
|
||||
position: fixed;
|
||||
top: 80px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-20px);
|
||||
background: var(--ink);
|
||||
color: var(--bg);
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.1em;
|
||||
padding: 10px 20px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s, transform 0.2s;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#toast.show {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
|
||||
/* Grid */
|
||||
#grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: 2px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: 'DM Serif Display', serif;
|
||||
font-size: 1.8rem;
|
||||
color: var(--ink);
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
transition: border-color 0.1s;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.cell.filled {
|
||||
border-color: var(--muted);
|
||||
animation: pop 0.1s ease-out;
|
||||
}
|
||||
|
||||
@keyframes pop {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.08); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
.cell.correct {
|
||||
background: var(--correct);
|
||||
border-color: var(--correct);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cell.present {
|
||||
background: var(--present);
|
||||
border-color: var(--present);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cell.absent {
|
||||
background: var(--absent);
|
||||
border-color: var(--absent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cell.flip {
|
||||
animation: flip 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes flip {
|
||||
0% { transform: rotateX(0deg); }
|
||||
50% { transform: rotateX(-90deg); background: transparent; }
|
||||
100% { transform: rotateX(0deg); }
|
||||
}
|
||||
|
||||
.cell.shake {
|
||||
animation: shake 0.4s ease-out;
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
0%,100% { transform: translateX(0); }
|
||||
20% { transform: translateX(-6px); }
|
||||
40% { transform: translateX(6px); }
|
||||
60% { transform: translateX(-4px); }
|
||||
80% { transform: translateX(4px); }
|
||||
}
|
||||
|
||||
.cell.bounce {
|
||||
animation: bounce 0.5s ease-out;
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%,100% { transform: translateY(0); }
|
||||
40% { transform: translateY(-12px); }
|
||||
70% { transform: translateY(-6px); }
|
||||
}
|
||||
|
||||
/* Keyboard */
|
||||
#keyboard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.kb-row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.key {
|
||||
height: 56px;
|
||||
min-width: 36px;
|
||||
padding: 0 8px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
color: var(--ink);
|
||||
font-family: 'DM Mono', monospace;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, color 0.15s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.key:active { transform: scale(0.95); }
|
||||
|
||||
.key.wide { min-width: 56px; font-size: 0.65rem; }
|
||||
|
||||
.key.correct {
|
||||
background: var(--correct);
|
||||
border-color: var(--correct);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.key.present {
|
||||
background: var(--present);
|
||||
border-color: var(--present);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.key.absent {
|
||||
background: var(--absent-light);
|
||||
border-color: var(--absent-light);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Win/Lose overlay */
|
||||
#result-panel {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 24px;
|
||||
background: var(--surface);
|
||||
border: 2px solid var(--ink);
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#result-panel.show { display: flex; }
|
||||
|
||||
.result-title {
|
||||
font-family: 'DM Serif Display', serif;
|
||||
font-size: 2rem;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.result-word {
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.2em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.result-word strong {
|
||||
font-family: 'DM Serif Display', serif;
|
||||
font-size: 1.4rem;
|
||||
color: var(--accent);
|
||||
letter-spacing: 0.1em;
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.play-btn {
|
||||
margin-top: 8px;
|
||||
font-family: 'DM Mono', monospace;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.2em;
|
||||
text-transform: uppercase;
|
||||
padding: 12px 32px;
|
||||
background: var(--ink);
|
||||
color: var(--bg);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.play-btn:hover { opacity: 0.8; }
|
||||
|
||||
.stats-row {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.stat-item { text-align: center; }
|
||||
.stat-n {
|
||||
font-family: 'DM Serif Display', serif;
|
||||
font-size: 1.8rem;
|
||||
color: var(--ink);
|
||||
}
|
||||
.stat-l {
|
||||
font-size: 0.55rem;
|
||||
letter-spacing: 0.15em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="toast"></div>
|
||||
|
||||
<header>
|
||||
<h1>Wordle</h1>
|
||||
<div class="subtitle">Guess the five-letter word</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div id="grid"></div>
|
||||
<div id="result-panel">
|
||||
<div class="result-title" id="result-title">Brilliant!</div>
|
||||
<div class="result-word">
|
||||
The word was
|
||||
<strong id="result-word-display"></strong>
|
||||
</div>
|
||||
<div class="stats-row">
|
||||
<div class="stat-item"><div class="stat-n" id="stat-played">0</div><div class="stat-l">Played</div></div>
|
||||
<div class="stat-item"><div class="stat-n" id="stat-wins">0</div><div class="stat-l">Wins</div></div>
|
||||
<div class="stat-item"><div class="stat-n" id="stat-streak">0</div><div class="stat-l">Streak</div></div>
|
||||
</div>
|
||||
<button class="play-btn" onclick="newGame()">New Word</button>
|
||||
</div>
|
||||
<div id="keyboard"></div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
const WORDS = [
|
||||
"CRANE","SLATE","TRACE","AUDIO","AROSE","STARE","SNARE","LEAST","IRATE","ARISE",
|
||||
"PLUMB","FJORD","EQUIP","GLYPH","WALTZ","AFFIX","JUMPY","ONYX","PROXY","SIXTH",
|
||||
"ABBEY","ABBOT","ABHOR","ABIDE","ABLER","ABODE","ABORT","ABOUT","ABOVE","ABUSE",
|
||||
"ACUTE","ADMIT","ADOBE","ADOPT","ADULT","AFTER","AGAIN","AGENT","AGILE","AGING",
|
||||
"AGONY","AGORA","AGREE","AHEAD","AIDER","AISLE","ALARM","ALBUM","ALERT","ALGAE",
|
||||
"ALIBI","ALIGN","ALIVE","ALLAY","ALLEY","ALLOT","ALLOW","ALLOY","ALOFT","ALONE",
|
||||
"ALONG","ALOOF","ALOUD","ALPEN","ALTAR","ALTER","AMAZE","AMBER","AMBLE","AMEND",
|
||||
"AMISS","AMOUR","AMPLE","AMUSE","ANGEL","ANGER","ANGLE","ANGRY","ANGST","ANIME",
|
||||
"ANKLE","ANNEX","ANTIC","ANVIL","AORTA","APPLE","APPLY","APRON","APTLY","ARBOR",
|
||||
"ARDOR","ARENA","ARGUE","ARRAY","ARROW","ASIDE","ASKEW","ATONE","ATTIC","AUDIO",
|
||||
"AUDIT","AVAIL","AVERT","AVID","AVOID","AWAIT","AWAKE","AWARD","AWARE","AWFUL",
|
||||
"BASIC","BASIS","BATCH","BATHE","BAYOU","BEACH","BEARD","BEAST","BEGIN","BEING",
|
||||
"BELOW","BENCH","BERRY","BIRTH","BISON","BITER","BLACK","BLADE","BLAME","BLAND",
|
||||
"BLANK","BLARE","BLAST","BLAZE","BLEAK","BLEND","BLESS","BLIMP","BLIND","BLISS",
|
||||
"BLOAT","BLOCK","BLOOD","BLOWN","BLUNT","BOARD","BOAST","BOOBY","BOOST","BOOTH",
|
||||
"BOUND","BOXER","BRAID","BRAIN","BRAND","BRAVE","BRAVO","BRAWN","BREAD","BREAK",
|
||||
"BREED","BRIEF","BRINE","BRING","BRISK","BROAD","BROKE","BROOK","BROWN","BRUTE",
|
||||
"BUDDY","BUILD","BUILT","BULKY","BULLY","BUNNY","BURNT","BURST","BUYER","BYLAW",
|
||||
"CADET","CAMEL","CANDY","CARGO","CAROL","CARRY","CARVE","CATCH","CAUSE","CEDAR",
|
||||
"CHAIN","CHALK","CHAOS","CHARD","CHARM","CHART","CHASE","CHEAP","CHEAT","CHECK",
|
||||
"CHEEK","CHEER","CHESS","CHEST","CHIEF","CHILD","CHINA","CHOIR","CHORD","CHOSE",
|
||||
"CIVIC","CIVIL","CLAIM","CLAMP","CLASP","CLASS","CLEAN","CLEAR","CLERK","CLICK",
|
||||
"CLIFF","CLIMB","CLING","CLOAK","CLOCK","CLONE","CLOSE","CLOTH","CLOUD","CLOWN",
|
||||
"CLUMP","CLUNK","COMET","COMIC","CORAL","COUCH","COUGH","COULD","COUNT","COURT",
|
||||
"COVER","COVET","COWARD","CRACK","CRAFT","CRAMP","CRASH","CRAZE","CRAZY","CREAM",
|
||||
"CREEK","CREEP","CRIMP","CRISP","CROSS","CROWD","CROWN","CRUMB","CRUSH","CRUST",
|
||||
"CRYPT","CUBIC","CURSE","CURVE","CYCLE","DAISY","DANCE","DARTS","DATUM","DAUNT",
|
||||
"DEATH","DEBUT","DECAL","DECOY","DECRY","DEFER","DENIM","DENSE","DEPTH","DERBY",
|
||||
"DETER","DETOX","DIGIT","DIRGE","DISCO","DITCH","DITTO","DIZZY","DODGE","DOING",
|
||||
"DOMINO","DOUBT","DOUGH","DOWRY","DRAFT","DRAIN","DRAMA","DRAPE","DRAWN","DREAD",
|
||||
"DRIFT","DRINK","DRIVE","DRONE","DROVE","DROWN","DRUID","DRYER","DUCHY","DULLY",
|
||||
"EAGLE","EARLY","EARWORM","EASEL","EATEN","EDICT","EIGHT","EJECT","ELITE","EMBER",
|
||||
"ENDOW","ENJOY","ENTER","ENVOY","EPOCH","EQUAL","ERROR","ESSAY","EVADE","EVENT",
|
||||
"EVERY","EXACT","EXALT","EXERT","EXIST","EXTRA","FABLE","FACET","FAINT","FAIRY",
|
||||
"FAITH","FALSE","FANCY","FARCE","FATAL","FAULT","FEAST","FEIGN","FERAL","FETCH",
|
||||
"FEVER","FIEND","FIFTY","FIGHT","FINAL","FINCH","FIRST","FIXED","FLAIL","FLAME",
|
||||
"FLANK","FLASH","FLASK","FLAIR","FLAW","FLESH","FLICK","FLING","FLINT","FLOAT",
|
||||
"FLOOR","FLOUR","FLOWN","FLUTE","FOCUS","FOLLY","FORCE","FORGE","FORTH","FORUM",
|
||||
"FOUND","FRAME","FRAUD","FREAK","FRESH","FRIAR","FRINGE","FRONT","FROST","FROZE",
|
||||
"FRUIT","FULLY","FUNGI","FUNKY","FUNNY","GAUZE","GHOST","GIVEN","GIZMO","GLARE",
|
||||
"GLAZE","GLEAM","GLEAN","GLIDE","GLOSS","GLOVE","GNARL","GNOME","GOUGE","GOURD",
|
||||
"GRACE","GRADE","GRASP","GRATE","GRAZE","GREED","GREET","GRIEF","GRIME","GRIND",
|
||||
"GROAN","GROIN","GROPE","GROSS","GROUP","GROVE","GROWL","GRUEL","GRUFF","GUILE",
|
||||
"GUISE","GUSTO","HABIT","HASTE","HATCH","HAUNT","HAVEN","HEART","HEAVE","HEAVY",
|
||||
"HEDGE","HEIST","HERON","HITCH","HOIST","HONOR","HORSE","HOTEL","HOUSE","HUMAN",
|
||||
"HUMOR","HURRY","HUSKY","IDEAL","IMAGE","IMPLY","INBOX","INFER","INNER","INPUT",
|
||||
"INTER","INTRO","IONIC","ISSUE","IVORY","JAZZY","JOUST","JUICE","JUICY","KAYAK",
|
||||
"KHAKI","KNACK","KNEEL","KNIFE","KNOCK","KNOWN","KRAAL","KUDOS","LABEL","LANCE",
|
||||
"LATCH","LATER","LATTE","LEARN","LEASE","LEAVE","LEGAL","LEMON","LEVEL","LIGHT",
|
||||
"LINEN","LINER","LIVER","LOCAL","LODGE","LOGIC","LOOSE","LOUSE","LOVER","LUCID",
|
||||
"LUCKY","LUNAR","MAGIC","MAJOR","MANOR","MAPLE","MARCH","MARSH","MATCH","MAYBE",
|
||||
"MAYOR","MEDIA","MERCY","MERIT","METAL","MIGHT","MINCE","MINER","MINOR","MINUS",
|
||||
"MIRTH","MISER","MOIST","MONEY","MONTH","MORAL","MOURN","MOUTH","MOVED","MOVIE",
|
||||
"MUCKY","MUDDY","MURKY","MUSIC","NAIVE","NEEDY","NERVE","NEVER","NIGHT","NINJA",
|
||||
"NOBLE","NOISE","NORTH","NOTCH","NOVEL","NURSE","NYMPH","OCCUR","OCEAN","OFFER",
|
||||
"OLIVE","ONSET","OPERA","OPTIC","ORDER","OTHER","OUGHT","OUTER","OUNCE","OUTDO",
|
||||
"OXIDE","OZONE","PAINT","PANIC","PAPER","PARCH","PARSE","PARTY","PASTA","PATCH",
|
||||
"PAUSE","PEACE","PEACH","PEARL","PEDAL","PENNY","PERCH","PERIL","PETTY","PHASE",
|
||||
"PHONE","PHOTO","PIANO","PIECE","PILOT","PINCH","PIRATE","PIXEL","PIZZA","PLACE",
|
||||
"PLAIN","PLANE","PLANK","PLANT","PLAZA","PLEAD","PLEAT","PLUCK","PLUME","PLUNGE",
|
||||
"POINT","POKER","POLAR","POLKA","POPPY","PORCH","POUND","POWER","PRANK","PRESS",
|
||||
"PRICE","PRIDE","PRIME","PRINT","PRIZE","PROBE","PRONE","PROOF","PROSE","PROVE",
|
||||
"PROWL","PRUNE","PSALM","PULSE","PUNCH","PUPIL","PURSE","QUEEN","QUERY","QUEST",
|
||||
"QUEUE","QUIET","QUOTA","QUOTE","RABBI","RADAR","RADIO","RAISE","RALLY","RANCH",
|
||||
"RANGE","RAPID","RAVEN","REACH","REALM","REBEL","REFER","REIGN","RELAX","REMIX",
|
||||
"RENEW","REPAY","REPEL","REPENT","RERUN","RESET","RESIN","RIDER","RIDGE","RIGHT",
|
||||
"RIGID","RISKY","RIVER","RIVET","ROBIN","ROBOT","ROCKY","ROMAN","ROUGH","ROUND",
|
||||
"ROUTE","ROVER","ROYAL","RULER","RUSTY","SADLY","SAINT","SALVE","SAUCE","SAVOR",
|
||||
"SCALE","SCALP","SCALD","SCANT","SCARE","SCARF","SCENE","SCENT","SCONE","SCOPE",
|
||||
"SCORE","SCOUT","SCRAM","SCRAWL","SCREW","SCRUB","SEIZE","SENSE","SERUM","SERVE",
|
||||
"SETUP","SEVEN","SHADE","SHAFT","SHAKE","SHAKY","SHAME","SHAPE","SHARE","SHARK",
|
||||
"SHARP","SHEEN","SHEER","SHELF","SHIFT","SHINE","SHIRT","SHOCK","SHORE","SHORT",
|
||||
"SHOUT","SHOVE","SHOWY","SIGHT","SILLY","SINCE","SIXTH","SIXTY","SKILL","SKIMP",
|
||||
"SKIPPER","SKULL","SLACK","SLANT","SLEEK","SLEEP","SLEET","SLICK","SLIDE","SLIME",
|
||||
"SLOPE","SLOSH","SLUMP","SLUNK","SMALL","SMART","SMEAR","SMELL","SMILE","SMIRK",
|
||||
"SMOKE","SNACK","SNAIL","SNAKE","SNEAK","SNIFF","SOLVE","SONIC","SOUTH","SPACE",
|
||||
"SPADE","SPARE","SPARK","SPEAK","SPEAR","SPECK","SPEED","SPEND","SPINE","SPIRE",
|
||||
"SPITE","SPOON","SPORT","SPRAY","SPREE","SPRIG","SPROUT","SPUNK","SQUAD","SQUAT",
|
||||
"SQUID","STACK","STAFF","STAGE","STAIN","STALK","STAMP","STAND","STASH","STAVE",
|
||||
"STAYS","STEAK","STEAM","STEEL","STEEP","STEER","STERN","STICK","STIFF","STILL",
|
||||
"STONE","STOOL","STORM","STORY","STOUT","STRAW","STRAY","STRIP","STRUT","STUCK",
|
||||
"STUDY","STUNG","STUNK","STUNT","STYLE","SUAVE","SUGAR","SUITE","SULKY","SUMMON",
|
||||
"SUPER","SURGE","SWAMP","SWEAR","SWEAT","SWEEP","SWEET","SWEPT","SWIFT","SWIPE",
|
||||
"SWIRL","SWOOP","SWORD","SWORN","SYRUP","TABLE","TALON","TANGO","TAPIR","TAUNT",
|
||||
"TAWNY","TEACH","TEASE","TEDDY","TEETH","TEMPO","TENSE","TEPID","THEFT","THEIR",
|
||||
"THEME","THERE","THICK","THING","THINK","THORN","THREW","THROW","THUMB","THUMP",
|
||||
"TIARA","TIGER","TIGHT","TIMER","TIPSY","TITAN","TITLE","TODAY","TOKEN","TONIC",
|
||||
"TOTAL","TOUCH","TOUGH","TOWEL","TOWER","TOXIC","TRAIN","TRAMP","TRAPS","TRASH",
|
||||
"TRAWL","TREAD","TREAT","TREND","TRICK","TRIED","TROOP","TROTH","TROUT","TROVE",
|
||||
"TRUCE","TRULY","TRUMP","TRUNK","TRUST","TRUTH","TUMMY","TUNER","TUNIC","TUTOR",
|
||||
"TWEED","TWICE","TWIRL","TWIST","TYING","ULCER","UNDER","UNFED","UNIFY","UNION",
|
||||
"UNITY","UNTIL","UPPER","UPSET","URBAN","USAGE","USHER","UTTER","VALOR","VALVE",
|
||||
"VAPID","VAULT","VERSE","VICAR","VIGOR","VIRAL","VIRUS","VISOR","VISTA","VIVID",
|
||||
"VIXEN","VOCAL","VODKA","VOICE","VOILA","VOTER","VOUCH","VOWEL","WATCH","WATER",
|
||||
"WEARY","WEAVE","WEDGE","WEEDY","WEIRD","WELCH","WHERE","WHILE","WHIFF","WHIRL",
|
||||
"WINCE","WINDY","WITCH","WITTY","WORLD","WORRY","WORSE","WORST","WORTH","WOULD",
|
||||
"WOUND","WRAITH","WRATH","WRECK","WREST","WRIST","WRONG","YEARN","YIELD","YOUNG",
|
||||
"YOUTH","ZESTY","ZIPPY","ZONE"
|
||||
].filter(w => w.length === 5);
|
||||
|
||||
const VALID_EXTRA = new Set([
|
||||
"ABBOT","ABBOT","ALGAL","ALOFT","ALONG","APRON","ARMOR","ATOLL","ATONE","AUDIT",
|
||||
"BALMY","BANAL","BAYOU","BEVEL","BLUNT","BROIL","BROOD","BUOY","CALYX","CAMEO",
|
||||
"CIVIL","CLEFT","CLOUT","COLON","COMMA","CROAT","DELVE","DEPOT","DERBY","DIVINE",
|
||||
"DOYLY","ECLAT","EGRET","ELBOW","ELUDE","ENVOY","EXPEL","EXTOL","FABLE","FACET",
|
||||
"FAWNY","FELON","FETID","FIASCO","FLECK","FORAY","FORTE","FROND","FUROR","GAUDY",
|
||||
"GOLEM","GRAIL","GUAVA","GUILD","HAVEN","HERON","INERT","INLAY","INTER","JOUST",
|
||||
"KHAKI","KNAVE","LATHE","LEACH","LIBEL","LIVID","LLAMA","LUCID","LUSTY","MAXIM",
|
||||
"MELEE","MERIT","MIRTH","MOIST","MOOSE","MOTIF","MURKY","MUSTY","NAIVE","OMEGA",
|
||||
"OPTIC","OVOID","PAGAN","PAPAL","PATIO","PATSY","PEEVE","PETTY","PIXEL","PLAID",
|
||||
"PLAZA","PLONK","PLUMB","POKER","POLYP","PORKY","PRAWN","PREEN","PUPIL","PURGE",
|
||||
"RABID","REGAL","RELIC","REMIT","REPAY","RESIN","RIVET","RUSTY","SAVVY","SCALD",
|
||||
"SCONE","SEDAN","SIGMA","SLOTH","SNIDE","SQUAT","STOIC","SWOON","SYNOD","TABOO",
|
||||
"TABOR","TAFFY","TEPID","TITHE","TONIC","TROTH","TUBER","TULIP","TUTOR","ULCER",
|
||||
"UMBRA","UNDID","UNTIL","UNZIP","VENOM","VERGE","VIGIL","VISOR","VOGUE","VOUCH",
|
||||
"WADER","WEALD","WHELP","WINCH","WOOZY","WORMY","YEOMAN","ZONAL"
|
||||
]);
|
||||
|
||||
const VALID_WORDS = new Set([...WORDS, ...VALID_EXTRA]);
|
||||
|
||||
let state = {
|
||||
word: '',
|
||||
guesses: [],
|
||||
current: '',
|
||||
gameOver: false,
|
||||
stats: { played: 0, wins: 0, streak: 0 }
|
||||
};
|
||||
|
||||
function buildGrid() {
|
||||
const grid = document.getElementById('grid');
|
||||
grid.innerHTML = '';
|
||||
for (let r = 0; r < 6; r++) {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'row';
|
||||
row.id = 'row-' + r;
|
||||
for (let c = 0; c < 5; c++) {
|
||||
const cell = document.createElement('div');
|
||||
cell.className = 'cell';
|
||||
cell.id = `cell-${r}-${c}`;
|
||||
row.appendChild(cell);
|
||||
}
|
||||
grid.appendChild(row);
|
||||
}
|
||||
}
|
||||
|
||||
function buildKeyboard() {
|
||||
const kb = document.getElementById('keyboard');
|
||||
kb.innerHTML = '';
|
||||
const rows = [
|
||||
['Q','W','E','R','T','Y','U','I','O','P'],
|
||||
['A','S','D','F','G','H','J','K','L'],
|
||||
['ENTER','Z','X','C','V','B','N','M','⌫']
|
||||
];
|
||||
rows.forEach(keys => {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'kb-row';
|
||||
keys.forEach(k => {
|
||||
const btn = document.createElement('button');
|
||||
btn.className = 'key' + (k.length > 1 ? ' wide' : '');
|
||||
btn.textContent = k;
|
||||
btn.id = 'key-' + k;
|
||||
btn.addEventListener('click', () => handleKey(k === '⌫' ? 'BACKSPACE' : k));
|
||||
row.appendChild(btn);
|
||||
});
|
||||
kb.appendChild(row);
|
||||
});
|
||||
}
|
||||
|
||||
function handleKey(key) {
|
||||
if (state.gameOver) return;
|
||||
if (key === 'BACKSPACE') {
|
||||
state.current = state.current.slice(0, -1);
|
||||
updateCurrentRow();
|
||||
} else if (key === 'ENTER') {
|
||||
submitGuess();
|
||||
} else if (/^[A-Z]$/.test(key) && state.current.length < 5) {
|
||||
state.current += key;
|
||||
updateCurrentRow();
|
||||
}
|
||||
}
|
||||
|
||||
function updateCurrentRow() {
|
||||
const row = state.guesses.length;
|
||||
for (let c = 0; c < 5; c++) {
|
||||
const cell = document.getElementById(`cell-${row}-${c}`);
|
||||
const letter = state.current[c] || '';
|
||||
cell.textContent = letter;
|
||||
cell.className = 'cell' + (letter ? ' filled' : '');
|
||||
}
|
||||
}
|
||||
|
||||
function submitGuess() {
|
||||
const row = state.guesses.length;
|
||||
if (state.current.length < 5) {
|
||||
shakeRow(row);
|
||||
showToast('Not enough letters');
|
||||
return;
|
||||
}
|
||||
if (!VALID_WORDS.has(state.current) && !WORDS.includes(state.current)) {
|
||||
// Be lenient — allow any 5-letter attempt
|
||||
// (For a proper game, you'd have a full valid-words list)
|
||||
}
|
||||
|
||||
const guess = state.current;
|
||||
state.guesses.push(guess);
|
||||
state.current = '';
|
||||
|
||||
revealGuess(row, guess, () => {
|
||||
if (guess === state.word) {
|
||||
state.gameOver = true;
|
||||
state.stats.played++;
|
||||
state.stats.wins++;
|
||||
state.stats.streak++;
|
||||
setTimeout(() => {
|
||||
bounceCells(row);
|
||||
setTimeout(() => showResult(true), 600);
|
||||
}, 300);
|
||||
} else if (state.guesses.length === 6) {
|
||||
state.gameOver = true;
|
||||
state.stats.played++;
|
||||
state.stats.streak = 0;
|
||||
setTimeout(() => showResult(false), 400);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function revealGuess(row, guess, onDone) {
|
||||
const word = state.word;
|
||||
const result = Array(5).fill('absent');
|
||||
const wordArr = word.split('');
|
||||
const guessArr = guess.split('');
|
||||
const used = Array(5).fill(false);
|
||||
|
||||
// First pass: correct
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (guessArr[i] === wordArr[i]) {
|
||||
result[i] = 'correct';
|
||||
used[i] = true;
|
||||
}
|
||||
}
|
||||
// Second pass: present
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (result[i] === 'correct') continue;
|
||||
for (let j = 0; j < 5; j++) {
|
||||
if (!used[j] && guessArr[i] === wordArr[j]) {
|
||||
result[i] = 'present';
|
||||
used[j] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Animate each cell
|
||||
result.forEach((r, i) => {
|
||||
setTimeout(() => {
|
||||
const cell = document.getElementById(`cell-${row}-${i}`);
|
||||
cell.classList.add('flip');
|
||||
setTimeout(() => {
|
||||
cell.className = 'cell ' + r;
|
||||
cell.textContent = guess[i];
|
||||
updateKeyColor(guess[i], r);
|
||||
}, 250);
|
||||
if (i === 4) setTimeout(onDone, 350);
|
||||
}, i * 100);
|
||||
});
|
||||
}
|
||||
|
||||
function updateKeyColor(letter, result) {
|
||||
const key = document.getElementById('key-' + letter);
|
||||
if (!key) return;
|
||||
const priority = { correct: 3, present: 2, absent: 1 };
|
||||
const current = key.className.includes('correct') ? 'correct'
|
||||
: key.className.includes('present') ? 'present'
|
||||
: key.className.includes('absent') ? 'absent' : '';
|
||||
if (!current || priority[result] > priority[current]) {
|
||||
key.className = 'key' + (key.classList.contains('wide') ? ' wide' : '') + ' ' + result;
|
||||
}
|
||||
}
|
||||
|
||||
function shakeRow(row) {
|
||||
document.querySelectorAll(`#row-${row} .cell`).forEach(c => {
|
||||
c.classList.add('shake');
|
||||
c.addEventListener('animationend', () => c.classList.remove('shake'), { once: true });
|
||||
});
|
||||
}
|
||||
|
||||
function bounceCells(row) {
|
||||
document.querySelectorAll(`#row-${row} .cell`).forEach((c, i) => {
|
||||
setTimeout(() => {
|
||||
c.classList.add('bounce');
|
||||
c.addEventListener('animationend', () => c.classList.remove('bounce'), { once: true });
|
||||
}, i * 80);
|
||||
});
|
||||
}
|
||||
|
||||
function showToast(msg) {
|
||||
const t = document.getElementById('toast');
|
||||
t.textContent = msg;
|
||||
t.classList.add('show');
|
||||
setTimeout(() => t.classList.remove('show'), 1800);
|
||||
}
|
||||
|
||||
function showResult(won) {
|
||||
const panel = document.getElementById('result-panel');
|
||||
const titles = won
|
||||
? ['Genius!','Magnificent!','Impressive!','Splendid!','Great!','Phew!']
|
||||
: ['Better luck next time.'];
|
||||
document.getElementById('result-title').textContent = won
|
||||
? titles[state.guesses.length - 1] || 'Great!'
|
||||
: 'Better luck next time.';
|
||||
document.getElementById('result-word-display').textContent = state.word;
|
||||
document.getElementById('stat-played').textContent = state.stats.played;
|
||||
document.getElementById('stat-wins').textContent = state.stats.wins;
|
||||
document.getElementById('stat-streak').textContent = state.stats.streak;
|
||||
panel.classList.add('show');
|
||||
}
|
||||
|
||||
function newGame() {
|
||||
state.word = WORDS[Math.floor(Math.random() * WORDS.length)];
|
||||
state.guesses = [];
|
||||
state.current = '';
|
||||
state.gameOver = false;
|
||||
document.getElementById('result-panel').classList.remove('show');
|
||||
buildGrid();
|
||||
buildKeyboard();
|
||||
}
|
||||
|
||||
// Keyboard input
|
||||
document.addEventListener('keydown', e => {
|
||||
if (e.ctrlKey || e.altKey || e.metaKey) return;
|
||||
if (e.key === 'Enter') handleKey('ENTER');
|
||||
else if (e.key === 'Backspace') handleKey('BACKSPACE');
|
||||
else if (/^[a-zA-Z]$/.test(e.key)) handleKey(e.key.toUpperCase());
|
||||
});
|
||||
|
||||
newGame();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,60 +11,73 @@
|
||||
<h1>Flashcards Generator</h1>
|
||||
</header>
|
||||
<div class="main-wrapper">
|
||||
<div class="section-title" id="title">
|
||||
<div class="content">
|
||||
<label for="inputText" class="inputText">Sende deine Wortliste an ChatGPT mit folgender Anweisung:</label>
|
||||
</div>
|
||||
<div id="aufgabe_fuer_gpt">
|
||||
<pre id="formatText">
|
||||
Bitte formatiere meine Wortliste exakt nach folgendem Schema.
|
||||
Jeder Eintrag muss durch eine Leerzeile getrennt sein.
|
||||
|
||||
Englisches Wort
|
||||
[IPA-Transkription]
|
||||
Beispielsatz auf Englisch
|
||||
Deutsche Übersetzung des Wortes
|
||||
Beispielsatz auf Deutsch
|
||||
</pre>
|
||||
<button id="copyButton" style="position: absolute; top: 5px; right: 5px; cursor: pointer;">📋</button>
|
||||
</div>
|
||||
<div id="inputHinweis">
|
||||
<div id="startScreen">
|
||||
<div class="section-title" id="title">
|
||||
<div class="content">
|
||||
<label for="inputText" class="section-title">Füge deinen Text hier ein:</label>
|
||||
<textarea id="inputText" placeholder="Hier Text einfügen..."></textarea>
|
||||
<label for="inputText" class="inputText">Sende deine Wortliste an ChatGPT mit folgender Anweisung:</label>
|
||||
</div>
|
||||
<div id="aufgabe_fuer_gpt">
|
||||
<pre id="formatText">
|
||||
Bitte formatiere meine Wortliste exakt nach folgendem Schema.
|
||||
Jeder Eintrag muss durch eine Leerzeile getrennt sein.
|
||||
|
||||
Englisches Wort
|
||||
[IPA-Transkription]
|
||||
Beispielsatz auf Englisch
|
||||
Deutsche Übersetzung des Wortes
|
||||
Beispielsatz auf Deutsch
|
||||
</pre>
|
||||
<button id="copyButton" style="position: absolute; top: 5px; right: 5px; cursor: pointer;">📋</button>
|
||||
</div>
|
||||
<div id="inputHinweis">
|
||||
<div class="content">
|
||||
<label for="inputText" class="section-title">Füge deinen Text hier ein:</label>
|
||||
<textarea id="inputText" placeholder="Hier Text einfügen..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-wrapper">
|
||||
<button id="kartenErstellen">Karten erstellen</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-wrapper">
|
||||
<button id="kartenErstellen">Karten erstellen</button>
|
||||
</div>
|
||||
<div id="modusAuswahlSeite" style="display:none">
|
||||
|
||||
<div id="modusAuswahlSeite" style="display:none;">
|
||||
<h2>Wählt einen Modus:</h2>
|
||||
<button class="modus-btn" data-modus="druck">📄 PDF erstellen</button>
|
||||
<button class="modus-btn" data-modus="training_einfach">🃏 Online-Training</button>
|
||||
<button class="modus-btn" data-modus="statistik">📊 Statistik</button>
|
||||
</div>
|
||||
|
||||
<div id="pdfPages" class="modus-view">
|
||||
<div id="pdfPages">
|
||||
<div id="kartenContainer"></div>
|
||||
<div class="button-wrapper">
|
||||
<button id="druckenBtn" style="display:none;">Drucken</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="onlineTraining" class="modus-view">
|
||||
<div id="onlineTraining">
|
||||
|
||||
<div id="trainingLevels">
|
||||
<h3>Wählt einen Schwierigkeitsgrad:</h3>
|
||||
<button class="level-btn" data-level="leicht">🟢 Leicht</button>
|
||||
<button class="level-btn" data-level="mittel">🟡 Mittel</button>
|
||||
<button class="level-btn" data-level="schwer">🔴 Schwer</button>
|
||||
<div id="trainingLevels" class="training-view">
|
||||
<h3 class="training-title">Wählt eine Trainingsart:</h3>
|
||||
|
||||
<div class="buttons-row">
|
||||
<button class="level-btn" data-level="flip">Karte umdrehen</button>
|
||||
<button class="level-btn" data-level="multiple">Multiple Choice</button>
|
||||
<button class="level-btn" data-level="matching">Zuordnen</button>
|
||||
<button class="level-btn" data-level="hint">Mit Hinweis schreiben</button>
|
||||
<button class="level-btn" data-level="write">Frei schreiben</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="trainingLeicht" class="training-view modus-view"></div>
|
||||
<div id="trainingMittel" class="training-view"></div>
|
||||
<div id="trainingSchwer" class="training-view"></div>
|
||||
<div id="trainingFlip" class="training-view hidden"></div>
|
||||
<div id="trainingMatching" class="training-view hidden"></div>
|
||||
<div id="trainingMultiple" class="training-view hidden"></div>
|
||||
<div id="trainingHint" class="training-view hidden"></div>
|
||||
<div id="trainingWrite" class="training-view hidden"></div>
|
||||
|
||||
<div class="button-wrapper">
|
||||
<button id="checkBtn" style="display:none;" onclick="pruefeRunde()">Überprüfen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="trainingContainer" style="display:none; text-align:center; margin-top:30px;"></div>
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
let parsedArray = [];
|
||||
|
||||
// Mischt ein Array zufällig mit dem Fisher-Yates-Algorithmus
|
||||
// und gibt das gemischte Array zurück.
|
||||
function mischeArray(array) {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
document.getElementById('copyButton').addEventListener('click', () => {
|
||||
const text = document.getElementById('formatText').innerText;
|
||||
|
||||
@@ -10,6 +20,7 @@ document.getElementById('copyButton').addEventListener('click', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Analysiert den eingegebenen Text und wandelt ihn in ein Array von Wort-Objekten um.
|
||||
function parseWordText(inputText) {
|
||||
const wortBlocks = inputText.trim().split("\n\n");
|
||||
const wortListe = [];
|
||||
@@ -23,6 +34,7 @@ function parseWordText(inputText) {
|
||||
}
|
||||
|
||||
const wortObj = {
|
||||
id: crypto.randomUUID(),
|
||||
englisch: lines[0],
|
||||
ipa: lines[1],
|
||||
beispielEN: lines[2],
|
||||
@@ -36,6 +48,7 @@ function parseWordText(inputText) {
|
||||
return wortListe;
|
||||
}
|
||||
|
||||
// Gibt beide Seiten als Objekt zurück.
|
||||
function createPagePair() {
|
||||
const frontPage = document.createElement("div");
|
||||
frontPage.className = "page page-front";
|
||||
@@ -47,9 +60,6 @@ function createPagePair() {
|
||||
}
|
||||
|
||||
const button = document.getElementById("kartenErstellen");
|
||||
const onlineContainer = document.getElementById("kartenContainer");
|
||||
const frontPage = document.querySelector(".page_front");
|
||||
const backPage = document.querySelector(".page_back");
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
const inputText = document.getElementById("inputText").value;
|
||||
@@ -62,38 +72,26 @@ button.addEventListener("click", () => {
|
||||
|
||||
alert("Karten erfolgreich erstellt!");
|
||||
|
||||
showView("modusAuswahlSeite");
|
||||
|
||||
document.getElementById("title").style.display = "none";
|
||||
button.style.display = "none";
|
||||
|
||||
document.getElementById("startScreen").style.display = "none";
|
||||
document.getElementById("modusAuswahlSeite").style.display = "block";
|
||||
});
|
||||
|
||||
document.querySelectorAll(".modus-btn").forEach(button => {
|
||||
button.addEventListener("click", () => {
|
||||
const modus = button.dataset.modus;
|
||||
|
||||
if (modus === "druck") {
|
||||
createPDFPages(parsedArray);
|
||||
} else {
|
||||
console.log("Gewählter Modus:", modus);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Erstellt druckfertige PDF-Seiten mit jeweils 8 Karten pro Seite.
|
||||
function createPDFPages(wordArray) {
|
||||
|
||||
const kartenContainer = document.getElementById("kartenContainer");
|
||||
const druckenBtn = document.getElementById("druckenBtn");
|
||||
|
||||
kartenContainer.innerHTML = "";
|
||||
kartenContainer.style.display = "flex";
|
||||
kartenContainer.style.flexDirection = "column";
|
||||
|
||||
for (let i = 0; i < parsedArray.length; i += 8) {
|
||||
for (let i = 0; i < wordArray.length; i += 8) {
|
||||
|
||||
const { frontPage, backPage } = createPagePair();
|
||||
|
||||
parsedArray.slice(i, i + 8).forEach((karte) => {
|
||||
wordArray.slice(i, i + 8).forEach((karte) => {
|
||||
|
||||
const frontCard = document.createElement("div");
|
||||
frontCard.className = "card card-en";
|
||||
@@ -115,28 +113,31 @@ function createPDFPages(wordArray) {
|
||||
|
||||
kartenContainer.appendChild(frontPage);
|
||||
kartenContainer.appendChild(backPage);
|
||||
document.getElementById("druckenBtn").style.display = "block";
|
||||
}
|
||||
|
||||
druckenBtn.style.display = "block";
|
||||
|
||||
alert("PDF-Seiten wurden erstellt! Du kannst sie jetzt drucken.");
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("druckenBtn").addEventListener("click", () => {
|
||||
window.print();
|
||||
});
|
||||
|
||||
const modusBtns = document.querySelectorAll('.modus-btn');
|
||||
const trainingLevels = document.getElementById('trainingLevels');
|
||||
|
||||
modusBtns.forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
const modus = btn.dataset.modus;
|
||||
|
||||
if (modus === 'druck') {
|
||||
showView('pdfPages');
|
||||
showMode('pdfPages');
|
||||
createPDFPages(parsedArray);
|
||||
}
|
||||
|
||||
else if (modus === 'training_einfach') {
|
||||
showView('trainingLevels');
|
||||
showMode('onlineTraining');
|
||||
}
|
||||
|
||||
else if (modus === 'statistik') {
|
||||
@@ -145,165 +146,739 @@ modusBtns.forEach(btn => {
|
||||
});
|
||||
});
|
||||
|
||||
let trainingsZustand = {
|
||||
modus: "leicht",
|
||||
quelleKarten: [],
|
||||
aktiveKarten: [],
|
||||
gelernt: [],
|
||||
nichtGelernt: [],
|
||||
};
|
||||
// Blendet alle Trainingslevel-Ansichten aus
|
||||
function showMode(id) {
|
||||
|
||||
function startLeichtTraining() {
|
||||
console.log("🔥 startLeichtTraining вызвана");
|
||||
document.getElementById("pdfPages").style.display = "none";
|
||||
document.getElementById("onlineTraining").style.display = "none";
|
||||
|
||||
if (!parsedArray || parsedArray.length === 0) {
|
||||
alert("Нет карточек для тренировки");
|
||||
return;
|
||||
document.getElementById(id).style.display = "block";
|
||||
}
|
||||
|
||||
function showLevel(id) {
|
||||
document.querySelectorAll("#onlineTraining .training-view").forEach(view => {
|
||||
if (view.id !== "trainingLevels") {
|
||||
view.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById(id).classList.remove("hidden");
|
||||
}
|
||||
|
||||
document.querySelectorAll(".level-btn").forEach(btn => {
|
||||
btn.addEventListener("click", () => {
|
||||
const type = btn.dataset.level;
|
||||
console.log("Trainingsart:", type);
|
||||
|
||||
if (type === "flip") {
|
||||
showLevel("trainingFlip");
|
||||
startFlipTraining();
|
||||
document.getElementById("checkBtn").style.display = "none";
|
||||
}
|
||||
|
||||
if (type === "matching") {
|
||||
showLevel("trainingMatching");
|
||||
startMittelTraining();
|
||||
document.getElementById("checkBtn").style.display = "block";
|
||||
}
|
||||
|
||||
if (type === "multiple") {
|
||||
showLevel("trainingMultiple");
|
||||
startMultipleTraining();
|
||||
document.getElementById("checkBtn").style.display = "none";
|
||||
}
|
||||
|
||||
if (type === "hint") {
|
||||
showLevel("trainingHint");
|
||||
startHintTraining();
|
||||
document.getElementById("checkBtn").style.display = "none";
|
||||
}
|
||||
|
||||
if (type === "write") {
|
||||
showLevel("trainingWrite");
|
||||
startWriteTraining();
|
||||
document.getElementById("checkBtn").style.display = "none";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
class TrainingsEngine {
|
||||
|
||||
constructor(kartenListe) {
|
||||
this.kartenQueue = [];
|
||||
this.letzteKarteId = null;
|
||||
this.gelernt = [];
|
||||
this.nichtGelernt = [];
|
||||
|
||||
// Initialisierung aller Richtungen
|
||||
kartenListe.forEach(karte => {
|
||||
["EN_DE", "DE_EN"].forEach(richtung => {
|
||||
this.kartenQueue.push({
|
||||
karte: karte,
|
||||
richtung: richtung,
|
||||
korrektInFolge: 0,
|
||||
versuche: 0,
|
||||
maxVersuche: 3,
|
||||
status: "learning"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
this.#mischeQueue();
|
||||
}
|
||||
|
||||
trainingsZustand.quelleKarten = [...parsedArray];
|
||||
trainingsZustand.aktiveKarten = [];
|
||||
trainingsZustand.gelernt = [];
|
||||
trainingsZustand.nichtGelernt = [];
|
||||
//ÖFFENTLICHE API
|
||||
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (trainingsZustand.quelleKarten.length > 0) {
|
||||
const karte = trainingsZustand.quelleKarten.shift();
|
||||
karte.versuche = 0;
|
||||
trainingsZustand.aktiveKarten.push(karte);
|
||||
naechstesElement() {
|
||||
if (this.kartenQueue.length === 0) return null;
|
||||
|
||||
// Verhindert direkte Wiederholung derselben Karte
|
||||
if (
|
||||
this.kartenQueue.length > 1 &&
|
||||
this.kartenQueue[0].karte.id === this.letzteKarteId
|
||||
) {
|
||||
const alternativeIndex = this.kartenQueue.findIndex(
|
||||
el => el.karte.id !== this.letzteKarteId
|
||||
);
|
||||
|
||||
if (alternativeIndex !== -1) {
|
||||
const [element] = this.kartenQueue.splice(alternativeIndex, 1);
|
||||
this.kartenQueue.unshift(element);
|
||||
}
|
||||
}
|
||||
|
||||
const aktuellesElement = this.kartenQueue.shift();
|
||||
this.letzteKarteId = aktuellesElement.karte.id;
|
||||
|
||||
return aktuellesElement;
|
||||
}
|
||||
|
||||
antwortVerarbeiten(element, istKorrekt) {
|
||||
if (!element || element.status !== "learning") return;
|
||||
|
||||
element.versuche++;
|
||||
|
||||
if (istKorrekt) {
|
||||
element.korrektInFolge++;
|
||||
|
||||
if (element.korrektInFolge >= 3) {
|
||||
element.status = "gelernt";
|
||||
this.gelernt.push(element);
|
||||
this.kartenQueue = this.kartenQueue.filter(e => e !== element);
|
||||
return;
|
||||
}
|
||||
|
||||
this.#wiederEinreihen(element, 8, 10);
|
||||
|
||||
} else {
|
||||
element.korrektInFolge = 0;
|
||||
element.maxVersuche = 5;
|
||||
|
||||
if (element.versuche >= element.maxVersuche) {
|
||||
element.status = "nichtGelernt";
|
||||
this.nichtGelernt.push(element);
|
||||
this.kartenQueue = this.kartenQueue.filter(e => e !== element);
|
||||
return;
|
||||
}
|
||||
|
||||
this.#wiederEinreihen(element, 2, 3);
|
||||
}
|
||||
}
|
||||
|
||||
zeigeNaechsteKarte();
|
||||
istBeendet() {
|
||||
return this.kartenQueue.length === 0;
|
||||
}
|
||||
|
||||
statistik() {
|
||||
const alle = [...this.kartenQueue];
|
||||
|
||||
return {
|
||||
verbleibend: this.kartenQueue.length,
|
||||
gelernt: alle.filter(e => e.status === "gelernt").length,
|
||||
nichtGelernt: alle.filter(e => e.status === "nichtGelernt").length
|
||||
};
|
||||
}
|
||||
|
||||
exportiereZustand() {
|
||||
return JSON.stringify({
|
||||
kartenQueue: this.kartenQueue,
|
||||
letzteKarteId: this.letzteKarteId
|
||||
});
|
||||
}
|
||||
|
||||
ladeZustand(json) {
|
||||
const daten = JSON.parse(json);
|
||||
this.kartenQueue = daten.kartenQueue;
|
||||
this.letzteKarteId = daten.letzteKarteId;
|
||||
}
|
||||
|
||||
//PRIVATE METHODEN
|
||||
#wiederEinreihen(element, minAbstand, maxAbstand) {
|
||||
const zufall =
|
||||
Math.floor(Math.random() * (maxAbstand - minAbstand + 1)) + minAbstand;
|
||||
|
||||
const position = Math.min(zufall, this.kartenQueue.length);
|
||||
this.kartenQueue.splice(position, 0, element);
|
||||
}
|
||||
|
||||
#mischeQueue() {
|
||||
for (let i = this.kartenQueue.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[this.kartenQueue[i], this.kartenQueue[j]] =
|
||||
[this.kartenQueue[j], this.kartenQueue[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function zeigeNaechsteKarte() {
|
||||
if (
|
||||
trainingsZustand.aktiveKarten.length === 0 &&
|
||||
trainingsZustand.quelleKarten.length === 0
|
||||
) {
|
||||
alert(`Training beendet!
|
||||
Gelernt: ${trainingsZustand.gelernt.length}
|
||||
Nicht gelernt: ${trainingsZustand.nichtGelernt.length}`);
|
||||
let flipEngine;
|
||||
|
||||
function startFlipTraining() {
|
||||
flipEngine = new TrainingsEngine(parsedArray);
|
||||
zeigeNaechsteFlipKarte();
|
||||
}
|
||||
|
||||
function zeigeNaechsteFlipKarte() {
|
||||
const element = flipEngine.naechstesElement();
|
||||
|
||||
const container = document.getElementById("trainingFlip");
|
||||
container.innerHTML = "";
|
||||
|
||||
if (!element) {
|
||||
container.classList.remove("hidden");
|
||||
container.innerHTML = `<div style="text-align:center; font-size: 24px; margin-top:20px;">🎉 Training beendet!<br>Gelernt: ${flipEngine.gelernt.length}<br>Nicht gelernt: ${flipEngine.nichtGelernt.length}</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
const index = Math.floor(
|
||||
Math.random() * trainingsZustand.aktiveKarten.length
|
||||
);
|
||||
|
||||
trainingsZustand.aktuelleKarte =
|
||||
trainingsZustand.aktiveKarten[index];
|
||||
|
||||
renderLeichtKarte(trainingsZustand.aktuelleKarte);
|
||||
}
|
||||
|
||||
function renderLeichtKarte(karte) {
|
||||
const container = document.getElementById("trainingLeicht");
|
||||
container.innerHTML = "";
|
||||
|
||||
const cardEl = document.createElement("div");
|
||||
cardEl.className = "training-card";
|
||||
|
||||
cardEl.innerHTML = `
|
||||
<div class="training-card-inner">
|
||||
<div class="training-front">
|
||||
<h2>${karte.englisch}</h2>
|
||||
<div class="ipa">${karte.ipa}</div>
|
||||
<div class="example">${karte.beispielEN}</div>
|
||||
</div>
|
||||
<div class="training-back">
|
||||
<h2>${karte.deutsch}</h2>
|
||||
<div class="example">${karte.beispielDE}</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
<div class="training-card-inner">
|
||||
|
||||
<div class="training-front">
|
||||
<div class="card-top">
|
||||
<h2>${element.richtung === "EN_DE" ? element.karte.englisch : element.karte.deutsch}</h2>
|
||||
${element.richtung === "EN_DE" && element.karte.ipa
|
||||
? `<div class="ipa">${element.karte.ipa}</div>`
|
||||
: ``
|
||||
}
|
||||
</div>
|
||||
<div class="card-example">
|
||||
${element.richtung === "EN_DE"
|
||||
? element.karte.beispielEN || ""
|
||||
: element.karte.beispielDE || ""
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="training-back">
|
||||
<div class="card-top">
|
||||
<h2>${element.richtung === "EN_DE" ? element.karte.deutsch : element.karte.englisch}</h2>
|
||||
${element.richtung !== "EN_DE" && element.karte.ipa
|
||||
? `<div class="ipa">${element.karte.ipa}</div>`
|
||||
: ``
|
||||
}
|
||||
</div>
|
||||
<div class="card-example">
|
||||
${element.richtung === "EN_DE"
|
||||
? element.karte.beispielDE || ""
|
||||
: element.karte.beispielEN || ""
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
cardEl.onclick = () => cardEl.classList.toggle("flip");
|
||||
|
||||
const actions = document.createElement("div");
|
||||
actions.className = "training-actions";
|
||||
actions.innerHTML = `
|
||||
<button id="knowBtn">✔️ Weiß ich</button>
|
||||
<button id="dontKnowBtn">❌ Weiß ich nicht</button>
|
||||
`;
|
||||
const knowBtn = document.createElement("button");
|
||||
knowBtn.innerText = "Weiß ich";
|
||||
const dontKnowBtn = document.createElement("button");
|
||||
dontKnowBtn.innerText = "Weiß ich nicht";
|
||||
|
||||
actions.querySelector("#knowBtn").onclick = () => antworteAufKarte(true);
|
||||
actions.querySelector("#dontKnowBtn").onclick = () => antworteAufKarte(false);
|
||||
knowBtn.onclick = () => {
|
||||
flipEngine.antwortVerarbeiten(element, true);
|
||||
zeigeNaechsteFlipKarte();
|
||||
};
|
||||
dontKnowBtn.onclick = () => {
|
||||
flipEngine.antwortVerarbeiten(element, false);
|
||||
zeigeNaechsteFlipKarte();
|
||||
};
|
||||
|
||||
actions.appendChild(knowBtn);
|
||||
actions.appendChild(dontKnowBtn);
|
||||
|
||||
container.appendChild(cardEl);
|
||||
container.appendChild(actions);
|
||||
}
|
||||
|
||||
function antworteAufKarte(weißIch) {
|
||||
const karte = trainingsZustand.aktuelleKarte;
|
||||
let multipleEngine;
|
||||
|
||||
if (weißIch) {
|
||||
trainingsZustand.gelernt.push(karte);
|
||||
trainingsZustand.aktiveKarten = trainingsZustand.aktiveKarten.filter(k => k !== karte);
|
||||
} else {
|
||||
karte.versuche++;
|
||||
if (karte.versuche >= 5) {
|
||||
trainingsZustand.nichtGelernt.push(karte);
|
||||
trainingsZustand.aktiveKarten = trainingsZustand.aktiveKarten.filter(k => k !== karte);
|
||||
function startMultipleTraining() {
|
||||
multipleEngine = new TrainingsEngine(parsedArray);
|
||||
zeigeNaechsteMultipleKarte();
|
||||
}
|
||||
|
||||
let aktuelleKarte = null;
|
||||
let ersteAntwort = true;
|
||||
|
||||
function zeigeNaechsteMultipleKarte() {
|
||||
const container = document.getElementById("trainingMultiple");
|
||||
container.innerHTML = "";
|
||||
|
||||
const element = multipleEngine.naechstesElement();
|
||||
|
||||
if (!element) {
|
||||
container.innerHTML = `<div style="text-align:center; font-size: 24px; margin-top:20px;">🎉 Training beendet!<br>Gelernt: ${multipleEngine.gelernt.length}<br>Nicht gelernt: ${multipleEngine.nichtGelernt.length}</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
aktuelleKarte = element;
|
||||
ersteAntwort = true;
|
||||
|
||||
const frage = document.createElement("div");
|
||||
frage.className = "multiple-frage";
|
||||
frage.innerHTML = `<h2>${element.richtung === "EN_DE" ? element.karte.englisch : element.karte.deutsch}</h2>`;
|
||||
container.appendChild(frage);
|
||||
|
||||
const optionen = generiereMultipleOptionen(element);
|
||||
const optionContainer = document.createElement("div");
|
||||
optionContainer.className = "multiple-optionen";
|
||||
|
||||
optionen.forEach(text => {
|
||||
const btn = document.createElement("button");
|
||||
btn.className = "multiple-option";
|
||||
btn.innerText = text;
|
||||
|
||||
btn.onclick = () => {
|
||||
const korrektText = element.richtung === "EN_DE" ? element.karte.deutsch : element.karte.englisch;
|
||||
const istKorrekt = (text === korrektText);
|
||||
|
||||
if (istKorrekt) {
|
||||
btn.style.backgroundColor = "#a8f0a8";
|
||||
if (ersteAntwort) multipleEngine.antwortVerarbeiten(element, true);
|
||||
setTimeout(() => zeigeNaechsteMultipleKarte(), 500);
|
||||
|
||||
} else if (ersteAntwort) {
|
||||
btn.style.backgroundColor = "#f5a8a8";
|
||||
btn.style.textDecoration = "line-through";
|
||||
multipleEngine.antwortVerarbeiten(element, false);
|
||||
ersteAntwort = false;
|
||||
} else {
|
||||
btn.style.backgroundColor = "#f5a8a8";
|
||||
btn.style.textDecoration = "line-through";
|
||||
}
|
||||
};
|
||||
|
||||
optionContainer.appendChild(btn);
|
||||
});
|
||||
|
||||
container.appendChild(optionContainer);
|
||||
}
|
||||
function generiereMultipleOptionen(element) {
|
||||
const korrekt = element.richtung === "EN_DE" ? element.karte.deutsch : element.karte.englisch;
|
||||
|
||||
const falscheOptionen = parsedArray
|
||||
.filter(k => k.id !== element.karte.id)
|
||||
.map(k => element.richtung === "EN_DE" ? k.deutsch : k.englisch);
|
||||
|
||||
mischeArray(falscheOptionen);
|
||||
|
||||
const optionen = [korrekt, ...falscheOptionen.slice(0, 4)];
|
||||
return mischeArray(optionen);
|
||||
}
|
||||
|
||||
function mischeArray(array) {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
let hintEngine;
|
||||
|
||||
function startHintTraining() {
|
||||
hintEngine = new TrainingsEngine(parsedArray);
|
||||
zeigeNaechsteHintKarte();
|
||||
}
|
||||
|
||||
function zeigeNaechsteHintKarte() {
|
||||
const container = document.getElementById("trainingHint");
|
||||
container.innerHTML = "";
|
||||
|
||||
const element = hintEngine.naechstesElement();
|
||||
|
||||
if (!element) {
|
||||
container.innerHTML = `
|
||||
<div style="text-align:center; font-size: 24px; margin-top:20px;">
|
||||
🎉 Training beendet!<br>
|
||||
Gelernt: ${hintEngine.gelernt.length}<br>
|
||||
Nicht gelernt: ${hintEngine.nichtGelernt.length}
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
const korrekt = element.richtung === "EN_DE" ? element.karte.deutsch : element.karte.englisch;
|
||||
|
||||
const frage = document.createElement("div");
|
||||
frage.className = "hint-frage";
|
||||
frage.innerText = element.richtung === "EN_DE" ? element.karte.englisch : element.karte.deutsch;
|
||||
container.appendChild(frage);
|
||||
|
||||
const clue = document.createElement("div");
|
||||
clue.className = "hint-clue";
|
||||
clue.innerText = erstelleClue(korrekt);
|
||||
container.appendChild(clue);
|
||||
|
||||
const input = document.createElement("input");
|
||||
input.className = "hint-input";
|
||||
input.placeholder = "Schreibe die Übersetzung...";
|
||||
input.autofocus = true;
|
||||
input.style.fontSize = "18px";
|
||||
input.style.padding = "5px 10px";
|
||||
input.style.border = "2px solid #005b5b";
|
||||
input.style.borderRadius = "6px";
|
||||
input.style.width = "300px";
|
||||
input.style.caretColor = "#005b5b";
|
||||
container.appendChild(input);
|
||||
|
||||
const feedback = document.createElement("div");
|
||||
feedback.className = "hint-feedback";
|
||||
feedback.style.marginTop = "10px";
|
||||
container.appendChild(feedback);
|
||||
|
||||
const button = document.createElement("button");
|
||||
button.className = "hint-button";
|
||||
button.innerText = "Überprüfen";
|
||||
container.appendChild(button);
|
||||
|
||||
let phase = "check";
|
||||
|
||||
const pruefeAntwort = () => {
|
||||
if (phase === "check") {
|
||||
const userAnswer = input.value.trim();
|
||||
if (!userAnswer) return;
|
||||
|
||||
const istKorrekt = userAnswer.toLowerCase() === korrekt.toLowerCase();
|
||||
hintEngine.antwortVerarbeiten(element, istKorrekt);
|
||||
|
||||
if (istKorrekt) {
|
||||
input.style.backgroundColor = "#a8f0a8";
|
||||
setTimeout(() => zeigeNaechsteHintKarte(), 500);
|
||||
} else {
|
||||
input.style.backgroundColor = "#f5a8a8";
|
||||
feedback.innerText = `Korrekte Antwort: ${korrekt}`;
|
||||
button.innerText = "Weiter";
|
||||
phase = "next";
|
||||
}
|
||||
} else if (phase === "next") {
|
||||
zeigeNaechsteHintKarte();
|
||||
}
|
||||
};
|
||||
|
||||
button.onclick = pruefeAntwort;
|
||||
|
||||
input.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
pruefeAntwort();
|
||||
}
|
||||
});
|
||||
|
||||
input.focus();
|
||||
}
|
||||
|
||||
function erstelleClue(text) {
|
||||
if (text.length === 1) return "*";
|
||||
|
||||
const chars = text.split("");
|
||||
let clue = chars.map(char => (char === " " ? " " : "*"));
|
||||
|
||||
const visibleIndices = [];
|
||||
while (visibleIndices.length < Math.max(1, Math.floor(chars.length / 2))) {
|
||||
const idx = Math.floor(Math.random() * chars.length);
|
||||
if (chars[idx] !== " " && !visibleIndices.includes(idx)) {
|
||||
visibleIndices.push(idx);
|
||||
}
|
||||
}
|
||||
|
||||
visibleIndices.forEach(idx => {
|
||||
clue[idx] = chars[idx];
|
||||
});
|
||||
|
||||
return clue.join("");
|
||||
}
|
||||
|
||||
let writeEngine;
|
||||
|
||||
function startWriteTraining() {
|
||||
writeEngine = new TrainingsEngine(parsedArray);
|
||||
zeigeNaechsteWriteKarte();
|
||||
}
|
||||
|
||||
function zeigeNaechsteWriteKarte() {
|
||||
const container = document.getElementById("trainingWrite");
|
||||
container.innerHTML = "";
|
||||
|
||||
const element = writeEngine.naechstesElement();
|
||||
|
||||
if (!element) {
|
||||
container.innerHTML = `
|
||||
<div style="text-align:center; font-size: 24px; margin-top:20px;">
|
||||
🎉 Training beendet!<br>
|
||||
Gelernt: ${writeEngine.gelernt.length}<br>
|
||||
Nicht gelernt: ${writeEngine.nichtGelernt.length}
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
const korrekt = element.richtung === "EN_DE" ? element.karte.deutsch : element.karte.englisch;
|
||||
|
||||
const frage = document.createElement("div");
|
||||
frage.className = "hint-frage";
|
||||
frage.innerHTML = element.richtung === "EN_DE" ? element.karte.englisch : element.karte.deutsch;
|
||||
container.appendChild(frage);
|
||||
|
||||
const input = document.createElement("input");
|
||||
input.className = "hint-input";
|
||||
input.placeholder = "Schreibe die Übersetzung...";
|
||||
input.autofocus = true;
|
||||
input.style.fontSize = "18px";
|
||||
input.style.padding = "5px 10px";
|
||||
input.style.border = "2px solid #005b5b";
|
||||
input.style.borderRadius = "6px";
|
||||
input.style.width = "300px";
|
||||
input.style.caretColor = "#005b5b";
|
||||
container.appendChild(input);
|
||||
|
||||
const feedback = document.createElement("div");
|
||||
feedback.className = "hint-feedback";
|
||||
feedback.style.marginTop = "10px";
|
||||
container.appendChild(feedback);
|
||||
|
||||
const button = document.createElement("button");
|
||||
button.className = "hint-button";
|
||||
button.innerText = "Überprüfen";
|
||||
container.appendChild(button);
|
||||
|
||||
let phase = "check";
|
||||
|
||||
const pruefeAntwort = () => {
|
||||
if (phase === "check") {
|
||||
const userAnswer = input.value.trim();
|
||||
if (!userAnswer) return;
|
||||
|
||||
const istKorrekt = userAnswer.toLowerCase() === korrekt.toLowerCase();
|
||||
writeEngine.antwortVerarbeiten(element, istKorrekt);
|
||||
|
||||
if (istKorrekt) {
|
||||
input.style.backgroundColor = "#a8f0a8";
|
||||
setTimeout(() => zeigeNaechsteWriteKarte(), 500);
|
||||
} else {
|
||||
input.style.backgroundColor = "#f5a8a8";
|
||||
feedback.innerText = `Korrekte Antwort: ${korrekt}`;
|
||||
button.innerText = "Weiter";
|
||||
phase = "next";
|
||||
}
|
||||
} else if (phase === "next") {
|
||||
zeigeNaechsteWriteKarte();
|
||||
}
|
||||
};
|
||||
|
||||
button.onclick = pruefeAntwort;
|
||||
input.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
pruefeAntwort();
|
||||
}
|
||||
});
|
||||
|
||||
input.focus();
|
||||
}
|
||||
|
||||
let matchingEngine;
|
||||
let matchingRunde = 0;
|
||||
let linkeKarten = [];
|
||||
let rechteKarten = [];
|
||||
let aktuelleRichtung = "EN_DE";
|
||||
|
||||
function startMittelTraining() {
|
||||
matchingEngine = new TrainingsEngine(parsedArray);
|
||||
matchingRunde = 0;
|
||||
ladeMatchingRunde();
|
||||
}
|
||||
|
||||
function ladeMatchingRunde() {
|
||||
const container = document.getElementById("trainingMatching");
|
||||
container.innerHTML = "";
|
||||
|
||||
aktuelleRichtung = matchingRunde % 2 === 0 ? "EN_DE" : "DE_EN";
|
||||
matchingRunde++;
|
||||
|
||||
const learningCards = matchingEngine.kartenQueue.filter(e => e.status === "learning");
|
||||
|
||||
linkeKarten = learningCards
|
||||
.reduce((acc, el) => {
|
||||
if (!acc.find(a => a.karte.id === el.karte.id)) acc.push(el);
|
||||
return acc;
|
||||
}, [])
|
||||
.slice(0, 4);
|
||||
|
||||
rechteKarten = mischeArray([...linkeKarten]);
|
||||
|
||||
const linksDiv = document.createElement("div");
|
||||
linksDiv.className = "spalte-links";
|
||||
|
||||
const rechtsDiv = document.createElement("div");
|
||||
rechtsDiv.className = "spalte-rechts";
|
||||
|
||||
linkeKarten.forEach(k => {
|
||||
const dropZone = document.createElement("div");
|
||||
dropZone.className = "training-card drop-zone";
|
||||
dropZone.dataset.id = k.karte.id;
|
||||
|
||||
dropZone.innerHTML = `
|
||||
<div class="card-top">
|
||||
<h3>${aktuelleRichtung === "EN_DE" ? k.karte.englisch : k.karte.deutsch}</h3>
|
||||
${aktuelleRichtung === "EN_DE" && k.karte.ipa ? `<div class="ipa">${k.karte.ipa}</div>` : ""}
|
||||
</div>
|
||||
<div class="card-example">
|
||||
${aktuelleRichtung === "EN_DE" ? k.karte.beispielEN || "" : k.karte.beispielDE || ""}
|
||||
</div>
|
||||
`;
|
||||
linksDiv.appendChild(dropZone);
|
||||
});
|
||||
|
||||
rechteKarten.forEach((k, index) => {
|
||||
const ziehKarte = document.createElement("div");
|
||||
ziehKarte.className = "training-card zieh-karte";
|
||||
ziehKarte.draggable = true;
|
||||
ziehKarte.dataset.index = index;
|
||||
|
||||
const zeigeEnglisch = aktuelleRichtung === "DE_EN";
|
||||
ziehKarte.innerHTML = `
|
||||
<div class="card-top">
|
||||
<h3>${zeigeEnglisch ? k.karte.englisch : k.karte.deutsch}</h3>
|
||||
${zeigeEnglisch && k.karte.ipa ? `<div class="ipa">${k.karte.ipa}</div>` : ""}
|
||||
</div>
|
||||
<div class="card-example">
|
||||
${zeigeEnglisch ? k.karte.beispielEN || "" : k.karte.beispielDE || ""}
|
||||
</div>
|
||||
`;
|
||||
|
||||
ziehKarte.addEventListener("dragstart", e => e.dataTransfer.setData("draggedIndex", index));
|
||||
ziehKarte.addEventListener("dragover", e => e.preventDefault());
|
||||
ziehKarte.addEventListener("drop", e => {
|
||||
e.preventDefault();
|
||||
const draggedIndex = Number(e.dataTransfer.getData("draggedIndex"));
|
||||
swapZiehKarten(draggedIndex, index, linksDiv, rechtsDiv);
|
||||
});
|
||||
|
||||
rechtsDiv.appendChild(ziehKarte);
|
||||
});
|
||||
|
||||
container.appendChild(linksDiv);
|
||||
container.appendChild(rechtsDiv);
|
||||
}
|
||||
|
||||
function renderMatchingRechts(linksDiv, rechtsDiv) {
|
||||
rechtsDiv.innerHTML = "";
|
||||
|
||||
rechteKarten.forEach((k, index) => {
|
||||
const ziehKarte = document.createElement("div");
|
||||
ziehKarte.className = "training-card zieh-karte";
|
||||
ziehKarte.draggable = true;
|
||||
ziehKarte.dataset.index = index;
|
||||
|
||||
const zeigeEnglisch = (aktuelleRichtung === "DE_EN");
|
||||
ziehKarte.innerHTML = `
|
||||
<div class="card-top">
|
||||
<h3>${zeigeEnglisch ? k.karte.englisch : k.karte.deutsch}</h3>
|
||||
${zeigeEnglisch && k.karte.ipa
|
||||
? `<div class="ipa">${k.karte.ipa}</div>`
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
<div class="card-example">
|
||||
${zeigeEnglisch
|
||||
? k.karte.beispielEN || ""
|
||||
: k.karte.beispielDE || ""
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
|
||||
ziehKarte.addEventListener("dragstart", e => e.dataTransfer.setData("draggedIndex", index));
|
||||
ziehKarte.addEventListener("dragover", e => e.preventDefault());
|
||||
ziehKarte.addEventListener("drop", e => {
|
||||
e.preventDefault();
|
||||
const draggedIndex = Number(e.dataTransfer.getData("draggedIndex"));
|
||||
swapZiehKarten(draggedIndex, index, linksDiv, rechtsDiv);
|
||||
});
|
||||
|
||||
rechtsDiv.appendChild(ziehKarte);
|
||||
});
|
||||
|
||||
const container = document.getElementById("trainingMatching");
|
||||
container.appendChild(linksDiv);
|
||||
container.appendChild(rechtsDiv);
|
||||
}
|
||||
|
||||
function swapZiehKarten(fromIndex, toIndex, linksDiv, rechtsDiv) {
|
||||
const temp = rechteKarten[fromIndex];
|
||||
rechteKarten[fromIndex] = rechteKarten[toIndex];
|
||||
rechteKarten[toIndex] = temp;
|
||||
renderMatchingRechts(linksDiv, rechtsDiv);
|
||||
}
|
||||
|
||||
function pruefeRunde() {
|
||||
const ziehElemente = document.querySelectorAll(".zieh-karte");
|
||||
|
||||
linkeKarten.forEach((k, index) => {
|
||||
const gezogene = rechteKarten[index];
|
||||
const elementDiv = ziehElemente[index];
|
||||
|
||||
if (k.karte.id === gezogene.karte.id) {
|
||||
elementDiv.style.backgroundColor = "#a8f0a8";
|
||||
matchingEngine.antwortVerarbeiten(gezogene, true);
|
||||
} else {
|
||||
trainingsZustand.aktiveKarten.push(trainingsZustand.aktiveKarten.splice(trainingsZustand.aktiveKarten.indexOf(karte), 1)[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if (trainingsZustand.aktiveKarten.length < 3 && trainingsZustand.quelleKarten.length > 0) {
|
||||
let neueKarte = trainingsZustand.quelleKarten.shift();
|
||||
neueKarte.versuche = 0;
|
||||
trainingsZustand.aktiveKarten.push(neueKarte);
|
||||
}
|
||||
|
||||
zeigeNaechsteKarte();
|
||||
}
|
||||
|
||||
function showView(id) {
|
||||
document.querySelectorAll(".modus-view").forEach(view => {
|
||||
view.style.display = "none";
|
||||
});
|
||||
|
||||
const active = document.getElementById(id);
|
||||
if (active) {
|
||||
active.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function showTrainingLevel(id) {
|
||||
document.querySelectorAll(".training-view").forEach(view => {
|
||||
view.style.display = "none";
|
||||
});
|
||||
|
||||
const active = document.getElementById(id);
|
||||
if (active) {
|
||||
active.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll(".level-btn").forEach(btn => {
|
||||
btn.addEventListener("click", () => {
|
||||
const level = btn.dataset.level;
|
||||
|
||||
if (level === "leicht") {
|
||||
showTrainingLevel("trainingLeicht");
|
||||
startLeichtTraining();
|
||||
}
|
||||
|
||||
if (level === "mittel") {
|
||||
showTrainingLevel("trainingMittel");
|
||||
startMittelTraining();
|
||||
}
|
||||
|
||||
if (level === "schwer") {
|
||||
showTrainingLevel("trainingSchwer");
|
||||
startSchwerTraining();
|
||||
elementDiv.style.backgroundColor = "#f5a8a8";
|
||||
matchingEngine.antwortVerarbeiten(gezogene, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document
|
||||
.querySelector(".modus-btn[data-modus='training_einfach']")
|
||||
.addEventListener("click", () => {
|
||||
showView("onlineTraining");
|
||||
});
|
||||
const learningLeft = matchingEngine.kartenQueue.length;
|
||||
const gelerntCount = matchingEngine.gelernt.length;
|
||||
const nichtGelerntCount = matchingEngine.nichtGelernt.length;
|
||||
|
||||
if (learningLeft === 0) {
|
||||
const container = document.getElementById("trainingMatching");
|
||||
container.innerHTML = `
|
||||
<div style="text-align:center; font-size: 24px; margin-top:20px;">
|
||||
🎉 Training beendet!<br>
|
||||
Gelernt: ${gelerntCount}<br>
|
||||
Nicht gelernt: ${nichtGelerntCount}
|
||||
</div>
|
||||
`;
|
||||
const checkBtn = document.getElementById("checkBtn");
|
||||
if (checkBtn) checkBtn.style.display = "none";
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
ladeMatchingRunde();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function mischeArray(array) {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@@ -281,14 +281,53 @@ h1 {
|
||||
}
|
||||
}
|
||||
|
||||
#trainingFlip .training-card {
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
#trainingMatching .training-card {
|
||||
height: 100px;
|
||||
font-size: 0.9rem;
|
||||
margin: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.training-card {
|
||||
width: 300px;
|
||||
height: 180px;
|
||||
margin: 10px auto;
|
||||
perspective: 1000px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#trainingMatching .drop-zone,
|
||||
#trainingMatching .zieh-karte {
|
||||
min-height: 120px;
|
||||
max-height: 120px;
|
||||
width: 300px;
|
||||
background: #fff;
|
||||
border: 2px solid #666;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 0.9rem;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#trainingMatching .drop-zone h2,
|
||||
#trainingMatching .zieh-karte h2,
|
||||
#trainingMatching .drop-zone .ipa,
|
||||
#trainingMatching .zieh-karte .ipa,
|
||||
#trainingMatching .drop-zone .example,
|
||||
#trainingMatching .zieh-karte .example {
|
||||
margin: 2px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.training-card-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -313,8 +352,42 @@ h1 {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.card-top {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.card-top h2 {
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.card-top h3 {
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.card-top .ipa {
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.card-example {
|
||||
margin-top: auto;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.ipa {
|
||||
font-size: 16px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.training-back {
|
||||
@@ -334,33 +407,229 @@ h1 {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.training-front h2 {
|
||||
margin-bottom: 4px;
|
||||
margin-top: -25px;
|
||||
#pdfPages,
|
||||
#onlineTraining {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.training-front .ipa {
|
||||
#trainingMatching {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.spalte-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.spalte-rechts {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.drop-zone, .zieh-karte {
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
background: #fff;
|
||||
border: 2px solid #666;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.zieh-karte {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
#checkBtn {
|
||||
width: 500px;
|
||||
height: 100px;
|
||||
font-size: 46px;
|
||||
font-weight: 600;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
color: #dc6743;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.9)), url("verified.jfif");
|
||||
background-repeat: repeat;
|
||||
background-size: 80px;
|
||||
}
|
||||
|
||||
#trainingMultiple {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.multiple-frage {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.multiple-optionen {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.multiple-option {
|
||||
padding: 10px 15px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
background-color: #f0f0f0;
|
||||
text-align: center;
|
||||
transition: background-color 0.2s, transform 0.1s;
|
||||
}
|
||||
|
||||
.multiple-option:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
.multiple-option[disabled] {
|
||||
text-decoration: line-through;
|
||||
background-color: #f5a8a8;
|
||||
color: #800;
|
||||
}
|
||||
|
||||
#trainingHint {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.hint-frage {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hint-input {
|
||||
width: 300px;
|
||||
font-size: 18px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.hint-button {
|
||||
padding: 10px 15px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background-color: #005b5b;
|
||||
color: white;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.hint-button:hover {
|
||||
background-color: #007070;
|
||||
}
|
||||
|
||||
.hint-feedback {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.hint-clue {
|
||||
font-size: 20px;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 10px;
|
||||
color: #555;
|
||||
margin-bottom: 34px;
|
||||
margin-top: -12px;
|
||||
text-align: center;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.training-front .example {
|
||||
font-size: 15px;
|
||||
line-height: 1.4;
|
||||
#trainingWrite {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.training-back h2 {
|
||||
margin-bottom: 54px;
|
||||
margin-top: -28px;
|
||||
#trainingWrite .schwer-frage {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.modus-view {
|
||||
display: none;
|
||||
#trainingWrite input[type="text"] {
|
||||
font-size: 18px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.training-view {
|
||||
display: none;
|
||||
margin-top: 25px;
|
||||
#trainingWrite button {
|
||||
padding: 10px 15px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background-color: #005b5b;
|
||||
color: white;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
#trainingWrite button:hover {
|
||||
background-color: #007070;
|
||||
}
|
||||
|
||||
#trainingLevels {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.training-title {
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#trainingLevels .buttons-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#trainingLevels .buttons-row .level-btn {
|
||||
flex: 1;
|
||||
padding: 12px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background-color: #f0f0f0;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
transition: background-color 0.2s, transform 0.1s;
|
||||
}
|
||||
|
||||
#trainingLevels .buttons-row .level-btn:hover {
|
||||
background-color: #e0e0e0;
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
BIN
MainPage/stas/verified.jfif
Normal file
BIN
MainPage/stas/verified.jfif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
23
Readme.md
Normal file
23
Readme.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Lernplattform Projekt
|
||||
|
||||
Dies ist unser Lernplattform-Projekt, entwickelt von:
|
||||
|
||||
- Abdelaziz Elouazzani
|
||||
- Younes El Haddoury
|
||||
- Ayman Alshian
|
||||
- Stanislav Kharchenko
|
||||
- Saad Akki
|
||||
- Ismail Amara
|
||||
|
||||
---
|
||||
|
||||
## Projektbeschreibung
|
||||
|
||||
Dieses Projekt ist eine Lernplattform, die verschiedene Funktionen zum Üben und Lernen bietet.
|
||||
|
||||
---
|
||||
|
||||
## Abgabe & Download
|
||||
|
||||
- **Git-Repository:** [Zum Repository](https://git.bib.de/PBT3H24AKH/LerningCSW.git)
|
||||
- **Projekt als ZIP herunterladen:** [Download ZIP](https://git.bib.de/PBT3H24AKH/LerningCSW/archive/refs/heads/main.zip)
|
||||
Reference in New Issue
Block a user