diff --git a/src/week1/day0/.empty b/src/week1/day0/1 - HTML/.empty similarity index 100% rename from src/week1/day0/.empty rename to src/week1/day0/1 - HTML/.empty diff --git a/src/week1/day0/1 - HTML/expenses.html b/src/week1/day0/1 - HTML/expenses.html new file mode 100644 index 0000000..49e9f04 --- /dev/null +++ b/src/week1/day0/1 - HTML/expenses.html @@ -0,0 +1,48 @@ + + + + + + + + Document + + + +
+

Excercise 1 - Expenses

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExpenseMonthYearAmmount
Water serviceJuly2018$500
ElectricityJuly2018$1000
GasJune2018$800
+
+ + + \ No newline at end of file diff --git a/src/week1/day0/1 - HTML/img-vid-sound.html b/src/week1/day0/1 - HTML/img-vid-sound.html new file mode 100644 index 0000000..4849884 --- /dev/null +++ b/src/week1/day0/1 - HTML/img-vid-sound.html @@ -0,0 +1,31 @@ + + + + + + + + Document + + + +
+

Excercise 1 - Image, video & sound

+
+
+

Image

+ Image +

Sound

+ + +

Video

+ + +
+ + + \ No newline at end of file diff --git a/src/week1/day0/1 - HTML/res/example-image.jpg b/src/week1/day0/1 - HTML/res/example-image.jpg new file mode 100644 index 0000000..6552c40 Binary files /dev/null and b/src/week1/day0/1 - HTML/res/example-image.jpg differ diff --git a/src/week1/day0/1 - HTML/res/example-sound.mp3 b/src/week1/day0/1 - HTML/res/example-sound.mp3 new file mode 100644 index 0000000..97de20b Binary files /dev/null and b/src/week1/day0/1 - HTML/res/example-sound.mp3 differ diff --git a/src/week1/day0/1 - HTML/res/example-video.mp4 b/src/week1/day0/1 - HTML/res/example-video.mp4 new file mode 100644 index 0000000..1fc4788 Binary files /dev/null and b/src/week1/day0/1 - HTML/res/example-video.mp4 differ diff --git a/src/week1/day0/1 - HTML/signup.html b/src/week1/day0/1 - HTML/signup.html new file mode 100644 index 0000000..7a64231 --- /dev/null +++ b/src/week1/day0/1 - HTML/signup.html @@ -0,0 +1,60 @@ + + + + + + + + Document + + + +
+

Excercise 1 - Sign Up form

+
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/src/week1/day0/1 - HTML/todo-list.html b/src/week1/day0/1 - HTML/todo-list.html new file mode 100644 index 0000000..510499b --- /dev/null +++ b/src/week1/day0/1 - HTML/todo-list.html @@ -0,0 +1,26 @@ + + + + + + + + Document + + + +
+

My todo list

+
+
+ +
+ + + \ No newline at end of file diff --git a/src/week1/day0/2 - CSS/css/gallery.css b/src/week1/day0/2 - CSS/css/gallery.css new file mode 100644 index 0000000..00034b9 --- /dev/null +++ b/src/week1/day0/2 - CSS/css/gallery.css @@ -0,0 +1,62 @@ +h1, p, span { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} + +@media (max-width: 375px) { + h1 { + font-size: 1.5rem; + } +} + +.col-title { + width: 30%; +} + +.col-subtitle { + width: 60% +} + +.row { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.img-box { + width: 25rem; + padding: 10px; + position: relative; +} + +img { + width: 100%; +} + +.caption { + position: absolute; + width: -webkit-fill-available; + margin: 10px; + left: 0; + top: 0; + text-align: center; + background-color: #000000; + padding: 5px 0; + opacity: 0; + transition: ease-in-out 0.6s +} + +.img-box:hover>.caption { + opacity: 0.8; +} + +.caption p { + color: #ffffff; + font-size: 1.3rem; + text-transform: uppercase; + margin: 0; +} + +.caption span { + color: #d3d3d3; + font-style: italic; +} \ No newline at end of file diff --git a/src/week1/day0/2 - CSS/css/normalize.css b/src/week1/day0/2 - CSS/css/normalize.css new file mode 100644 index 0000000..0d507cd --- /dev/null +++ b/src/week1/day0/2 - CSS/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; +} \ No newline at end of file diff --git a/src/week1/day0/2 - CSS/css/style.css b/src/week1/day0/2 - CSS/css/style.css new file mode 100644 index 0000000..26b9c8b --- /dev/null +++ b/src/week1/day0/2 - CSS/css/style.css @@ -0,0 +1,69 @@ +header { + background-color: #ff0000; +} + +footer { + background-color: #0004ff; +} + +aside { + background-color: #ff8800; +} + +nav { + background-color: #30b110; +} + +html { + font-size: 14px; + font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; +} + +header, footer { + text-align: center; +} + +.header { + font-size: 46px; + height: 15vh; +} + +.footer { + font-size: 10px; + height: 15vh; +} + +.content { + font-size: 14px; + display: flex; + flex-direction: column; + width: 75%; + height: 100%; +} + +.navigation { + font-size: 12px; + width: 25%; +} + +.sidebar { + font-size: 10px; + width: 25%; +} + +*[class$="r"] { + background-color: #ff00ff; +} + +*[class*="a"]:not([class$="r"]) { + background-color: blue; +} + +.central-div { + display: flex; + height: 70vh; +} + +article { + height: -webkit-fill-available; +} \ No newline at end of file diff --git a/src/week1/day0/2 - CSS/gallery.html b/src/week1/day0/2 - CSS/gallery.html new file mode 100644 index 0000000..44a6356 --- /dev/null +++ b/src/week1/day0/2 - CSS/gallery.html @@ -0,0 +1,73 @@ + + + + + + + + + Gallery + + + +
+
+
+

2018 Graphic Design Trends

+
+
+

2018 is the year we finally take risks, in life and in graphic design. Because that’s the only way your design is going to stand out this year.

+

There are millions of things fighting for your audience’s very limited time right now. Bitcoin. Politics. Cats. Food.

+

That means that the things you did to differentiate yourself from the pack in the past aren’t going to work this year.

+

No more boring stock photos or minimalist graphics. 2018 calls for riskier color schemes. Riskier GIFs, even.

+
+
+
+ +
+
+ Authentic photos +
+

Authentic photos

+
+
+
+ Better GIFs +
+

Better GIFs

+ less reactions +
+
+ +
+ Custom illustrations +
+

Custom illustrations

+ no one else is going to be able to replicate that +
+
+
+ Color gradients +
+

Color gradients

+ are making a comeback +
+
+
+ Duotone +
+

Duotone

+
+
+
+ Hand-drawn icons +
+

Hand-drawn icons

+ childish and clean design +
+
+
+ + + + \ No newline at end of file diff --git a/src/week1/day0/2 - CSS/img/authentic-photos.jpg b/src/week1/day0/2 - CSS/img/authentic-photos.jpg new file mode 100644 index 0000000..b5cbc31 Binary files /dev/null and b/src/week1/day0/2 - CSS/img/authentic-photos.jpg differ diff --git a/src/week1/day0/2 - CSS/img/better-gifs.gif b/src/week1/day0/2 - CSS/img/better-gifs.gif new file mode 100644 index 0000000..181823c Binary files /dev/null and b/src/week1/day0/2 - CSS/img/better-gifs.gif differ diff --git a/src/week1/day0/2 - CSS/img/color-gradients.png b/src/week1/day0/2 - CSS/img/color-gradients.png new file mode 100644 index 0000000..21e48a7 Binary files /dev/null and b/src/week1/day0/2 - CSS/img/color-gradients.png differ diff --git a/src/week1/day0/2 - CSS/img/custom-illustrations.gif b/src/week1/day0/2 - CSS/img/custom-illustrations.gif new file mode 100644 index 0000000..2c42ef8 Binary files /dev/null and b/src/week1/day0/2 - CSS/img/custom-illustrations.gif differ diff --git a/src/week1/day0/2 - CSS/img/duotone.png b/src/week1/day0/2 - CSS/img/duotone.png new file mode 100644 index 0000000..ce4f414 Binary files /dev/null and b/src/week1/day0/2 - CSS/img/duotone.png differ diff --git a/src/week1/day0/2 - CSS/img/handdrawn-icons.png b/src/week1/day0/2 - CSS/img/handdrawn-icons.png new file mode 100644 index 0000000..5bea3e4 Binary files /dev/null and b/src/week1/day0/2 - CSS/img/handdrawn-icons.png differ diff --git a/src/week1/day0/2 - CSS/index.html b/src/week1/day0/2 - CSS/index.html new file mode 100644 index 0000000..2158a02 --- /dev/null +++ b/src/week1/day0/2 - CSS/index.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ Main Header +
+ +
+ + +
+
+ Section's header +
+
+ Article +
+
+ Section's footer +
+
+ +
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/week1/days2-5/data-structures.js b/src/week1/days2-5/data-structures.js new file mode 100644 index 0000000..91b2b0b --- /dev/null +++ b/src/week1/days2-5/data-structures.js @@ -0,0 +1,85 @@ +/* Data structures */ + +/* Sum & range */ +function sum(array) { + let result = 0; + for (let i of array) { + result += i; + } + return result; +} + +function range(start, end, step = start < end ? 1 : -1) { + let array = []; + if (step > 0) { + for (let i = start; i <= end; i += step) array.push(i); + } else { + for (let i = start; i >= end; i += step) array.push(i); + } + return array; +} + +/* Reverse array */ +function reverseArray(array) { + let toReturn = []; + for (let i = array.length - 1; i >= 0; i--) { + toReturn.push(array[i]); + } + return toReturn; +} + +function reverseArrayInPlace(array) { + for (let i = 0; i < Math.floor(array.length / 2); i++) { + let aux = array[i]; + array[i] = array[array.length - 1 - i]; + array[array.length - 1 - i] = aux; + } + return array; +} + +/* List */ +function arrayToList(array) { + let list = null; + for (let i = array.length - 1; i >= 0; i--) { + list = { value: array[i], rest: list }; + } + return list; +} + +function listToArray(list) { + let array = []; + let node = list; + while (node != null) { + array.push(node.value); + node = node.rest; + } + return array; +} + +function nth(list, n) { + if (n == 0) return list.value; + else if (!list) return undefined; + else return nth(list.rest, n - 1); +} + +function prepend(value, list) { + return { value, rest: list }; +} + +/* Deep comparison */ +function deepEqual(a, b) { + if (a === b) return true; + if (a == null || b == null || typeof a != Object || typeof b != Object) return false; + + let keysA = Object.keys(a); + let keysB = Object.keys(b); + + if (keysA.length != keysB) return false; + + for (let key of keysA) { + if (!keysB.includes(key) || !deepEqual(a[key], b[key])) + return false; + } + + return true; +} \ No newline at end of file diff --git a/src/week1/days2-5/functions.js b/src/week1/days2-5/functions.js new file mode 100644 index 0000000..be9f356 --- /dev/null +++ b/src/week1/days2-5/functions.js @@ -0,0 +1,41 @@ +/* Functions */ + +/* Minimum */ +function min(n1, n2) { + if (n1 < n2) + return n1 + else + return n2; +} + +/* Recursion: Is Even */ +function isEven(n) { + if (n !== parseInt(n) || n === NaN) + return 'n must be an integer' + else if (n < 0) + return isEven(-n) + else if (n === 1) + return false + else if (n === 0) + return true + else + return isEven(n - 2); +} + +/* Bean counting */ + +/* Count Char */ +function countChar(string, char) { + let count = 0; + for (let i = 0; i < string.length; i++) { + if (string[i] === char) + count++; + } + return count; + +} + +/* Count B's */ +function countBs(string) { + return countChar(string, 'B'); +} \ No newline at end of file diff --git a/src/week1/days2-5/program-structure.js b/src/week1/days2-5/program-structure.js new file mode 100644 index 0000000..1843760 --- /dev/null +++ b/src/week1/days2-5/program-structure.js @@ -0,0 +1,37 @@ +/* Program structure */ + +/* Exercise 1: Looping a triangle */ +function triangle() { + for (let print = '#'; print.length < 8; print += '#') { + console.log(print); + } +} + +/* Exercise 2: Fizz Buzz */ +function fizzbuzz() { + for (let i = 1; i <= 100; i++) { + let toPrint = ""; + if (i % 3 === 0) + toPrint += "Fizz"; + if (i % 5 === 0) + toPrint += "Buzz"; + console.log(toPrint || i); + } +} + +/* Exercise 3: Chessboard */ +function chessboard() { + let size = 8; + let line = ""; + + for (let i = 0; i < size; i++) { + line = ''; + for (let j = 0; j < size; j++) { + if ((i + j) % 2 == 0) + line += ' '; + else + line += '#'; + } + console.log(line + '\n'); + } +}