notenrechner+textanalyse
This commit is contained in:
parent
61250e1339
commit
630fb14e61
11 changed files with 250 additions and 45 deletions
|
|
@ -7,7 +7,7 @@
|
|||
<title>Projekt – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -19,6 +19,11 @@
|
|||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
|
@ -161,5 +166,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<title>Impressum – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
|
||||
|
|
@ -20,6 +20,11 @@
|
|||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
|
@ -94,5 +99,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
19
index.html
19
index.html
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Eis Projekt</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
|
||||
|
|
@ -14,11 +14,16 @@
|
|||
<nav>
|
||||
<div class="nav-logo">🍦 Eis Projekt</div>
|
||||
<ul class="nav-links">
|
||||
<a href="index.html">Home</a>
|
||||
<a href="ueber_uns.html">Über uns</a>
|
||||
<a href="eis_projekt.html">Eis Projekt</a>
|
||||
<a href="kontakt.html">Kontakt</a>
|
||||
<a href="impressum.html">Impressum</a>
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
<button class="dark-toggle" onclick="toggleDarkMode()">🌙 Mode</button>
|
||||
|
||||
|
|
@ -109,5 +114,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
43
js/notenrechner.js
Normal file
43
js/notenrechner.js
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// ===============================
|
||||
// NOTENRECHNER
|
||||
// ===============================
|
||||
|
||||
window.berechneNote = function (punkte) {
|
||||
if (punkte >= 90) return "sehr gut";
|
||||
if (punkte >= 75) return "gut";
|
||||
if (punkte >= 60) return "befriedigend";
|
||||
if (punkte >= 50) return "ausreichend";
|
||||
return "nicht bestanden";
|
||||
};
|
||||
|
||||
function leseZahl(text) {
|
||||
const eingabe = prompt(text);
|
||||
|
||||
if (eingabe === null || eingabe.trim() === "") return NaN;
|
||||
|
||||
return Number(eingabe.trim().replace(",", "."));
|
||||
}
|
||||
|
||||
window.startNotenrechner = function () {
|
||||
const punkte = leseZahl("Wie viele Punkte hast du erreicht?");
|
||||
const max = leseZahl("Maximale Punktzahl?");
|
||||
|
||||
if (
|
||||
Number.isNaN(punkte) ||
|
||||
Number.isNaN(max) ||
|
||||
max <= 0 ||
|
||||
punkte < 0 ||
|
||||
punkte > max
|
||||
) {
|
||||
alert("Bitte gültige Werte eingeben!");
|
||||
return;
|
||||
}
|
||||
|
||||
const prozent = (punkte / max) * 100;
|
||||
const note = window.berechneNote(prozent);
|
||||
|
||||
const text = `${punkte} von ${max} Punkten (${prozent.toFixed(1)}%) = ${note}`;
|
||||
|
||||
console.log(text);
|
||||
alert(text);
|
||||
};
|
||||
27
js/textanalyse.js
Normal file
27
js/textanalyse.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
window.analyseText = function (text) {
|
||||
const sauberesText = text.trim();
|
||||
|
||||
const zeichen = sauberesText.length;
|
||||
const wörter = sauberesText.split(/\s+/).filter(Boolean).length;
|
||||
const upper = sauberesText.toUpperCase();
|
||||
|
||||
return `
|
||||
Zeichen: ${zeichen}
|
||||
Wörter: ${wörter}
|
||||
Großbuchstaben: ${upper}
|
||||
`;
|
||||
};
|
||||
|
||||
window.startAnalyse = function () {
|
||||
const text = prompt("Gib einen Text ein:");
|
||||
|
||||
if (typeof text !== "string" || text.trim() === "") {
|
||||
alert("Fehler: Kein gültiger Text eingegeben!");
|
||||
return;
|
||||
}
|
||||
|
||||
const result = window.analyseText(text);
|
||||
|
||||
console.log(result);
|
||||
alert(result);
|
||||
};
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<title>Kontakt – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -19,6 +19,11 @@
|
|||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
|
@ -113,5 +118,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
55
notenrechner.html
Normal file
55
notenrechner.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Notenrechner – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav>
|
||||
<div class="nav-logo">🎓 Studienprojekt</div>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
||||
<button class="dark-toggle" onclick="toggleDarkMode()">🌙 Mode</button>
|
||||
</nav>
|
||||
|
||||
<section class="hero">
|
||||
<div class="hero-content">
|
||||
<div class="hero-tag">📊 JavaScript Aufgabe</div>
|
||||
|
||||
<h1>Noten<span>rechner</span></h1>
|
||||
|
||||
<p>
|
||||
Hier kannst du Punkte eingeben und erhältst automatisch deine Note.
|
||||
</p>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn-primary" onclick="startNotenrechner()">
|
||||
▶ Rechner starten
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="js/notenrechner.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
55
textanalyse.html
Normal file
55
textanalyse.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Textanalyse – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav>
|
||||
<div class="nav-logo">🎓 Studienprojekt</div>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
||||
<button class="dark-toggle" onclick="toggleDarkMode()">🌙 Mode</button>
|
||||
</nav>
|
||||
|
||||
<section class="hero">
|
||||
<div class="hero-content">
|
||||
<div class="hero-tag">📝 JavaScript Aufgabe</div>
|
||||
|
||||
<h1>Text<span>analyse</span></h1>
|
||||
|
||||
<p>
|
||||
Analysiere Texte: Zeichen, Wörter und Großschreibung.
|
||||
</p>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn-primary" onclick="startAnalyse()">
|
||||
▶ Analyse starten
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="js/textanalyse.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<title>Über uns – Studienprojekt 2026</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
<script>
|
||||
|
|
@ -37,6 +37,11 @@ window.onload = function () {
|
|||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="ueber_uns.html">Über uns</a></li>
|
||||
<li><a href="eis_projekt.html">Projekt</a></li>
|
||||
|
||||
<!-- NEU -->
|
||||
<li><a href="notenrechner.html">Notenrechner</a></li>
|
||||
<li><a href="textanalyse.html">Textanalyse</a></li>
|
||||
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
|
|
@ -143,5 +148,5 @@ style="
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
Loading…
Reference in a new issue