diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/Haushaltsplaner/index.html b/Haushaltsplaner/index.html index 0f00013..d67c797 100644 --- a/Haushaltsplaner/index.html +++ b/Haushaltsplaner/index.html @@ -5,18 +5,18 @@ Haushaltsplaner - +

Haushaltsbuch

-
+
- -
+ +

Einträge

diff --git a/Haushaltsplaner/script.js b/Haushaltsplaner/script.js index 903e235..78b0704 100644 --- a/Haushaltsplaner/script.js +++ b/Haushaltsplaner/script.js @@ -6,8 +6,7 @@ function ladeEintraege() { const eintraege = JSON.parse(localStorage.getItem('eintraege')) || []; eintragListe.innerHTML = ''; - let gesamtEinnahmen = 0; - let gesamtAusgaben = 0; + let bilanz = 0; eintraege.forEach((eintrag, index) => { const li = document.createElement('li'); @@ -17,14 +16,9 @@ function ladeEintraege() { eintragListe.appendChild(li); - if (eintrag.betrag >= 0) { - gesamtEinnahmen += parseFloat(eintrag.betrag) - } else { - gesamtAusgaben += parseFloat(eintrag.betrag); - } - }); + bilanz += parseFloat(eintrag.betrag) - const bilanz = gesamtEinnahmen + gesamtAusgaben; + }); document.getElementById('bilanz').textContent = `${bilanz.toFixed(2)}`; } @@ -66,25 +60,16 @@ function fuegeEintragHinzu() { const betrag = document.getElementById('betrag').value; const datum = document.getElementById('datum').value; - if (beschreibung && betrag && datum) { - const eintraege = JSON.parse(localStorage.getItem('eintraege')) || []; + const eintraege = JSON.parse(localStorage.getItem('eintraege')) || []; + eintraege.push({'beschreibung': beschreibung, 'betrag': betrag, 'datum': datum}); + localStorage.setItem('eintraege', JSON.stringify(eintraege)); - eintraege.push({'beschreibung': beschreibung, 'betrag': betrag, 'datum': datum}); + ladeEintraege(); - console.log({beschreibung, betrag, datum}); - console.log({'beschreibung': beschreibung, 'betrag': betrag, 'datum': datum}); + document.getElementById('beschreibung').value = ''; + document.getElementById('betrag').value = ''; + document.getElementById('datum').value = ''; - localStorage.setItem('eintraege', JSON.stringify(eintraege)); - - ladeEintraege(); - - document.getElementById('beschreibung').value = ''; - document.getElementById('betrag').value = ''; - document.getElementById('datum').value = ''; - - } else { - Swal.fire("Bitte alle Felder ausfüllen") - } } ladeEintraege(); \ No newline at end of file diff --git a/Haushaltsplaner/style.css b/Haushaltsplaner/style.css index 0e5edcb..4a6b87a 100644 --- a/Haushaltsplaner/style.css +++ b/Haushaltsplaner/style.css @@ -11,11 +11,11 @@ main { padding: 1em; } -.input-container { +.form-container { display: flex; gap: .7em; } -.input-container input { +.form-container input { height: 2em; } \ No newline at end of file diff --git a/Leuchtturm/index.html b/Leuchtturm/index.html index b56f345..928cfea 100644 --- a/Leuchtturm/index.html +++ b/Leuchtturm/index.html @@ -161,9 +161,6 @@ E-Mail: mail@mustermann.de
Website: www.mustermann.de

- - -

Bei redaktionellen Inhalten:
diff --git a/TodoListe/index.html b/TodoListe/index.html new file mode 100644 index 0000000..ff7bf6b --- /dev/null +++ b/TodoListe/index.html @@ -0,0 +1,33 @@ + + + + + Aufgabenliste + + + + + + + + + + + + + +

+
+

Applogo Aufgabenliste

+
+ + +
+
    +
    +
    + + + + + \ No newline at end of file diff --git a/TodoListe/media/fonts/FiraSans-Regular.ttf b/TodoListe/media/fonts/FiraSans-Regular.ttf new file mode 100644 index 0000000..6f80647 Binary files /dev/null and b/TodoListe/media/fonts/FiraSans-Regular.ttf differ diff --git a/TodoListe/media/img/checked.png b/TodoListe/media/img/checked.png new file mode 100644 index 0000000..d26596a Binary files /dev/null and b/TodoListe/media/img/checked.png differ diff --git a/TodoListe/media/img/icon.png b/TodoListe/media/img/icon.png new file mode 100644 index 0000000..5655235 Binary files /dev/null and b/TodoListe/media/img/icon.png differ diff --git a/TodoListe/media/img/unchecked.png b/TodoListe/media/img/unchecked.png new file mode 100644 index 0000000..04a5c5f Binary files /dev/null and b/TodoListe/media/img/unchecked.png differ diff --git a/TodoListe/script.js b/TodoListe/script.js new file mode 100644 index 0000000..4aa5453 --- /dev/null +++ b/TodoListe/script.js @@ -0,0 +1,22 @@ +const inputBox = document.querySelector("#input-box"); +const todoListContainer = document.querySelector("#todo-list-container"); +function neueAufgabe(){ + inputBox.focus(); + + if (inputBox.value === '') { + return; + } + + let newListItem = document.createElement('li'); + newListItem.textContent = inputBox.value; + todoListContainer.appendChild(newListItem); + saveData(); + inputBox.value = ''; +} + +function saveData() +{ + localStorage.setItem('data', todoListContainer.innerHTML); +} + +todoListContainer.innerHTML = localStorage.getItem('data') || ''; \ No newline at end of file diff --git a/TodoListe/style.css b/TodoListe/style.css new file mode 100644 index 0000000..c81e3c0 --- /dev/null +++ b/TodoListe/style.css @@ -0,0 +1,60 @@ +@font-face { + font-family: 'Fira-Sans'; + src: url("./media/fonts/FiraSans-Regular.ttf") format("truetype"); +} + +html { + font-size: 20px; + box-sizing: border-box; +} + +* { + font-family: 'Fira-Sans', sans-serif; +} + +.container { + margin: auto; + border-radius: 1em; + corner-shape: squircle bevel; + width: clamp(400px, 60vw, 800px); +} + + +.aufgaben-app { + margin: 10px; + padding: 10px; + border-radius: 1em; + corner-shape: squircle bevel; + background-color: ivory; +} + +.aufgaben-app h2 { + font-size: 2rem; +} + +.aufgaben-app h2 img { + max-height: 1em; +} + +.input-container { + display: flex; + flex-wrap: nowrap; + gap: 1em; +} + +.input-container #input-box { + flex-grow: 1; +} + +.input-container button { + cursor: pointer; + background-color: lightskyblue; + border-radius: 100%; + corner-shape: squircle; +} + + +.schatten-farbverlauf { + background: linear-gradient(45deg, red, orange, yellow, green, blue, violet, pink); + padding: 3px; +} \ No newline at end of file