diff --git a/03_dom/agenda.md b/03_dom/agenda.md
index 3f1d6a6..aa409dc 100644
--- a/03_dom/agenda.md
+++ b/03_dom/agenda.md
@@ -360,11 +360,11 @@ Projektarbeit
**Übungen:**
-Übung 09 - 13
+Übung 08 - 10
---
-#### Tag 25
+#### Tag 24
**Inhalt:**
@@ -376,6 +376,6 @@ Projektarbeit
**Übungen:**
-Übung 14
+Übung 11 - 14
---
diff --git a/03_dom/uebungen/u08-09_newsboard/assets/js/main.js b/03_dom/uebungen/u08-09_newsboard/assets/js/main.js
index d5f6676..f41b4da 100644
--- a/03_dom/uebungen/u08-09_newsboard/assets/js/main.js
+++ b/03_dom/uebungen/u08-09_newsboard/assets/js/main.js
@@ -18,38 +18,127 @@
// === INIT =============
const init = () => {
// Funktionaufrufe zu beginn der Anwendung
- showMessageByNumber(1);
+
+ //////////////////
+ // Start 9.2 & 9.3
+ // ich musste hier die Reihenfolge ändern, damit meine Lösung funktioniert
+ // sonst wäre DOM.progressBar.value = 0 (wird erst in der initPro... auf 1 initialisiert)
initProgressbar();
+ updateMessageByNumber(1);
+ // Ende 9.2 & 9.3
+ /////////////////
+
+ ////////////////
+ // Start 8.2
+ setMessageNumber(1);
+ // Ende 8.2
+ ////////////////
// Eventlauscher zu beginn der Anwendung
DOM.buttonNext.addEventListener('click', onClickNext);
DOM.buttonPrev.addEventListener('click', onClickPrev);
+ ///////////////////////
+ // Start 8.1
+ DOM.buttonFirst.addEventListener('click', onClickFirst);
+ DOM.buttonLast.addEventListener('click', onClickLast);
+ // Ende 8.1
+ ///////////////
window.addEventListener('keyup', onKeyUp);
};
// === EVENTHANDLER =====
const onKeyUp = (e) => {
// Übung 8.3 && 8.4 Tastatursteuerung
+ console.log(e);
+ if (e.key === 'ArrowLeft') {
+ if (!e.altKey) {
+ onClickPrev(e);
+ } else {
+ onClickFirst(e);
+ }
+ } else if (e.key === 'ArrowRight') {
+ if (!e.altKey) {
+ onClickNext(e);
+ } else {
+ onClickLast(e);
+ }
+ }
};
const onClickNext = (e) => {
- showMessageByNumber((DOM.progressBar.value += 1));
+ updateMessageByNumber((DOM.progressBar.value += 1));
};
const onClickPrev = (e) => {
- showMessageByNumber((DOM.progressBar.value -= 1));
+ updateMessageByNumber((DOM.progressBar.value -= 1));
};
+
+ //////////////////
+ // Start 8.1
+ const onClickFirst = (e) => {
+ updateMessageByNumber((DOM.progressBar.value = 1));
+ };
+ const onClickLast = (e) => {
+ updateMessageByNumber((DOM.progressBar.value = MESSAGES.length));
+ };
+ // Ende 8.1
+ /////////////////////////
+
// === XHR/FETCH ========
// === FUNCTIONS ========
- const showMessageByNumber = (n) => {
+ const updateMessageByNumber = (n) => {
DOM.newsboardContent.innerHTML = MESSAGES[n - 1];
+ //////////////
+ // Start 8.2
+ setMessageNumber(n);
+ // Ende 8.2
+ //////////////////
+
+ //////////////////
+ // Start 9.2
+ updateBtnState();
+ // Ende 9.2
+ ///////////////////////
};
+ /////////////////////////
+ // Start 9.2
+ const updateBtnState = () => {
+ const n = DOM.progressBar.value;
+ if (n === 1) {
+ // wir sind am Anfang, also die linken Buttons AUSschalten und
+ // die rechten EINschalten
+ DOM.buttonFirst.disabled = DOM.buttonPrev.disabled = true;
+ DOM.buttonLast.disabled = DOM.buttonNext.disabled = false;
+ } else if (n > 1 && n < MESSAGES.length) {
+ // wir sind mitten in der message liste - also alle Buttons aktivieren
+ DOM.buttonFirst.disabled = false;
+ DOM.buttonPrev.disabled = false;
+ DOM.buttonLast.disabled = false;
+ DOM.buttonNext.disabled = false;
+ } else if (n === MESSAGES.length) {
+ // wir sind am Ende, also die linken Buttons EINschalten und
+ // die rechten EINschalten
+ DOM.buttonLast.disabled = DOM.buttonNext.disabled = true;
+ DOM.buttonFirst.disabled = DOM.buttonPrev.disabled = false;
+ }
+ };
+ // Ende 9.2 & 9.3
+ /////////////////////
+
const initProgressbar = () => {
DOM.progressBar.max = MESSAGES.length;
DOM.progressBar.value = 1;
};
+ //////////////
+ // Start 8.2
+ const setMessageNumber = (n) => {
+ DOM.messageNumber.textContent = `${n}/${MESSAGES.length}`;
+ };
+ // Ende 8.2
+ /////////////////////////////////
+
init();
})();
diff --git a/03_dom/uebungen/u10_running-lights/assets/js/main-andreas.js b/03_dom/uebungen/u10_running-lights/assets/js/main-andreas.js
new file mode 100644
index 0000000..54d1c7b
--- /dev/null
+++ b/03_dom/uebungen/u10_running-lights/assets/js/main-andreas.js
@@ -0,0 +1,51 @@
+'use strict';
+
+(() => {
+ // === DOM & VARS =======
+ const module = document.querySelector('.light-bulbs');
+ const DOM = {
+ lights: Array.from(module.querySelectorAll('img[alt="lightbulb"]')),
+ };
+
+ const LIGHT_PATH_ON = 'assets/img/light_on.png';
+ const LIGHT_PATH_OFF = 'assets/img/light_off.png';
+
+ //
+ // === INIT =============
+ const init = () => {
+ // Eventlistener für jede Lampe
+ DOM.lights.forEach((light) => {
+ light.addEventListener('mouseenter', enterMouseLight);
+ });
+
+ turnAllLightsOff();
+ };
+
+ // === EVENTHANDLER =====
+ const enterMouseLight = (e) => {
+ // idx des aktuellen lichtes holen
+ console.log(e.target);
+ const idx = DOM.lights.indexOf(e.target);
+
+ if (idx === -1) return;
+
+ // nu alle lichter aus
+ turnAllLightsOff();
+
+ // mit den index das nächste licht einschalten oder das erste, wenn das letzte an ist
+ if (idx === DOM.lights.length - 1) {
+ DOM.lights[0].src = LIGHT_PATH_ON;
+ } else {
+ DOM.lights[idx + 1].src = LIGHT_PATH_ON;
+ }
+ };
+ // === XHR/FETCH ========
+
+ // === FUNCTIONS ========
+ const turnAllLightsOff = () => {
+ DOM.lights.forEach((light) => {
+ light.src = LIGHT_PATH_OFF;
+ });
+ };
+ init();
+})();
diff --git a/03_dom/uebungen/u10_running-lights/assets/js/main-ersin.js b/03_dom/uebungen/u10_running-lights/assets/js/main-ersin.js
new file mode 100644
index 0000000..bed4340
--- /dev/null
+++ b/03_dom/uebungen/u10_running-lights/assets/js/main-ersin.js
@@ -0,0 +1,68 @@
+'use strict';
+
+(() => {
+ const $ = (qs) => document.querySelector(qs);
+ const $$ = (qs) => Array.from(document.querySelectorAll(qs));
+
+ // === DOM & VARS =======
+ const DOM = {
+ // Alle Glühbirnen-Bilder auswählen
+ bulbs: $$('.light-bulbs img'),
+ };
+
+ const LIGHT_PATH_ON = 'assets/img/light_on.png';
+ const LIGHT_PATH_OFF = 'assets/img/light_off.png';
+
+ // Zähler
+ let activeIndex = 0;
+
+ // === INIT =============
+ const init = () => {
+ if (DOM.bulbs.length === 0) return;
+
+ // zustand reseten
+ updateLights(); // first bulb on
+
+ DOM.bulbs.forEach((bulb, index) => {
+ bulb.addEventListener('mouseenter', (e) => onBulbHover(e, index));
+
+ bulb.addEventListener('click', onBulbClick);
+ });
+ };
+
+ // === EVENTHANDLER =====
+
+ const onBulbHover = (e, hoveredIndex) => {
+ if (hoveredIndex === activeIndex) {
+ nextLight();
+ }
+ };
+
+ const onBulbClick = () => {
+ nextLight();
+ };
+
+ // === FUNCTIONS ========
+
+ const nextLight = () => {
+ activeIndex++;
+
+ if (activeIndex >= DOM.bulbs.length) {
+ activeIndex = 0;
+ }
+
+ updateLights();
+ };
+
+ const updateLights = () => {
+ DOM.bulbs.forEach((bulb, index) => {
+ if (index === activeIndex) {
+ bulb.src = LIGHT_PATH_ON;
+ } else {
+ bulb.src = LIGHT_PATH_OFF;
+ }
+ });
+ };
+
+ init();
+})();
diff --git a/03_dom/uebungen/u10_running-lights/assets/js/main.js b/03_dom/uebungen/u10_running-lights/assets/js/main.js
index 7324828..6dfd415 100644
--- a/03_dom/uebungen/u10_running-lights/assets/js/main.js
+++ b/03_dom/uebungen/u10_running-lights/assets/js/main.js
@@ -1,20 +1,56 @@
-'use strict';
-
-(() => {
- // === DOM & VARS =======
- const DOM = {};
-
- const LIGHT_PATH_ON = 'assets/img/light_on.png';
- const LIGHT_PATH_OFF = 'assets/img/light_off.png';
-
- // === INIT =============
- const init = () => {};
-
- // === EVENTHANDLER =====
-
- // === XHR/FETCH ========
-
- // === FUNCTIONS ========
-
- init();
-})();
+'use strict';
+
+(() => {
+ // === DOM & VARS =======
+ const module = document.querySelector('.light-bulbs');
+ const DOM = {
+ lightBulbs: Array.from(module.querySelectorAll('img[alt="lightbulb"]')),
+ };
+
+ const LIGHT_PATH_ON = 'assets/img/light_on.png';
+ const LIGHT_PATH_OFF = 'assets/img/light_off.png';
+
+ // console.log(DOM);
+ // === INIT =============
+ const init = () => {
+ setAllLightsOff();
+
+ DOM.lightBulbs.forEach((el, idx) => {
+ el.dataset.index = idx; // Index im HTMLImageElement ablegen (V1)
+ el.addEventListener('mouseenter', (e) => onMouseEnter(e, idx)); // Index als zweiten Parameter mitgeben (V2)
+ });
+ };
+
+ // === EVENTHANDLER =====
+ const onMouseEnter = (e, idx) => {
+ // const index = e.currentTarget.dataset.index;
+ const img = e.currentTarget;
+ const index = getIndexBy(img); // Index über Funktion ermitteln (V3)
+
+ // if (e.currentTarget.src.includes(LIGHT_PATH_ON)) {
+ const nextIndex = getNextIndex(index);
+
+ console.log(nextIndex);
+ setAllLightsOff();
+ DOM.lightBulbs[nextIndex].src = LIGHT_PATH_ON;
+ //
+ };
+
+ // === XHR/FETCH ========
+
+ // === FUNCTIONS ========
+ const getIndexBy = (img) => {
+ return DOM.lightBulbs.indexOf(img);
+ };
+ const getNextIndex = (currentIndex) => {
+ return currentIndex === DOM.lightBulbs.length - 1 ? 0 : currentIndex + 1;
+ };
+
+ const setAllLightsOff = () => {
+ DOM.lightBulbs.forEach((el) => {
+ el.src = LIGHT_PATH_OFF;
+ });
+ };
+
+ init();
+})();
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/css/styles.css b/03_dom/uebungen/u11_tasse-01001/assets/css/styles.css
new file mode 100644
index 0000000..6da8361
--- /dev/null
+++ b/03_dom/uebungen/u11_tasse-01001/assets/css/styles.css
@@ -0,0 +1,369 @@
+/* -------------------------------------------- Haupt CSS fuer alle Seiten -------------------------------------------- */
+
+/* ---------------- CSS-Reset ------------------- */
+html,
+body,
+a,
+div,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+span,
+p,
+img,
+strong,
+ul,
+li,
+table,
+th,
+td,
+tr {
+ margin: 0px;
+ padding: 0px;
+ border: 0px none;
+ font-weight: normal;
+ font-style: inherit;
+ font-family: inherit;
+ font-variant: inherit;
+ text-decoration: none;
+ table-layout: inherit;
+}
+
+/* ---------------- Body / HTML ------------------- */
+
+html {
+ font-size: 100%;
+ background-color: #fffef7;
+}
+
+body {
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: 1.2em;
+ font-weight: normal;
+ color: black;
+ margin: 0rem auto 2rem auto;
+}
+
+/* ---------------- layout ------------------- */
+
+header {
+ background: url(../img/js_header.png) left top no-repeat transparent;
+ background-size: cover;
+ height: 250px;
+ min-width: 850px;
+}
+
+header:after {
+ content: ' ';
+ display: block;
+ height: 250px;
+ background: rgba(255, 254, 247, 0);
+ background: -moz-linear-gradient(
+ top,
+ rgba(255, 254, 247, 0) 0%,
+ rgba(255, 254, 247, 0.55) 22%,
+ rgba(255, 254, 247, 0.7) 42%,
+ rgba(255, 254, 247, 0.71) 43%,
+ rgba(255, 254, 247, 0.78) 61%,
+ rgba(255, 254, 247, 0.92) 75%,
+ rgba(255, 254, 247, 1) 87%,
+ rgba(255, 254, 247, 1) 100%
+ );
+ background: -webkit-gradient(
+ left top,
+ left bottom,
+ color-stop(0%, rgba(255, 254, 247, 0)),
+ color-stop(22%, rgba(255, 254, 247, 0.55)),
+ color-stop(42%, rgba(255, 254, 247, 0.7)),
+ color-stop(43%, rgba(255, 254, 247, 0.71)),
+ color-stop(61%, rgba(255, 254, 247, 0.78)),
+ color-stop(75%, rgba(255, 254, 247, 0.92)),
+ color-stop(87%, rgba(255, 254, 247, 1)),
+ color-stop(100%, rgba(255, 254, 247, 1))
+ );
+ background: -webkit-linear-gradient(
+ top,
+ rgba(255, 254, 247, 0) 0%,
+ rgba(255, 254, 247, 0.55) 22%,
+ rgba(255, 254, 247, 0.7) 42%,
+ rgba(255, 254, 247, 0.71) 43%,
+ rgba(255, 254, 247, 0.78) 61%,
+ rgba(255, 254, 247, 0.92) 75%,
+ rgba(255, 254, 247, 1) 87%,
+ rgba(255, 254, 247, 1) 100%
+ );
+ background: -o-linear-gradient(
+ top,
+ rgba(255, 254, 247, 0) 0%,
+ rgba(255, 254, 247, 0.55) 22%,
+ rgba(255, 254, 247, 0.7) 42%,
+ rgba(255, 254, 247, 0.71) 43%,
+ rgba(255, 254, 247, 0.78) 61%,
+ rgba(255, 254, 247, 0.92) 75%,
+ rgba(255, 254, 247, 1) 87%,
+ rgba(255, 254, 247, 1) 100%
+ );
+ background: -ms-linear-gradient(
+ top,
+ rgba(255, 254, 247, 0) 0%,
+ rgba(255, 254, 247, 0.55) 22%,
+ rgba(255, 254, 247, 0.7) 42%,
+ rgba(255, 254, 247, 0.71) 43%,
+ rgba(255, 254, 247, 0.78) 61%,
+ rgba(255, 254, 247, 0.92) 75%,
+ rgba(255, 254, 247, 1) 87%,
+ rgba(255, 254, 247, 1) 100%
+ );
+ background: linear-gradient(
+ to bottom,
+ rgba(255, 254, 247, 0) 0%,
+ rgba(255, 254, 247, 0.55) 22%,
+ rgba(255, 254, 247, 0.7) 42%,
+ rgba(255, 254, 247, 0.71) 43%,
+ rgba(255, 254, 247, 0.78) 61%,
+ rgba(255, 254, 247, 0.92) 75%,
+ rgba(255, 254, 247, 1) 87%,
+ rgba(255, 254, 247, 1) 100%
+ );
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffef7', endColorstr='#fffef7', GradientType=0 );
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fffef7', endColorstr='#fffef7', GradientType=0 );
+}
+
+main,
+footer {
+ width: 70%;
+ margin: 3rem auto;
+ min-width: 850px;
+ padding: 0 20px;
+ box-sizing: border-box;
+}
+
+/* ---------------- Content ------------------- */
+
+h1 {
+ color: #93412b;
+ font-size: 3em;
+ margin-bottom: 20px;
+ font-weight: bold;
+}
+
+h2 {
+ color: #93412b;
+ font-size: 2.5em;
+ margin-bottom: 15px;
+}
+
+h3 {
+ color: #93412b;
+ font-size: 2em;
+ margin-bottom: 10px;
+}
+
+p {
+ line-height: 15px;
+ margin-bottom: 15px;
+ line-height: 1.7em;
+}
+
+.cited {
+ font-style: italic;
+ font-size: 0.8em;
+}
+
+.u {
+ text-decoration: underline;
+}
+.b {
+ font-weight: bold;
+}
+.i {
+ font-style: italic;
+}
+.align_right {
+ text-align: right;
+}
+.align_left {
+ text-align: left;
+ margin-right: 10px;
+}
+.align_center {
+ text-align: center;
+}
+.float_left {
+ float: left;
+}
+.float_right {
+ float: right;
+}
+.clear_both {
+ clear: both;
+}
+strong {
+ font-weight: bold;
+}
+.special {
+ color: #b7595b;
+ font-weight: bold;
+}
+.keyword {
+ color: #db6f50;
+ font-weight: bold;
+ font-style: italic;
+}
+.gray,
+.grey {
+ color: gray;
+}
+
+/* Links */
+main a:link,
+main a:visited {
+ color: #eb690b;
+ font-weight: bold;
+}
+
+main a:focus,
+main a:hover,
+main a:active {
+ color: #eb690b;
+}
+
+ul {
+ list-style-position: outside;
+ margin-bottom: 20px;
+ padding-left: 22px;
+}
+
+ol {
+ margin-bottom: 20px;
+ padding-left: 30px;
+}
+
+li {
+ line-height: 1.4em;
+}
+
+/* ------- Article ------- */
+
+h1 {
+ color: #93412b;
+ font-size: 2.7em;
+ margin-bottom: 20px;
+}
+
+#buy_form input[type='button'] {
+ display: inline-block;
+ padding: 1px 20px 3px 20px;
+ background-color: #93412b;
+ color: white;
+ border: 1px solid white;
+ font-size: 1em;
+ height: 32px;
+}
+
+#buy_form input[type='button']:hover {
+ background-color: white;
+ color: #93412b;
+ border: 1px solid #93412b;
+}
+
+#buy_form select {
+ display: inline-block;
+ font-size: 1em;
+ background-color: white;
+ color: #93412b;
+ border: 1px solid #93412b;
+ height: 32px;
+}
+
+/* ------- Chat ------- */
+
+#chat {
+ width: 100%;
+ background-color: white;
+ border: 1px solid #9c352f;
+ height: 20rem;
+ position: relative;
+}
+
+#chat_window {
+ background-color: white;
+ width: 85%;
+ float: left;
+ height: 95%;
+}
+
+#chat_history {
+ position: absolute;
+ bottom: 8%;
+ max-height: 92%;
+ padding: 0px 0px 5px 7px;
+}
+
+#chat_history p {
+ font-size: 0.6em;
+ margin: 0;
+}
+
+#chat_text {
+ height: 8%;
+ position: absolute;
+ bottom: 0;
+ width: 85%;
+}
+
+#chat_text input {
+ width: 98%;
+ display: block;
+ margin: auto;
+}
+
+#chat_members {
+ list-style-type: none;
+ height: 100%;
+ width: 15%;
+ margin-left: 85%;
+ border-left: 1px solid #9c352f;
+ text-align: right;
+ box-sizing: border-box;
+ min-width: 100px;
+ font-size: 0.8em;
+ padding-top: 5px;
+}
+
+#chat_members li {
+ line-height: 1.2em;
+ padding: 5px 10px 2px 15px;
+}
+
+#chat_members .highlighted {
+ background-color: #c14d45;
+ color: white;
+}
+.chat_member {
+ font-weight: bold;
+}
+.chat_member1 {
+ color: #3626c8;
+}
+.chat_member2 {
+ color: #e38d0b;
+}
+
+#member_search {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ width: 15%;
+ height: 8%;
+}
+
+#member_search input {
+ width: 88%;
+ display: block;
+ margin: auto;
+ text-align: right;
+}
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/favicon.ico b/03_dom/uebungen/u11_tasse-01001/assets/img/favicon.ico
new file mode 100644
index 0000000..bd2cd28
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/favicon.ico differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/js_header.png b/03_dom/uebungen/u11_tasse-01001/assets/img/js_header.png
new file mode 100644
index 0000000..4d14ceb
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/js_header.png differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/logo.png b/03_dom/uebungen/u11_tasse-01001/assets/img/logo.png
new file mode 100644
index 0000000..bbd9fcc
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/logo.png differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_empty.png b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_empty.png
new file mode 100644
index 0000000..d650b1b
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_empty.png differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_paperclip.png b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_paperclip.png
new file mode 100644
index 0000000..7f24721
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_paperclip.png differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_sheets.png b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_sheets.png
new file mode 100644
index 0000000..14680cb
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/newsboard_sheets.png differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug.gif b/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug.gif
new file mode 100644
index 0000000..3a9c8ad
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug.gif differ
diff --git a/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug_grid_embed.jpg b/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug_grid_embed.jpg
new file mode 100644
index 0000000..4399460
Binary files /dev/null and b/03_dom/uebungen/u11_tasse-01001/assets/img/thinkgeek_2024_hot_binary_heat_change_mug_grid_embed.jpg differ
diff --git a/03_dom/uebungen/u11_tasse-01001/index.html b/03_dom/uebungen/u11_tasse-01001/index.html
new file mode 100644
index 0000000..868d5c8
--- /dev/null
+++ b/03_dom/uebungen/u11_tasse-01001/index.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+ 010010000100111101010100
+
+
+
+
+
+
+
+
+
+
+
+ Hot Binary Heat Changing Mug
+ "010010000100111101010100"
+
+
+
+
+ Description
+
+
+ Numbers make up
+ everything in our digital world. They flow around us, invisible like the Force or
+ the Matrix, controlling all our many computer-y devices. Two numbers, in particular:
+ 0 and 1 . Off and On . Well, we can tell you this: when
+ there's no coffee in our cup, we're completely OFF our game. But when our mug is full of hot coffee, we're
+ totally ON. And now, with the Hot Binary Heat Changing Mug , there's a mug that
+ tells us which state our mug is in. In binary!
+
+
+
+ See, the
+ Hot Binary Heat Changing Mug
+ looks like just a dark mug with binary numbers all over it. That's its OFF or cold state. Add hot coffee (or any
+ liquid) and a series of digits will turn white. Read them continuously from left to right, and you'll read:
+ 010010000100111101010100 . That's in binary . Of course,
+ your
+ Hot Binary Heat Changing Mug
+ could just be paying you a compliment. Cheeky, mug.
+
+
+
+
+
+
+ Product Specifications
+
+
+ Hot Binary Heat Changing Mug
+
+ As you add hot liquids, the binary for "HOT" appears (read from left to right in one line, not two:
+ 010010000100111101010100)
+
+ A ThinkGeek creation and exclusive!
+
+ Care Instructions:
+ Hand wash only. Not microwave or dishwasher safe.
+
+ Materials: Ceramic
+ Dimensions: approx. 3.15" diameter x 3.75" tall
+
+
+ You wanna buy it?
+
+ If you like to buy this brilliant mug, just do the following steps:
+
+
+ Select how many items do you want.
+ Press "buy".
+
+
+
+
+
+ (C) by ThinkGeek – Produkttext mit freundlicher Genehmigung von ThinkGeek Inc.
+
+
+
+
diff --git a/03_dom/uebungen/u12_button-bg-color/index.html b/03_dom/uebungen/u12_button-bg-color/index.html
new file mode 100644
index 0000000..616d559
--- /dev/null
+++ b/03_dom/uebungen/u12_button-bg-color/index.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+ Übung 12: Farbe Wechsel Dich
+
+
+
+
+
+
+
+
Übung 12: Farbe Wechsel Dich
+
+
+ Red
+
+ Green
+
+ Blue
+
+
+
+
+
+
diff --git a/03_dom/uebungen/u13_range-bg-color/index.html b/03_dom/uebungen/u13_range-bg-color/index.html
new file mode 100644
index 0000000..83fb59d
--- /dev/null
+++ b/03_dom/uebungen/u13_range-bg-color/index.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+ Übung 13: Farbe Wechsel Dich — Teil 2
+
+
+
+
+
+
+
Übung 13: Farbe Wechsel Dich — Teil 2
+
+
+
+ Rot
+
+
+
+ Grün
+
+
+
+ Blau
+
+
+
+ Aktuelle Farbe:
+ rgb(255, 255, 255)
+ #FFFFFF
+
+
+
+
+
+
+
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/css/awesome-tours.css b/03_dom/uebungen/u14_awesome-tours/assets/css/awesome-tours.css
new file mode 100644
index 0000000..285a5a0
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/assets/css/awesome-tours.css
@@ -0,0 +1,86 @@
+.main-wrapper {
+ margin: 5rem auto;
+ width: 650px;
+ padding: 1rem;
+ border: 1px solid black;
+}
+
+.tours-grid {
+ display: grid;
+ width: 100%;
+ grid-template-columns: 1fr 1fr;
+ grid-template-rows: 200px 200px 0.5fr;
+ gap: 1rem;
+ grid-template-areas:
+ 'item1 item2'
+ 'item1 item3'
+ 'item4 item4';
+}
+
+#fr {
+ grid-area: item1;
+}
+
+#uk {
+ grid-area: item2;
+}
+
+#it {
+ grid-area: item3;
+}
+
+#info {
+ grid-area: item4;
+
+ border: 2px solid #000077;
+ padding: 0.5rem;
+ border-radius: 10px;
+}
+
+img {
+ width: 100%;
+ height: 100%;
+ border-radius: 10px;
+}
+
+.tours {
+ position: relative;
+}
+
+.m-tours #info img {
+ width: 30px;
+}
+
+.flag {
+ font-size: 1.5rem;
+}
+
+.french-flag::before {
+ content: '';
+ display: inline-block;
+ width: 50px;
+ height: 30px;
+ background: red url('../img/fr.png') no-repeat;
+ background-size: cover;
+ margin-right: 0.5rem;
+}
+
+.union-jack::before {
+ content: '';
+ display: inline-block;
+ width: 60px;
+ height: 30px;
+ background: red url('../img/uk.png') no-repeat;
+ background-size: cover;
+ margin-right: 0.5rem;
+}
+
+.italian-flag::before {
+ content: '';
+ display: inline-block;
+ width: 60px;
+ height: 30px;
+ background: red url('../img/it.png') no-repeat;
+ background-size: cover;
+ margin-right: 0.5rem;
+}
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/colosseum.jpg b/03_dom/uebungen/u14_awesome-tours/assets/img/colosseum.jpg
new file mode 100644
index 0000000..1ed563e
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/colosseum.jpg differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/eiffelturm.jpg b/03_dom/uebungen/u14_awesome-tours/assets/img/eiffelturm.jpg
new file mode 100644
index 0000000..5a0f7a4
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/eiffelturm.jpg differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/fr.png b/03_dom/uebungen/u14_awesome-tours/assets/img/fr.png
new file mode 100644
index 0000000..01ecb01
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/fr.png differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/fr.svg b/03_dom/uebungen/u14_awesome-tours/assets/img/fr.svg
new file mode 100644
index 0000000..4110e59
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/assets/img/fr.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/it.png b/03_dom/uebungen/u14_awesome-tours/assets/img/it.png
new file mode 100644
index 0000000..dfdd76a
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/it.png differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/it.svg b/03_dom/uebungen/u14_awesome-tours/assets/img/it.svg
new file mode 100644
index 0000000..20a8bfd
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/assets/img/it.svg
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/tower_bridge.jpg b/03_dom/uebungen/u14_awesome-tours/assets/img/tower_bridge.jpg
new file mode 100644
index 0000000..e81a030
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/tower_bridge.jpg differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/uk.png b/03_dom/uebungen/u14_awesome-tours/assets/img/uk.png
new file mode 100644
index 0000000..b4555e5
Binary files /dev/null and b/03_dom/uebungen/u14_awesome-tours/assets/img/uk.png differ
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/img/uk.svg b/03_dom/uebungen/u14_awesome-tours/assets/img/uk.svg
new file mode 100644
index 0000000..7991383
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/assets/img/uk.svg
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/03_dom/uebungen/u14_awesome-tours/assets/js/awesome-tours.js b/03_dom/uebungen/u14_awesome-tours/assets/js/awesome-tours.js
new file mode 100644
index 0000000..a3c8216
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/assets/js/awesome-tours.js
@@ -0,0 +1,17 @@
+'use strict';
+
+(() => {
+ // === DOM & VARS =======
+ const DOM = {};
+
+ // === INIT =============
+ const init = () => {};
+
+ // === EVENTHANDLER =====
+
+ // === XHR/FETCH ========
+
+ // === FUNCTIONS ========
+
+ init();
+})();
diff --git a/03_dom/uebungen/u14_awesome-tours/index.html b/03_dom/uebungen/u14_awesome-tours/index.html
new file mode 100644
index 0000000..6a3df1c
--- /dev/null
+++ b/03_dom/uebungen/u14_awesome-tours/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ Übung 14: awesome tours
+
+
+
+
+
+
+
+
Übung 14: awesome tours
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Move your mouse pointer over the images to read the descriptions here!
+
+
+
+
+
+
diff --git a/03_dom/uebungen/uebungen-11-14.zip b/03_dom/uebungen/uebungen-11-14.zip
new file mode 100644
index 0000000..fe6f4c7
Binary files /dev/null and b/03_dom/uebungen/uebungen-11-14.zip differ
diff --git a/03_dom/unterricht/tag23/01_chat-final/assets/js/main.js b/03_dom/unterricht/tag23/01_chat-final/assets/js/main.js
index ce93bac..145b874 100644
--- a/03_dom/unterricht/tag23/01_chat-final/assets/js/main.js
+++ b/03_dom/unterricht/tag23/01_chat-final/assets/js/main.js
@@ -22,7 +22,8 @@
// === EVENTHANDLER =====
const onInputSearch = (e) => {
- const value = e.target.value; // aktuelle Eingabe von input
+ const inputEl = e.target;
+ const value = inputEl.value; // aktuelle Eingabe von input
highlightListItemBy(value);
};
diff --git a/03_dom/unterricht/tag23/06_attribut-boolean/index.html b/03_dom/unterricht/tag23/06_attribut-boolean/index.html
index 553f8cf..59b7e61 100644
--- a/03_dom/unterricht/tag23/06_attribut-boolean/index.html
+++ b/03_dom/unterricht/tag23/06_attribut-boolean/index.html
@@ -55,15 +55,16 @@
DOM.buttonCheckOnOff = $('.button-check-on-off');
// IDL mit boolscher Wertzuweisung (RECOMMENDED)
- DOM.cbAgb.checked = true;
+ DOM.cbAgb.checked = true; // DOM.cbAgb.setAttribute('checked', '') <- Alternative NOT RECOMMENDED
DOM.inputSearch.required = false;
DOM.inputSearch.readOnly = false;
+ DOM.cbAgb.checked = false;
DOM.btnSend.disabled = true;
// Content Attribut Methoden
DOM.btnSend.removeAttribute('disabled');
- DOM.btnSend.setAttribute('disabled', '');
+ DOM.btnSend.setAttribute('disabled', ''); // (NOT RECOMMENDED)
DOM.inputRange.addEventListener('input', (e) => {
console.log('value: ', e.target.value); // aktueller Wert
@@ -80,11 +81,37 @@
} else {
DOM.btnSend.disabled = false;
}
-
// DOM.btnSend.disabled = (!cbEl.checked) ? true : false
// DOM.btnSend.disabled = !cbEl.checked;
});
+
+ DOM.buttonCheckOn.addEventListener('click', (e) => {
+ e.preventDefault(); // => Standardverhalten unterbinden (Formulardaten versenden)
+ DOM.cbAgb.checked = true;
+ DOM.btnSend.disabled = false;
+ });
+
+ DOM.buttonCheckOff.addEventListener('click', (e) => {
+ e.preventDefault(); // => Standardverhalten unterbinden (Formulardaten versenden)
+ DOM.cbAgb.checked = false;
+ DOM.btnSend.disabled = true;
+ });
+
+ DOM.buttonCheckOnOff.addEventListener('click', (e) => {
+ e.preventDefault(); // => Standardverhalten unterbinden (Formulardaten versenden)
+
+ // DOM.cbAgb.checked = !DOM.cbAgb.checked; // => !false -> true | !true -> false
+ // DOM.btnSend.disabled = !DOM.btnSend.disabled;
+
+ if (DOM.cbAgb.checked) {
+ DOM.cbAgb.checked = false;
+ DOM.btnSend.disabled = true;
+ } else {
+ DOM.cbAgb.checked = true;
+ DOM.btnSend.disabled = false;
+ }
+ });