eis-website/notenrechner.html

222 lines
8.1 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Notenrechner - David & Karo - EIS Projekt">
<title>Notenrechner David & Karo</title>
<link rel="stylesheet" href="css/style.css">
<link rel="icon" href="img/logo.png" type="image/png">
</head>
<body>
<header>
<div class="header-container">
<div class="logo">
<img src="img/logo.png" alt="Logo">
<div class="logo-text">
<span class="institution">David & Karo</span>
<span class="project">EIS Projekt</span>
</div>
</div>
<!-- Dark Mode Toggle Button -->
<button id="dark-mode-toggle" type="button" class="dark-mode-toggle" title="Dark Mode aktivieren">
<span class="dark-mode-icon">🌙</span>
</button>
<nav>
<a href="index.html">Start</a>
<a href="ueber_uns.html">Über uns</a>
<a href="eis_projekt.html">Projekt</a>
<a href="team.html">Team</a>
<a href="galerie.html">Galerie</a>
<a href="notenrechner.html" class="active">Notenrechner</a>
<a href="textanalyse.html">Textanalyse</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
</nav>
</div>
</header>
<main>
<section class="hero">
<h1>🎓 Notenrechner 📊</h1>
<p>Berechne deine Noten live! Gebe deine Punkte ein und sehe sofort, welche Note du erhältst. 💯✨</p>
</section>
<section>
<h2>📝 Wie funktioniert's?</h2>
<div class="info-cards">
<div class="info-card">
<h4>1⃣ Punkte eingeben</h4>
<p>Geben Sie Ihre erreichten Punkte und die maximale Punktzahl ein. Der Rechner berechnet automatisch den Prozentsatz.</p>
</div>
<div class="info-card">
<h4>2⃣ Live-Berechnung</h4>
<p>Das Ergebnis wird direkt auf der Seite angezeigt - ohne Dialoge! Moderne DOM-Manipulation mit JavaScript.</p>
</div>
<div class="info-card">
<h4>3⃣ Mehrere Noten</h4>
<p>Fügen Sie mehrere Noten hinzu, um einen Durchschnitt zu berechnen. Perfekt für Prüfungsvorbereitung!</p>
</div>
<div class="info-card">
<h4>4⃣ Visuelle Rückmeldung</h4>
<p>Farbige Progressbars und Fehlerbehandlung mit rotem Hintergrund beim Input. Sofort Feedback!</p>
</div>
</div>
</section>
<section>
<h2>📋 Notenmaßstab</h2>
<table class="grade-scale-table">
<thead>
<tr>
<th>Note</th>
<th>Prozentbereich</th>
<th>Beispiel (von 100)</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="grade-badge very-good">sehr gut</span></td>
<td>90100%</td>
<td>90100 Punkte</td>
</tr>
<tr>
<td><span class="grade-badge good">gut</span></td>
<td>7589%</td>
<td>7589 Punkte</td>
</tr>
<tr>
<td><span class="grade-badge satisfactory">befriedigend</span></td>
<td>6074%</td>
<td>6074 Punkte</td>
</tr>
<tr>
<td><span class="grade-badge adequate">ausreichend</span></td>
<td>5059%</td>
<td>5059 Punkte</td>
</tr>
<tr>
<td><span class="grade-badge failed">nicht bestanden</span></td>
<td>049%</td>
<td>049 Punkte</td>
</tr>
</tbody>
</table>
</section>
<section class="calculator-section">
<h2>🧮 Notenrechner DOM-Version</h2>
<!-- Tab Navigation -->
<div class="calculator-tabs">
<button class="tab-btn active" onclick="switchNoteTab('simple-tab')">📊 Einfacher Rechner</button>
<button class="tab-btn" onclick="switchNoteTab('multiple-tab')">📈 Multiple Noten</button>
</div>
<!-- Simple Grade Calculator Tab -->
<div id="simple-tab" class="tab-content active">
<div class="calculator-box">
<h3>Einfache Notenberechnung</h3>
<p>Geben Sie eine Punktzahl ein und sehen Sie sofort das Ergebnis auf der Seite!</p>
<div class="simple-input-group">
<div class="input-field">
<label for="simple-points">Erreichte Punkte:</label>
<input
type="number"
id="simple-points"
class="form-input"
placeholder="z.B. 85"
min="0"
step="0.5"
>
</div>
<div class="input-field">
<label for="simple-max">Maximale Punktzahl:</label>
<input
type="number"
id="simple-max"
class="form-input"
placeholder="z.B. 100"
value="100"
min="1"
>
</div>
<button id="simple-calculate-btn" class="btn btn-calculate" type="button">
🧮 Berechnen
</button>
</div>
<div id="simple-result" class="result-box"></div>
<div id="simple-progress-bar" class="progress-bar-container"></div>
</div>
</div>
<!-- Multiple Grade Calculator Tab -->
<div id="multiple-tab" class="tab-content">
<div class="calculator-box">
<h3>Mehrere Noten berechnen</h3>
<p>Geben Sie mehrere Noten ein der Durchschnitt wird automatisch berechnet!</p>
<div id="grades-container" class="grades-container-dom">
<!-- Grades werden hier dynamisch eingefügt -->
</div>
<div class="calculator-buttons">
<button id="add-grade-btn" class="btn btn-add" type="button"> Note hinzufügen</button>
<button id="multiple-calculate-btn" class="btn btn-calculate" type="button">🧮 Berechnen</button>
<button id="multiple-reset-btn" class="btn btn-reset" type="button">🔄 Zurücksetzen</button>
</div>
<div id="multiple-result" class="result-box"></div>
<div id="multiple-average" class="average-box"></div>
</div>
</div>
</section>
<section>
<h2>💡 Moderne DOM-Manipulation mit JavaScript</h2>
<div class="tips-box">
<ul>
<li><strong>Keine Dialoge:</strong> Ergebnisse werden direkt auf der Webseite angezeigt ohne prompt() oder alert()!</li>
<li><strong>addEventListener:</strong> Event Handler sind in der JavaScript-Datei (notenrechner-dom.js) registriert, nicht im HTML</li>
<li><strong>DOM-Zugriff:</strong> Das Skript nutzt document.getElementById() und querySelector() um auf HTML-Elemente zuzugreifen</li>
<li><strong>Live-Validierung:</strong> Bei ungültiger Eingabe wird das Input-Feld rot hinterlegt und eine Fehlermeldung angezeigt</li>
<li><strong>Farbige Progressbar:</strong> Ein visueller Balken zeigt den Prozentsatz in der Notenfarbe an</li>
<li><strong>Fehlerbehandlung:</strong> Umfangreiche Validierung der Eingaben mit aussagekräftigen Fehlermeldungen</li>
<li><strong>Template Literals:</strong> JavaScript nutzt moderne Template Literals für die HTML-Ausgabe</li>
</ul>
</div>
</section>
<footer>
<p>&copy; 2026 David & Karo EIS Projekt. Alle Rechte vorbehalten. 💕</p>
</footer>
</main>
<script src="js/notenrechner-dom.js"></script>
<script src="js/script.js"></script>
<script>
/**
* Tab-Wechsel Funktion für Notenrechner
*/
function switchNoteTab(tabName) {
// Alle Tabs verstecken
document.querySelectorAll('.tab-content').forEach(tab => {
tab.classList.remove('active');
});
// Alle Buttons deaktivieren
document.querySelectorAll('.calculator-tabs .tab-btn').forEach(btn => {
btn.classList.remove('active');
});
// Gewählten Tab anzeigen
document.getElementById(tabName).classList.add('active');
event.target.classList.add('active');
}
</script>
</body>
</html>