diff --git a/00-HTML5/audio/audio.mp3 b/00-HTML5/audio/audio.mp3 new file mode 100644 index 000000000..eeb680302 Binary files /dev/null and b/00-HTML5/audio/audio.mp3 differ diff --git a/00-HTML5/expenses.html b/00-HTML5/expenses.html new file mode 100644 index 000000000..d1fbc3d75 --- /dev/null +++ b/00-HTML5/expenses.html @@ -0,0 +1,74 @@ + + + + + Expenses + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
My expenses table
Month of May
No.DateDetailsPayment
12/5/18Light1500
22/5/18Water500
35/5/18Gas400
42/5/18Phone/Internet1000
510/5/18Netflix200
610/5/18Spotify100
711/5/18Food2000
Total5700
+ + + diff --git a/00-HTML5/form.html b/00-HTML5/form.html new file mode 100644 index 000000000..f1cec798c --- /dev/null +++ b/00-HTML5/form.html @@ -0,0 +1,43 @@ + + + + + Form + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+ + + diff --git a/00-HTML5/img/android_logo.png b/00-HTML5/img/android_logo.png new file mode 100644 index 000000000..74a7ec974 Binary files /dev/null and b/00-HTML5/img/android_logo.png differ diff --git a/00-HTML5/list.html b/00-HTML5/list.html new file mode 100644 index 000000000..a085e3640 --- /dev/null +++ b/00-HTML5/list.html @@ -0,0 +1,22 @@ + + + + + List + + +
+

Hello Word

+

My to do list

+
+ +

Daily chores list since I wake up

+
    +
  1. Do the homework
  2. +
  3. Prepare breakfast
  4. +
  5. Order my room
  6. +
  7. Cook something to eat at noon
  8. +
  9. Clean the Garage
  10. +
+ + diff --git a/00-HTML5/multimedia.html b/00-HTML5/multimedia.html new file mode 100644 index 000000000..1fd76580b --- /dev/null +++ b/00-HTML5/multimedia.html @@ -0,0 +1,17 @@ + + + + + Multimedia + + +
+ Android logo +
Hi, my name is Andy! I was born in 2005.
+
+ + + + + + diff --git a/01-JS-DOM-APIs/css/normalize.css b/01-JS-DOM-APIs/css/normalize.css new file mode 100644 index 000000000..47b010e47 --- /dev/null +++ b/01-JS-DOM-APIs/css/normalize.css @@ -0,0 +1,341 @@ +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/01-JS-DOM-APIs/css/style.css b/01-JS-DOM-APIs/css/style.css new file mode 100644 index 000000000..f25de0a35 --- /dev/null +++ b/01-JS-DOM-APIs/css/style.css @@ -0,0 +1,39 @@ +body { + font-family: sans-serif; +} + +button { + display: flex; + margin: 5px; + padding: 10px; +} + +section#hidden { + display: flex; + justify-content: center; + font-size: 30px; + opacity: 0; + animation: hidden 3s; +} + +@keyframes hidden { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +section#info { + text-align: center; +} + +aside { + display: flex; + justify-content: flex-end; +} + +form { + margin: 5px; +} diff --git a/01-JS-DOM-APIs/index.html b/01-JS-DOM-APIs/index.html new file mode 100644 index 000000000..9a51ecce8 --- /dev/null +++ b/01-JS-DOM-APIs/index.html @@ -0,0 +1,46 @@ + + + + + My page + + + + + +
+

Hello Word

+
+ + + + +
+
+ + +
+
+ + + + +
+ + + +
+ + + +
+ + diff --git a/01-JS-DOM-APIs/js/App.js b/01-JS-DOM-APIs/js/App.js new file mode 100644 index 000000000..c683b80f2 --- /dev/null +++ b/01-JS-DOM-APIs/js/App.js @@ -0,0 +1,139 @@ +function see() { + alert("Hello!!"); +} + +function addSection() { + let requestURL = 'http://api.icndb.com/jokes/random', + request = new XMLHttpRequest(); + + request.open('GET', requestURL); + request.responseType = 'json'; + request.send(); + + request.onload = function() { + var objJS = request.response; + addInfo(objJS); + } + + function addInfo(objJS) { + let currentSection = document.getElementById('info'), + p1 = document.createElement('p'), + p2 = document.createElement('p'), + p3 = document.createElement('p'); + + p1.textContent = objJS.type; + p2.textContent = objJS.value.id; + p3.textContent = objJS.value.joke; + + currentSection.appendChild(p1); + currentSection.appendChild(p2); + currentSection.appendChild(p3); + } +} + +var params = { + method: 'GET', + mode: 'cors', + redirect: 'follow', + headers: new Headers({ + 'Content-Type': 'application/json'}) +} + +function requestDate(params) { + let url = 'http://date.jsontest.com', + request = new Request(url, params); + + let currentSection = document.getElementById('requestDate'), + p1 = document.createElement('p'), + p2 = document.createElement('p'); + + currentSection.appendChild(p1); + currentSection.appendChild(p2); + + fetch(request) + .then(r => r.json()) + .then(data => { + console.log(p1.textContent = data.time); + console.log(p2.textContent = data.date); + }) + .catch(() => { + console.error('Something went wrong'); + }) +} + +function requestRepo(params) { + let url = 'https://api.github.com/search/repositories?q=javascript', + request = new Request(url, params), + + currentAside = document.getElementById('repositories'), + currentUl = document.getElementById('list'); + + currentAside.appendChild(currentUl); + + fetch(request) + .then(request => request.json()) + .then(list => { + for (let i = 0; i < list.items.length; i++) { + let full_name = document.createElement('li'); + console.log(full_name.textContent = list.items[i].full_name); + currentUl.appendChild(full_name); + } + }) + .catch(() => { + console.error('Something went wrong'); + }) +} + +function search() { + let input = document.getElementById('text_search').value.toLowerCase(), + output = document.getElementById('id_texts').options; + + for (let i = 0; i < output.length; i++) { + if (output[i].value.indexOf(input) == 0) { + output[i].selected = true; + } + + if (document.forms[0].text_search.value == '') { + output[0].selected = true; + } + } +} + +function convertToTable(toTable = [ + 'Ferrari', 'Ford', + 458, 'Munstang', + 2014, 1969 +]) { + let myTable = document.getElementById('table'), + tr1 = document.createElement('tr'), + tr2 = document.createElement('tr'), + tr3 = document.createElement('tr'), + td1 = document.createElement('td'), + td2 = document.createElement('td'), + td3 = document.createElement('td'), + td4 = document.createElement('td'), + td5 = document.createElement('td'), + td6 = document.createElement('td'); + + td1 = document.createTextNode(toTable[0] + ' '); + td2 = document.createTextNode(toTable[1]); + + tr1.appendChild(td1); + tr1.appendChild(td2); + + td3 = document.createTextNode(toTable[2] + ' '); + td4 = document.createTextNode(toTable[3]); + + tr2.appendChild(td3); + tr2.appendChild(td4); + + td5 = document.createTextNode(toTable[4] + ' '); + td6 = document.createTextNode(toTable[5]); + + tr3.appendChild(td5); + tr3.appendChild(td6); + + myTable.appendChild(tr1); + myTable.appendChild(tr2); + myTable.appendChild(tr3); +}