Compare commits
2 commits
61250e1339
...
61c8a3b94c
| Author | SHA1 | Date | |
|---|---|---|---|
| 61c8a3b94c | |||
| 630fb14e61 |
11 changed files with 297 additions and 45 deletions
|
|
@ -296,6 +296,38 @@ footer {
|
|||
}
|
||||
}
|
||||
|
||||
input#punkteInput {
|
||||
padding: 12px 16px;
|
||||
border-radius: 12px;
|
||||
border: 2px solid rgba(0,0,0,0.1);
|
||||
margin: 15px 0;
|
||||
width: 220px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#ergebnis {
|
||||
margin-top: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.progress-container {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
height: 14px;
|
||||
background: #eee;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#progressBar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
transition: width 0.4s ease;
|
||||
background: green;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
/* ================================
|
||||
DARK MODE (WICHTIG: AUSSERHALB MEDIA QUERY)
|
||||
================================ */
|
||||
|
|
@ -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>
|
||||
|
|
@ -15,13 +15,18 @@
|
|||
<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>
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
<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>
|
||||
|
||||
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
@ -16,13 +16,18 @@
|
|||
<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>
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
<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>
|
||||
|
||||
|
|
@ -94,5 +99,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
23
index.html
23
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>
|
||||
|
||||
|
||||
|
|
@ -13,13 +13,18 @@
|
|||
|
||||
<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>
|
||||
</ul>
|
||||
<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>
|
||||
|
|
@ -109,5 +114,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
54
js/notenrechner.js
Normal file
54
js/notenrechner.js
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
function berechneNote(p) {
|
||||
if (p >= 90) return "sehr gut";
|
||||
if (p >= 75) return "gut";
|
||||
if (p >= 60) return "befriedigend";
|
||||
if (p >= 50) return "ausreichend";
|
||||
return "nicht bestanden";
|
||||
}
|
||||
|
||||
function getFarbe(note) {
|
||||
switch (note) {
|
||||
case "sehr gut":
|
||||
case "gut":
|
||||
return "green";
|
||||
case "befriedigend":
|
||||
return "orange";
|
||||
case "ausreichend":
|
||||
return "orangered";
|
||||
default:
|
||||
return "red";
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const input = document.getElementById("punkteInput");
|
||||
const btn = document.getElementById("berechnenBtn");
|
||||
const output = document.getElementById("ergebnis");
|
||||
const bar = document.getElementById("progressBar");
|
||||
|
||||
btn.addEventListener("click", () => {
|
||||
const wert = parseFloat(input.value);
|
||||
|
||||
// VALIDIERUNG
|
||||
const isValid =
|
||||
!isNaN(wert) && wert >= 0 && wert <= 100;
|
||||
|
||||
input.style.borderColor = isValid ? "" : "red";
|
||||
|
||||
if (!isValid) {
|
||||
output.textContent = "Bitte gültige Punkte (0–100) eingeben!";
|
||||
output.style.color = "red";
|
||||
bar.style.width = "0%";
|
||||
return;
|
||||
}
|
||||
|
||||
const note = berechneNote(wert);
|
||||
const farbe = getFarbe(note);
|
||||
|
||||
output.textContent = `${wert}% = ${note}`;
|
||||
output.style.color = farbe;
|
||||
|
||||
bar.style.width = wert + "%";
|
||||
bar.style.background = farbe;
|
||||
});
|
||||
});
|
||||
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);
|
||||
};
|
||||
23
kontakt.html
23
kontakt.html
|
|
@ -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>
|
||||
|
|
@ -15,13 +15,18 @@
|
|||
<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>
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
<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>
|
||||
|
||||
</button>
|
||||
|
|
@ -113,5 +118,5 @@
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script src="script.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</html>
|
||||
59
notenrechner.html
Normal file
59
notenrechner.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<!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">📊 DOM Notenrechner</div>
|
||||
|
||||
<h1>Noten<span>rechner</span></h1>
|
||||
|
||||
<p>Punkte eingeben und Note direkt auf der Seite erhalten.</p>
|
||||
|
||||
<input type="number" id="punkteInput" placeholder="Punkte (0–100)" />
|
||||
|
||||
<button class="btn-primary" id="berechnenBtn">
|
||||
Berechnen
|
||||
</button>
|
||||
|
||||
<p id="ergebnis"></p>
|
||||
|
||||
<div class="progress-container">
|
||||
<div id="progressBar"></div>
|
||||
</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>
|
||||
|
|
@ -33,13 +33,18 @@ window.onload = function () {
|
|||
<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>
|
||||
<li><a href="kontakt.html">Kontakt</a></li>
|
||||
<li><a href="impressum.html">Impressum</a></li>
|
||||
</ul>
|
||||
<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 onclick="toggleDarkMode()"
|
||||
style="
|
||||
background: transparent;
|
||||
|
|
@ -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