Override mit neuem Text!
+Hello!
+ +Hellho!
+ +![](assets/img/pic_bulboff.gif)
diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..c6f3277 --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,62 @@ +h1{ + border: 2px dotted; + width: 40%; +} + +#emoji{ + color: red; + font-size: 150px; +} + +main{ + position: relative; + left:160px; /* Same as the width of the sidenav */ + width:80%; + margin-left: 20px; + font-size: 28px; /* Increased text to enable scrolling */ + padding: 0px 10px; +} + +.sidenav { + height: 100%; + width: 160px; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #111; + overflow-x: hidden; + padding-top: 20px; + } + +.sidenav a { + padding: 6px 8px 6px 16px; + text-decoration: none; + font-size: 25px; + color: #818181; + display: block; +} + +.sidenav a:hover { + color: #f1f1f1; +} + + + +@media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} +} + +#circle{ /* AUFGABE C */ + width: 100px; + height: 80px; + background: rgb(237, 183, 20); + border-radius: 45%; +} + +#hotspot{ /* AUFGABE E */ + width: 160px; + height: 120px; + background-color: blue; +} \ No newline at end of file diff --git a/assets/img/1_RR6spBZYaiATXhipWdvNlg.webp b/assets/img/1_RR6spBZYaiATXhipWdvNlg.webp new file mode 100644 index 0000000..df55e24 Binary files /dev/null and b/assets/img/1_RR6spBZYaiATXhipWdvNlg.webp differ diff --git a/assets/img/pic_bulboff.gif b/assets/img/pic_bulboff.gif new file mode 100644 index 0000000..65cacdd Binary files /dev/null and b/assets/img/pic_bulboff.gif differ diff --git a/assets/img/pic_bulbon.gif b/assets/img/pic_bulbon.gif new file mode 100644 index 0000000..72ecfc4 Binary files /dev/null and b/assets/img/pic_bulbon.gif differ diff --git a/assets/java/dom.js b/assets/java/dom.js new file mode 100644 index 0000000..e04e421 --- /dev/null +++ b/assets/java/dom.js @@ -0,0 +1,26 @@ + +/* Override id("app") mit neuem Text*/ +/* + document.getElementById("app").style.color = "blue"; + document.getElementById("app").innerHTML = "Hello Dude!"; + document.getElementById("app").textContent = "Hello All!"; + document.getElementById("app").innerText = "HELL-O Monday!!"; + + document.getElementById("app2").style.color = "green"; + document.getElementById("app2").innerHTML = "Hello Dude!"; + document.getElementById("app2").textContent = "Hello All!"; + document.getElementById("app2").innerText = "HELL-O Monday!!"; */ + + + +/*Sollte emoji verändern je nach Aktion*/ +/* function mOver(){ + let emojiObject = document.getElementById("emoji"); + emojiObject.style.color = 'blue'; + emojiObject.style.fontSize = '200px'; + } + + function mOut(element){ + element.style.color = 'red'; + element.style.fontSize = '100px'; + } */ \ No newline at end of file diff --git a/assets/java/dom2.js b/assets/java/dom2.js new file mode 100644 index 0000000..d7f0851 --- /dev/null +++ b/assets/java/dom2.js @@ -0,0 +1,24 @@ +// Hello Coders - hier noch die Aufgaben, welche wir zusammen erarbeiten: +/* + a) Vorbereitung: Lege zwei Buttons jeweils mit Identifikator (id) + und Beschriftung an. + Aufgabe: Auf Mausklick gib id und Beschriftung des gewählten Buttons + in der Konsole des Browsers aus. + + b) Vorbereitung: Lege einen "JA" Button an. + Aufgabe: Auf Mausklick wechsle die Beschriftung des Buttons auf "NEIN", + wenn vorher "JA" sichtbar war - und umgekehrt (toggle). + + c) Vorbereitung: Lege einen eingefärbten Kreis (CSS Circle) und den Button + "Löschen" daneben an. + Aufgabe: Auf Mausklick lösche den Kreis. + + d) Vorbereitung: Lege einen Paragraphen mit + "
Anzahl Clicks: 0
" + und daneben einen Button mit "increment" beschriftet an. + Aufgabe: Auf Mausklick erhöhe die Zahl jeweils mit 1. + + e) Vorbereitung: Lege ein blaues" + "Du hast" + " " + neu + " " + eier + " " + du + "
"); +}; + +/* DISTANCE TO MILES */ +function mToKm(miles){ + return miles * 1.609; +}; +mToKm(3); + +/* PIZZA ORDER */ +function getPizzaOrder(name, ingredient){ + return name + ' wants to order pizza with ' + ingredient + '.'; +}; + getPizzaOrder('Peter', 'Hawaii'); + + +/* TO UPPER CASE */ +function toUpperCase(text){ + return text.toUpperCase(); +}; + +/* CALCULATE RADIUS */ +function circumference(radius){ + return radius * 2 * Math.PI +}; + +/* NICE WEATHER */ +function weather(niceWeather){ + if (niceWeather){ + return "go for a walk"; + } + else { + return "stay at home and watch netflix"; + } +}; + +/* AGE VERIFICATION */ +function old(age){ + if (age>=18){ + return'You can sign in you Perv.'; + } + else{ + return'You must be at least 18 to sign up.' + } +} + +/* WEEK DAYS */ +function weekDays(day){ + switch (new Date()){ + case "Monday": + return"Damnit, it's Monday again🤮"; + break; + case "Tuesday": + return"Yeah! I'm awake😴😴"; + break; + case "Wednesday": + return"Almost there🪗"; + break; + case "Thursday": + return"Party Time🥳🥳🥳🥳"; + break; + case "Friday": + return"Party On🤤🤤"; + break; + case "Saturday": + return"Ooooh Yeah🥳🥳"; + break; + case "Sunday": + return"Again?!!🤮🔨"; + break; + } +} + + +/* DAILY ACTIVITIES */ +function daily(){ + let dailyActivities = ['eat', 'sleep', 'shower']; + dailyActivities.push('cook', 'clean'); + for (let i = 0; i <= 7; i++){ + document.writeln(dailyActivities[i].toUpperCase()); + }; +} + +/* WEATHER DATA */ +function logWeatherData() { + let weatherData = { + date: '2022-12-01', + temperature: 30, + humidity: 10 + }; + + document.writeln(weatherData.date + ' tag.
+ writeOutput(html);
+
+ // SUPPORT FUNCTIONS ------------------------------------------------
+
+ function makeTestReport(a, b, c) {
+ // Berechne das resultat der ersten Formel ab + ¬ac + bc
+ // "¬" wird mit Alt Gr + 6 erzeugt - danke Chaimaa.
+ let result1 = (a && b) || (!a && c) || (b && c);
+
+ // Berechne das resultat der zweiten Formel ab + ¬ac
+ let result2 = (a && b) || (!a && c);
+
+ // Generate einen output string (HTML fragment).
+ let html = line(); // Empty line. This is the same as html = html + line(); line("Calculate logical expression with JavaScript");
+ html += line(`With a = ${a}, b = ${b} and c = ${c}`);
+ html += line(`ab + ¬ac + bc = ${result1}`);
+ html += line(`ab + ¬ac = ${result2}`);
+
+ return html; // HTML Fragment zurückgeben.
+ }
+
+ function line(text) {
+ if (text) {
+ // Das argument text ist ein nicht leerer String.
+ return text + '
';
+ }
+ else return '
';
+ }
+
+ function writeOutput(html) {
+ document.getElementById("output").innerHTML = html;
+ // Wäre auch möglich mit document.querySelector("#output")
+ // innerText wäre für Text ohne HTML-Tags
+ }
+
\ No newline at end of file
diff --git a/dom.html b/dom.html
new file mode 100644
index 0000000..8d203d0
--- /dev/null
+++ b/dom.html
@@ -0,0 +1,86 @@
+
+
+
Hier ist eine Seite die einige Funktionen
+ des JavaScripts und DOM's aufzeigt.
Viel Spass
+HELLO WORLD
+Hello World
+ + +DU EI
+ +DISTANCE TO MILES
+ +PIZZA ORDER
+ +TO UPPER CASE
+ +CALCULATE RADIUS
+ +NICE WEAHTER
+ +AGE VERIFICATION
+ +NUMMBER PLAYS 1
+ +NUMMBER PLAYS 2
+ +NUMMBER PLAYS 3
+ +WEEK DAYS
+ +DAYS OF THE WEEK
+ +DAILY ACTIVITIES
+ +WEATHER DATA
+ +FULL NAME
+ +FULL
+ +HEROES
+ +