diff --git a/00-HTML-CSS-basics/CSS_1/css/normalize.css b/00-HTML-CSS-basics/CSS_1/css/normalize.css new file mode 100644 index 000000000..3d6624cd1 --- /dev/null +++ b/00-HTML-CSS-basics/CSS_1/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/00-HTML-CSS-basics/CSS_1/css/style.css b/00-HTML-CSS-basics/CSS_1/css/style.css new file mode 100644 index 000000000..20489a014 --- /dev/null +++ b/00-HTML-CSS-basics/CSS_1/css/style.css @@ -0,0 +1,89 @@ +html, body{ + margin: 0; + height: 100%; +} + +html { + box-sizing: border-box; +} +*, *::before, *::after { + box-sizing: inherit; +} + +*{ + font-size: 14px; + font-family: Verdana; + font-weight: bold !important; /* answer 6*/ +} +header{ + background-color: red; + text-align: center; +} +footer{ + background-color: blue; + text-align: center; +} +aside{ + background-color: yellow; +} +nav{ + background-color: green; +} +section{ + background-color: orange; +} + +.header{ + font-size: 46px; + display: block; + height: 10%; + +} +.footer{ + font-size: 10px; + display: block; + width: 100%; + min-height: 5%; +} +.content{ + font-size: 14px; + width: 50%; + min-height: 85%; + float: left; + padding: 2%; + position: relative; +} +.navigation{ + font-size: 12px; + width: 20%; + min-height: 85%; + display: inline-block; + float:left; +} +.sidebar{ + font-size: 10px; + width: 30%; + min-height: 85%; + float:right; +} +.clear{ + clear: both; +} + +[class$="r"]{ + background-color: magenta; +} + +[class*="a"]:not([class$="r"]){ + background-color: blue; +} + +@media screen and (max-width: 600px) { + .navigation, .sidebar { + width: 100%; + min-height: 5%; + } + .content{ + width: 100%; + } +} \ No newline at end of file diff --git a/00-HTML-CSS-basics/CSS_1/index.html b/00-HTML-CSS-basics/CSS_1/index.html new file mode 100644 index 000000000..ba65f3d06 --- /dev/null +++ b/00-HTML-CSS-basics/CSS_1/index.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + +
Header
+ + + +
Section +
+ Header +
+
article
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/00-HTML-CSS-basics/CSS_2/css/layout.css b/00-HTML-CSS-basics/CSS_2/css/layout.css new file mode 100644 index 000000000..231bf0283 --- /dev/null +++ b/00-HTML-CSS-basics/CSS_2/css/layout.css @@ -0,0 +1,80 @@ +*{ + box-sizing: border-box; +} + +*, *::before, *after{ + box-sizing: inherit; +} +img{ + width: 100%; + height: 100%; +} +body{ + background-color: black; + font-family: Arial, Verdana; + +} +h1{ + color: white; + font-size: 3rem; +} +#container{ + margin: 0 auto; + /* max-width: 48rem; */ + width: 80%; +} +.column{ + float:left; + text-align: center; + position: relative; +} +.column span{ + opacity: 0; + width: 100%; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} +.column span:hover{ + height: 100%; + background-color: none; + opacity: 1; +} +.column span:hover span{ + font-size: 1.2rem; + height: 18%; + background-color: white; + opacity: 0.8; + transition: opacity 2s, height 2s; + padding: 2%; +} +.column.full { + width: 100%; +} +.column.third{ + width: 33.33%; +} +.column.fourth{ + width: 25%; +} + +.clearfix:before, .clearfix:after{ + content: ""; + display: table; +} +.clearfix:after { + clear: both; +} +@media screen and (max-width: 700px) { + h1{font-size: 1rem;} + .column span:hover span{ + font-size: 0.1rem; + height: 25%; + background-color: white; + opacity: 0.8; + transition: opacity 2s, height 3s; + padding: 2%; +} +} \ No newline at end of file diff --git a/00-HTML-CSS-basics/CSS_2/css/normalize.css b/00-HTML-CSS-basics/CSS_2/css/normalize.css new file mode 100644 index 000000000..3d6624cd1 --- /dev/null +++ b/00-HTML-CSS-basics/CSS_2/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/00-HTML-CSS-basics/CSS_2/img/captain.png b/00-HTML-CSS-basics/CSS_2/img/captain.png new file mode 100644 index 000000000..82b44298a Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/captain.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/elasticgirl.png b/00-HTML-CSS-basics/CSS_2/img/elasticgirl.png new file mode 100644 index 000000000..a1906ab0b Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/elasticgirl.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/flash.png b/00-HTML-CSS-basics/CSS_2/img/flash.png new file mode 100644 index 000000000..8bd70ebc6 Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/flash.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/robin.png b/00-HTML-CSS-basics/CSS_2/img/robin.png new file mode 100644 index 000000000..5d0815abb Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/robin.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/spiderman.png b/00-HTML-CSS-basics/CSS_2/img/spiderman.png new file mode 100644 index 000000000..2883b263c Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/spiderman.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/superman.png b/00-HTML-CSS-basics/CSS_2/img/superman.png new file mode 100644 index 000000000..a1e43139e Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/superman.png differ diff --git a/00-HTML-CSS-basics/CSS_2/img/wonderwoman.png b/00-HTML-CSS-basics/CSS_2/img/wonderwoman.png new file mode 100644 index 000000000..ecaad3f19 Binary files /dev/null and b/00-HTML-CSS-basics/CSS_2/img/wonderwoman.png differ diff --git a/00-HTML-CSS-basics/CSS_2/index.html b/00-HTML-CSS-basics/CSS_2/index.html new file mode 100644 index 000000000..333b51bef --- /dev/null +++ b/00-HTML-CSS-basics/CSS_2/index.html @@ -0,0 +1,75 @@ + + + + + + + + CSS Basics Layout + + + + + + + +
+
+

Meet the SuperHeroes!

+
+
+
+ an image of superheroe +
+ This is the Captain! +
+
+ +
+ an image of superheroe +
+ The beautiful elasticgirl +
+
+ +
+ an image of superheroe +
+ Flash, like lightning +
+
+
+ +
+
+ an image of superheroe +
+ Robin, the kid +
+
+ +
+ an image of superheroe +
+ The amazing Spider-Man +
+
+ +
+ an image of superheroe +
+ Superman from Krypton +
+
+
+ an image of superheroe +
+ WonderWoman son of Zeus +
+
+
+ +
+ + + \ No newline at end of file diff --git a/00-HTML-CSS-basics/CSS_2/notas.css b/00-HTML-CSS-basics/CSS_2/notas.css new file mode 100644 index 000000000..417ac5d4f --- /dev/null +++ b/00-HTML-CSS-basics/CSS_2/notas.css @@ -0,0 +1,201 @@ +/* +Notas recordatorias grid +*/ + +/* Min-width Media Queries */ +/* Small screens (default) */ +html { font-size: 100%; } + +/* Medium screens (640px) */ +@media (min-width: 40rem) { + html { font-size: 112%; } +} + +/* Large screens (1024px) */ +@media (min-width: 64rem) { + html { font-size: 120%; } +} + + + +/* +Not All Browsers are Created Equal +Browsers will render your CSS differently. +To avoid this, it’s a good idea to use a modern alternative to a reset like Normalize.css, + which will render elements more consistently cross-browser. + Remember to include it as-is before your stylesheet. + + +*/ + +/* +Add the Viewport Meta Tag +Place in the of your HTML. +This enables use of media queries for cross-device layouts. + +*/ + +/*CSS Box Model +It’s important to understand the basics, like how elements are generated and behave in the browser, before diving into responsive web design. +The CSS Box Model consists of four distinct parts. + +content +Content +The content of the box, where text and images appear. + +padding +Padding +Clears an area around the content. + +border +Border +A border that goes around the padding. + +margin +Margin +Clears an area around the border. +*/ + +/* +Use box-sizing: border-box +Place at the top of your CSS file. The * will target all elements on the page. + +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +Your Choice +What was once a bug is now a widely used CSS property. It basically means you can choose whether or not to include borders and padding in the width of your content. + +Without Box Model +Without box-sizing: border-box +Margin, borders and padding are drawn outside the set width of your content. + +With Box Model +With box-sizing: border-box +Borders and padding are drawn inside the set width of your content. The margin is drawn outside. +*/ + +/* +Create a Container +A container holds all elements and controls the page’s maximum width. Using a container will make designing for responsive easier! + +.container { + margin: 0 auto; + max-width: 48rem; + width: 90%; +} +
+ +
+ +*/ + +/* +Create a Column +With mobile first, columns are block level (takes up the full width available) by default. No additional styles needed! + +
+
+ +
+
+*/ + + + +/* + +Create Column Sizes +On larger screens, columns gain float: left in order to stack content horizontally. +Columns now use padding for gutters, so you no longer need to worry about removing margins. + +.column .half +.column .half +
+
+
+ +
+
+ +
+
+
+@media (min-width: 40rem) { + .column { + float: left; + padding-left: 1rem; + padding-right: 1rem; + } + + .column.full { width: 100%; } + .column.two-thirds { width: 66.7%; } + .column.half { width: 50%; } + .column.third { width: 33.3%; } + .column.fourth { width: 25%; } + .column.flow-opposite { float: right; } +} + +*/ + +/* +Create Rows +Columns are wrapped in rows to prevent other elements from stacking next to them, otherwise known as clearing issues. Rows are cleared using the popular clearfix, which was created by Nicolas Gallagher. + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} + +.clearfix:after { + clear: both; +} + +.clearfix { + *zoom: 1; +} +.column .half +.column .half +.column .half +.column .half +Flow Opposite +Add the class .flow-opposite to columns where you want content to display first on mobile but appear on the right on larger screens. + +
+
+
+ +
+
+ +
+
+
+@media (min-width: 40rem) { + .column.flow-opposite { float: right; } +} + +*/ \ No newline at end of file diff --git a/00-HTML-CSS-basics/HTML/example-image.png b/00-HTML-CSS-basics/HTML/example-image.png new file mode 100644 index 000000000..add070a0b Binary files /dev/null and b/00-HTML-CSS-basics/HTML/example-image.png differ diff --git a/00-HTML-CSS-basics/HTML/example-sound.mp3 b/00-HTML-CSS-basics/HTML/example-sound.mp3 new file mode 100644 index 000000000..a9a911ca3 Binary files /dev/null and b/00-HTML-CSS-basics/HTML/example-sound.mp3 differ diff --git a/00-HTML-CSS-basics/HTML/example-sound.ogg b/00-HTML-CSS-basics/HTML/example-sound.ogg new file mode 100644 index 000000000..9e2b02990 Binary files /dev/null and b/00-HTML-CSS-basics/HTML/example-sound.ogg differ diff --git a/00-HTML-CSS-basics/HTML/example-video.mp4 b/00-HTML-CSS-basics/HTML/example-video.mp4 new file mode 100644 index 000000000..abef63bfc Binary files /dev/null and b/00-HTML-CSS-basics/HTML/example-video.mp4 differ diff --git a/00-HTML-CSS-basics/HTML/example-video.ogv b/00-HTML-CSS-basics/HTML/example-video.ogv new file mode 100644 index 000000000..a886229b9 Binary files /dev/null and b/00-HTML-CSS-basics/HTML/example-video.ogv differ diff --git a/00-HTML-CSS-basics/HTML/expenses.html b/00-HTML-CSS-basics/HTML/expenses.html new file mode 100644 index 000000000..ac7faa371 --- /dev/null +++ b/00-HTML-CSS-basics/HTML/expenses.html @@ -0,0 +1,31 @@ + + + + + Expenses + + + + + + + + + + + + + + + + + + + + + + + +
ExpenseCost
Supermarket$800
Bus$300
Other$400
+ + \ No newline at end of file diff --git a/00-HTML-CSS-basics/HTML/image_video_sound.html b/00-HTML-CSS-basics/HTML/image_video_sound.html new file mode 100644 index 000000000..695fb156c --- /dev/null +++ b/00-HTML-CSS-basics/HTML/image_video_sound.html @@ -0,0 +1,29 @@ + + + + + + Image, Video & Sound + + +

Image, Video & Sound Tags

+ +

Image

+ an example Spider-Man image + +

Video

+ + +

Sound

+ + + \ No newline at end of file diff --git a/00-HTML-CSS-basics/HTML/my_todo_list.html b/00-HTML-CSS-basics/HTML/my_todo_list.html new file mode 100644 index 000000000..4e7a4d8a2 --- /dev/null +++ b/00-HTML-CSS-basics/HTML/my_todo_list.html @@ -0,0 +1,16 @@ + + + + + + My todo list + + +

My todo list

+ + + \ No newline at end of file diff --git a/00-HTML-CSS-basics/HTML/singUp.html b/00-HTML-CSS-basics/HTML/singUp.html new file mode 100644 index 000000000..78fbf33b4 --- /dev/null +++ b/00-HTML-CSS-basics/HTML/singUp.html @@ -0,0 +1,37 @@ + + + + + + SingUp! + + + +
+ +
+ +
+ +
+ +
+ + +
+ +
+
+ + + + +
+ + + \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_1/css/normalize.css b/01-JS-DOM-APIs/EX_1/css/normalize.css new file mode 100644 index 000000000..3d6624cd1 --- /dev/null +++ b/01-JS-DOM-APIs/EX_1/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/01-JS-DOM-APIs/EX_1/css/style.css b/01-JS-DOM-APIs/EX_1/css/style.css new file mode 100644 index 000000000..a94141e69 --- /dev/null +++ b/01-JS-DOM-APIs/EX_1/css/style.css @@ -0,0 +1,54 @@ +body{ + font-family: Arial, Verdana; + background-color: rgb(230,235, 200); +} + +header{ + padding: 5px; + background-color: rgb(210, 215, 180); + border-bottom: 1px dashed grey; +} + +h1, h2, h6{ + text-align: center; +} +h2, h6{ + background-color: rgba(220,200,200); + border: 0px solid black; + margin: 5px; + padding: 5px; +} +section{ + margin:0 auto; + width: 80%; + text-align: center; +} +article{ + padding: 5px; + border-bottom: 1px dashed black; +} + +p{ + margin: 20px; +} +footer{ + width: 100%; + background-color: rgba(220,200,200); + text-align: center; + position: fixed; + bottom: 0; + padding: 5px; +} + +img{ + margin: 20px; +} + +.hiddenSection{ + opacity: 0; + transition: opacity 2s; + +} +.showSection { + opacity: 1; +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_1/img/leon_the_professional.jpg b/01-JS-DOM-APIs/EX_1/img/leon_the_professional.jpg new file mode 100644 index 000000000..0fa61ae93 Binary files /dev/null and b/01-JS-DOM-APIs/EX_1/img/leon_the_professional.jpg differ diff --git a/01-JS-DOM-APIs/EX_1/index.html b/01-JS-DOM-APIs/EX_1/index.html new file mode 100644 index 000000000..4805a1fbf --- /dev/null +++ b/01-JS-DOM-APIs/EX_1/index.html @@ -0,0 +1,61 @@ + + + + + + + + + Excersise 1 + + + + + + + + +
+

Léon: The Professional

+
From Wikipedia, the free encyclopedia
+
+ +
+

About the movie

+
+

+ Léon: The Professional, titled Leon in the UK (and originally titled The Professional in the US and Australia), is a 1994 English-language French thriller film written and directed by Luc Besson. It stars Jean Reno and Gary Oldman, and features the motion picture debut of Natalie Portman. In the film, Léon (Reno), a professional hitman, reluctantly takes in 12-year-old Mathilda (Portman), after her family is murdered by corrupt Drug Enforcement Administration agent Norman Stansfield (Oldman). Léon and Mathilda form an unusual relationship, as she becomes his protégée and learns the hitman's trade. +

+
+
+ +
+

Hello World!

+ A poster of Leon and Matilda +
+ +
+

Plot

+
+

Léon Montana (Jean Reno) is an Italian hitman (or "cleaner", as he refers to himself) living a solitary life in New York City's Little Italy. His work comes from a mafioso named Tony (Danny Aiello). Léon spends his idle time engaging in calisthenics, nurturing a houseplant, and watching old films.

+ +

One day, Léon meets Mathilda Lando (Natalie Portman), a lonely 12-year-old girl. Mathilda lives with her dysfunctional family in an apartment down the hall, and has stopped attending class at her school for troubled girls. Mathilda's abusive father (Michael Badalucco) attracts the ire of corrupt DEA agents, who have been paying him to stash cocaine in his apartment. After they discover he has been cutting the cocaine to keep for himself, DEA agents storm the building, led by sharply dressed drug addict Norman Stansfield (Gary Oldman). During the raid, Stansfield quickly becomes unhinged and murders Mathilda's entire family while she is out shopping for groceries. When Mathilda returns, she realizes what has happened just in time to continue down the hall to Léon's apartment, who hesitantly gives her shelter.

+ +

Mathilda quickly discovers that Léon is a hitman. She begs him to take care of her and to teach her his skills, as she wants to avenge the murder of her four-year-old brother. At first, Léon is unsettled by her presence, and considers murdering her, but he eventually trains Mathilda and shows her how to use various weapons. In exchange, she runs his errands, cleans his apartment, and teaches him how to read. In time, the pair forms a close bond. Mathilda often tells Léon she loves him, but he refuses to reciprocate.

+ +

When Léon heads out for an apparent assignment, Mathilda fills a bag with guns from Léon's collection and sets out to kill Stansfield. She bluffs her way into the DEA office by posing as a delivery girl, only to be ambushed by Stansfield in a bathroom; one of his men arrives and announces that Léon had just killed one of the corrupt DEA agents in Chinatown that morning. Léon, after discovering her plan in a note left for him, rescues Mathilda, killing two more of Stansfield's men in the process. An enraged Stansfield confronts Tony, who is violently interrogated for Léon's whereabouts.

+ +

As Mathilda and Léon recover from the ordeal, Mathilda attempts to seduce Léon. Léon refuses, instead opening up about how he became a cleaner; when Léon was young in Italy, he was in love with a girl from a wealthy family. The two made plans to elope, but when the girl's father discovered their relationship, he killed her out of anger and escaped justice. Léon killed the man out of revenge and fled to New York, where he met Tony and trained to become a cleaner.

+ +

Later, while Mathilda returns home from grocery shopping, a NYPD ESU team sent by Stansfield captures her and attempts to infiltrate Léon's apartment. Léon ambushes the ESU team and rescues Mathilda. Léon creates a quick escape for Mathilda by smashing a hole in an air shaft; he then reassures her, and tells her that he loves her, moments before the police blow up the apartment. In the chaos that follows, Léon sneaks out of the building disguised as a wounded ESU officer; he goes unnoticed save for Stansfield, who follows him and shoots him in the back. As he is dying, Léon places an object in Stansfield's hands that he says is "from Mathilda" before succumbing to his wounds; Stansfield discovers that it is a grenade pin. He then opens Léon's vest to find a cluster of active grenades which detonate, killing Stansfield.

+ +

Mathilda goes to Tony, as Léon had told her to do in the event of his death. Tony tells Mathilda he had been instructed by Léon to give his money to her if anything happened to him; he offers to hold it and provide the money on an allowance basis. Mathilda returns to school and meets the headmistress, who readmits her after Mathilda reveals what had happened to her. She then walks onto a field near the school to plant Léon's houseplant, as she had told Léon that he should "give it roots".

+
+
+ + + + + + + \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_1/js/fadeIn.js b/01-JS-DOM-APIs/EX_1/js/fadeIn.js new file mode 100644 index 000000000..d2c68c470 --- /dev/null +++ b/01-JS-DOM-APIs/EX_1/js/fadeIn.js @@ -0,0 +1,5 @@ +const mostrarSection = document.getElementById('statusSection'); +//when the broswer load +window.onload = function(){ + mostrarSection.classList.add('showSection') +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_2/css/normalize.css b/01-JS-DOM-APIs/EX_2/css/normalize.css new file mode 100644 index 000000000..3d6624cd1 --- /dev/null +++ b/01-JS-DOM-APIs/EX_2/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/01-JS-DOM-APIs/EX_2/css/style.css b/01-JS-DOM-APIs/EX_2/css/style.css new file mode 100644 index 000000000..2f31fc09d --- /dev/null +++ b/01-JS-DOM-APIs/EX_2/css/style.css @@ -0,0 +1,64 @@ +body{ + font-family: Arial, Verdana; + background-color: rgb(230,235, 200); +} + +header{ + padding: 5px; + background-color: rgb(210, 215, 180); + border-bottom: 1px dashed grey; +} + +h1, h2, h6{ + text-align: center; +} +h2, h6{ + background-color: rgba(220,200,200); + border: 0px solid black; + margin: 5px; + padding: 5px; +} +section{ + margin:0 auto; + width: 80%; + text-align: center; +} +article{ + padding: 5px; + border-bottom: 1px dashed black; +} + +p{ + margin: 20px; +} +footer{ + width: 100%; + background-color: rgba(220,200,200); + text-align: center; + position: fixed; + bottom: 0; + padding: 5px; +} + +img{ + margin: 20px; +} + +.hiddenSection{ + opacity: 0; + transition: opacity 2s; + +} +.showSection { + opacity: 1; +} + +.btnDefault{ + color:red; + display: block; + margin: 5px auto; + padding: 10px; + background-color: rgb(255,200,150); + border: 2px solid red; + box-shadow: 1px 1px 5px black; +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_2/img/leon_the_professional.jpg b/01-JS-DOM-APIs/EX_2/img/leon_the_professional.jpg new file mode 100644 index 000000000..0fa61ae93 Binary files /dev/null and b/01-JS-DOM-APIs/EX_2/img/leon_the_professional.jpg differ diff --git a/01-JS-DOM-APIs/EX_2/index.html b/01-JS-DOM-APIs/EX_2/index.html new file mode 100644 index 000000000..5935ba4a0 --- /dev/null +++ b/01-JS-DOM-APIs/EX_2/index.html @@ -0,0 +1,67 @@ + + + + + + + + + Excersise 1 + + + + + + + + +
+

Léon: The Professional

+
From Wikipedia, the free encyclopedia
+
+ +
+

About the movie

+
+

+ Léon: The Professional, titled Leon in the UK (and originally titled The Professional in the US and Australia), is a 1994 English-language French thriller film written and directed by Luc Besson. It stars Jean Reno and Gary Oldman, and features the motion picture debut of Natalie Portman. In the film, Léon (Reno), a professional hitman, reluctantly takes in 12-year-old Mathilda (Portman), after her family is murdered by corrupt Drug Enforcement Administration agent Norman Stansfield (Oldman). Léon and Mathilda form an unusual relationship, as she becomes his protégée and learns the hitman's trade. +

+
+
+ +
+

Hello World!

+ + +
+ +
+ + A poster of Leon and Matilda +
+ +
+

Plot

+
+

Léon Montana (Jean Reno) is an Italian hitman (or "cleaner", as he refers to himself) living a solitary life in New York City's Little Italy. His work comes from a mafioso named Tony (Danny Aiello). Léon spends his idle time engaging in calisthenics, nurturing a houseplant, and watching old films.

+ +

One day, Léon meets Mathilda Lando (Natalie Portman), a lonely 12-year-old girl. Mathilda lives with her dysfunctional family in an apartment down the hall, and has stopped attending class at her school for troubled girls. Mathilda's abusive father (Michael Badalucco) attracts the ire of corrupt DEA agents, who have been paying him to stash cocaine in his apartment. After they discover he has been cutting the cocaine to keep for himself, DEA agents storm the building, led by sharply dressed drug addict Norman Stansfield (Gary Oldman). During the raid, Stansfield quickly becomes unhinged and murders Mathilda's entire family while she is out shopping for groceries. When Mathilda returns, she realizes what has happened just in time to continue down the hall to Léon's apartment, who hesitantly gives her shelter.

+ +

Mathilda quickly discovers that Léon is a hitman. She begs him to take care of her and to teach her his skills, as she wants to avenge the murder of her four-year-old brother. At first, Léon is unsettled by her presence, and considers murdering her, but he eventually trains Mathilda and shows her how to use various weapons. In exchange, she runs his errands, cleans his apartment, and teaches him how to read. In time, the pair forms a close bond. Mathilda often tells Léon she loves him, but he refuses to reciprocate.

+ +

When Léon heads out for an apparent assignment, Mathilda fills a bag with guns from Léon's collection and sets out to kill Stansfield. She bluffs her way into the DEA office by posing as a delivery girl, only to be ambushed by Stansfield in a bathroom; one of his men arrives and announces that Léon had just killed one of the corrupt DEA agents in Chinatown that morning. Léon, after discovering her plan in a note left for him, rescues Mathilda, killing two more of Stansfield's men in the process. An enraged Stansfield confronts Tony, who is violently interrogated for Léon's whereabouts.

+ +

As Mathilda and Léon recover from the ordeal, Mathilda attempts to seduce Léon. Léon refuses, instead opening up about how he became a cleaner; when Léon was young in Italy, he was in love with a girl from a wealthy family. The two made plans to elope, but when the girl's father discovered their relationship, he killed her out of anger and escaped justice. Léon killed the man out of revenge and fled to New York, where he met Tony and trained to become a cleaner.

+ +

Later, while Mathilda returns home from grocery shopping, a NYPD ESU team sent by Stansfield captures her and attempts to infiltrate Léon's apartment. Léon ambushes the ESU team and rescues Mathilda. Léon creates a quick escape for Mathilda by smashing a hole in an air shaft; he then reassures her, and tells her that he loves her, moments before the police blow up the apartment. In the chaos that follows, Léon sneaks out of the building disguised as a wounded ESU officer; he goes unnoticed save for Stansfield, who follows him and shoots him in the back. As he is dying, Léon places an object in Stansfield's hands that he says is "from Mathilda" before succumbing to his wounds; Stansfield discovers that it is a grenade pin. He then opens Léon's vest to find a cluster of active grenades which detonate, killing Stansfield.

+ +

Mathilda goes to Tony, as Léon had told her to do in the event of his death. Tony tells Mathilda he had been instructed by Léon to give his money to her if anything happened to him; he offers to hold it and provide the money on an allowance basis. Mathilda returns to school and meets the headmistress, who readmits her after Mathilda reveals what had happened to her. She then walks onto a field near the school to plant Léon's houseplant, as she had told Léon that he should "give it roots".

+
+
+ + + + + + + \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_2/js/code.js b/01-JS-DOM-APIs/EX_2/js/code.js new file mode 100644 index 000000000..675b19d83 --- /dev/null +++ b/01-JS-DOM-APIs/EX_2/js/code.js @@ -0,0 +1,13 @@ +const mostrarSection = document.getElementById('statusSection'); +window.onload = function(){ + mostrarSection.classList.add('showSection') +} +//first way to show the alert after click on the button +const botonAlerta = document.getElementById('btnOne'); +botonAlerta.onclick = function(){ + alert("You suck! :("); +} +//second way +function message(){ + alert("You suck! :("); +} diff --git a/01-JS-DOM-APIs/EX_3/css/normalize.css b/01-JS-DOM-APIs/EX_3/css/normalize.css new file mode 100644 index 000000000..3d6624cd1 --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/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/01-JS-DOM-APIs/EX_3/css/style.css b/01-JS-DOM-APIs/EX_3/css/style.css new file mode 100644 index 000000000..2f31fc09d --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/css/style.css @@ -0,0 +1,64 @@ +body{ + font-family: Arial, Verdana; + background-color: rgb(230,235, 200); +} + +header{ + padding: 5px; + background-color: rgb(210, 215, 180); + border-bottom: 1px dashed grey; +} + +h1, h2, h6{ + text-align: center; +} +h2, h6{ + background-color: rgba(220,200,200); + border: 0px solid black; + margin: 5px; + padding: 5px; +} +section{ + margin:0 auto; + width: 80%; + text-align: center; +} +article{ + padding: 5px; + border-bottom: 1px dashed black; +} + +p{ + margin: 20px; +} +footer{ + width: 100%; + background-color: rgba(220,200,200); + text-align: center; + position: fixed; + bottom: 0; + padding: 5px; +} + +img{ + margin: 20px; +} + +.hiddenSection{ + opacity: 0; + transition: opacity 2s; + +} +.showSection { + opacity: 1; +} + +.btnDefault{ + color:red; + display: block; + margin: 5px auto; + padding: 10px; + background-color: rgb(255,200,150); + border: 2px solid red; + box-shadow: 1px 1px 5px black; +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_3/img/leon_the_professional.jpg b/01-JS-DOM-APIs/EX_3/img/leon_the_professional.jpg new file mode 100644 index 000000000..0fa61ae93 Binary files /dev/null and b/01-JS-DOM-APIs/EX_3/img/leon_the_professional.jpg differ diff --git a/01-JS-DOM-APIs/EX_3/index.html b/01-JS-DOM-APIs/EX_3/index.html new file mode 100644 index 000000000..ce60db542 --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/index.html @@ -0,0 +1,65 @@ + + + + + + + + + Excersise 3 + + + + + + + + +
+

Léon: The Professional

+
From Wikipedia, the free encyclopedia
+
+ +
+

About the movie

+
+

+ Léon: The Professional, titled Leon in the UK (and originally titled The Professional in the US and Australia), is a 1994 English-language French thriller film written and directed by Luc Besson. It stars Jean Reno and Gary Oldman, and features the motion picture debut of Natalie Portman. In the film, Léon (Reno), a professional hitman, reluctantly takes in 12-year-old Mathilda (Portman), after her family is murdered by corrupt Drug Enforcement Administration agent Norman Stansfield (Oldman). Léon and Mathilda form an unusual relationship, as she becomes his protégée and learns the hitman's trade. +

+
+
+ +
+

Hello World!

+
+ + A poster of Leon and Matilda +
+ + + +
+

Plot

+
+

Léon Montana (Jean Reno) is an Italian hitman (or "cleaner", as he refers to himself) living a solitary life in New York City's Little Italy. His work comes from a mafioso named Tony (Danny Aiello). Léon spends his idle time engaging in calisthenics, nurturing a houseplant, and watching old films.

+ +

One day, Léon meets Mathilda Lando (Natalie Portman), a lonely 12-year-old girl. Mathilda lives with her dysfunctional family in an apartment down the hall, and has stopped attending class at her school for troubled girls. Mathilda's abusive father (Michael Badalucco) attracts the ire of corrupt DEA agents, who have been paying him to stash cocaine in his apartment. After they discover he has been cutting the cocaine to keep for himself, DEA agents storm the building, led by sharply dressed drug addict Norman Stansfield (Gary Oldman). During the raid, Stansfield quickly becomes unhinged and murders Mathilda's entire family while she is out shopping for groceries. When Mathilda returns, she realizes what has happened just in time to continue down the hall to Léon's apartment, who hesitantly gives her shelter.

+ +

Mathilda quickly discovers that Léon is a hitman. She begs him to take care of her and to teach her his skills, as she wants to avenge the murder of her four-year-old brother. At first, Léon is unsettled by her presence, and considers murdering her, but he eventually trains Mathilda and shows her how to use various weapons. In exchange, she runs his errands, cleans his apartment, and teaches him how to read. In time, the pair forms a close bond. Mathilda often tells Léon she loves him, but he refuses to reciprocate.

+ +

When Léon heads out for an apparent assignment, Mathilda fills a bag with guns from Léon's collection and sets out to kill Stansfield. She bluffs her way into the DEA office by posing as a delivery girl, only to be ambushed by Stansfield in a bathroom; one of his men arrives and announces that Léon had just killed one of the corrupt DEA agents in Chinatown that morning. Léon, after discovering her plan in a note left for him, rescues Mathilda, killing two more of Stansfield's men in the process. An enraged Stansfield confronts Tony, who is violently interrogated for Léon's whereabouts.

+ +

As Mathilda and Léon recover from the ordeal, Mathilda attempts to seduce Léon. Léon refuses, instead opening up about how he became a cleaner; when Léon was young in Italy, he was in love with a girl from a wealthy family. The two made plans to elope, but when the girl's father discovered their relationship, he killed her out of anger and escaped justice. Léon killed the man out of revenge and fled to New York, where he met Tony and trained to become a cleaner.

+ +

Later, while Mathilda returns home from grocery shopping, a NYPD ESU team sent by Stansfield captures her and attempts to infiltrate Léon's apartment. Léon ambushes the ESU team and rescues Mathilda. Léon creates a quick escape for Mathilda by smashing a hole in an air shaft; he then reassures her, and tells her that he loves her, moments before the police blow up the apartment. In the chaos that follows, Léon sneaks out of the building disguised as a wounded ESU officer; he goes unnoticed save for Stansfield, who follows him and shoots him in the back. As he is dying, Léon places an object in Stansfield's hands that he says is "from Mathilda" before succumbing to his wounds; Stansfield discovers that it is a grenade pin. He then opens Léon's vest to find a cluster of active grenades which detonate, killing Stansfield.

+ +

Mathilda goes to Tony, as Léon had told her to do in the event of his death. Tony tells Mathilda he had been instructed by Léon to give his money to her if anything happened to him; he offers to hold it and provide the money on an allowance basis. Mathilda returns to school and meets the headmistress, who readmits her after Mathilda reveals what had happened to her. She then walks onto a field near the school to plant Léon's houseplant, as she had told Léon that he should "give it roots".

+
+
+ + + + + + + \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_3/js/code.js b/01-JS-DOM-APIs/EX_3/js/code.js new file mode 100644 index 000000000..8f70bc476 --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/js/code.js @@ -0,0 +1,22 @@ +const mostrarSection = document.getElementById('statusSection'); +window.onload = function(){ + mostrarSection.classList.add('showSection') +} + +function jokesXMLHttpRequest(){ + + var jokesXMLHttpRequest = new XMLHttpRequest(); //create an object with the constructor XMLHttpRequest() + + jokesXMLHttpRequest.open('GET', 'http://api.icndb.com/jokes/random', true); //open an specifyes type of request:method, url, location asyn + + /*asyn operation, wait for that operation to complete (e.g., the resource is returned from the network) + before do anything with that response, otherwise an error will be thrown + i handle this using onload, this is run when the load event fires*/ + jokesXMLHttpRequest.onload = function(){ + var jokesResponse = jokesXMLHttpRequest.responseText; //save text string response + var randomJoke = JSON.parse(jokesResponse); // JSON parse into javascript object + document.getElementById('showJoke').innerHTML = randomJoke.value.joke; // set HTML element id="showJoke" content with de random joke value + } + //the setup is ready and now i run it with send() method + jokesXMLHttpRequest.send(); +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_3/js/dataFetch.js b/01-JS-DOM-APIs/EX_3/js/dataFetch.js new file mode 100644 index 000000000..acf33f2ec --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/js/dataFetch.js @@ -0,0 +1,22 @@ +const mostrarSection = document.getElementById('statusSection'); +window.onload = function(){ + mostrarSection.classList.add('showSection') +} + +function jokesXMLHttpRequest(){ + + var jokesXMLHttpRequest = new XMLHttpRequest(); //create an object with the constructor XMLHttpRequest() + + jokesXMLHttpRequest.open('GET', 'http://api.icndb.com/jokes/random', true); //open an specifyes type of request:method, url, location asyn + + /*asyn operation, wait for that operation to complete (e.g., the resource is returned from the network) + before do anything with that response, otherwise an error will be thrown + i handle this using onload, this is run when the load event fires*/ + jokesXMLHttpRequest.onload = function(){ + var jokesResponse = jokesXMLHttpRequest.responseText; //save text string response + var randomJoke = JSON.parse(jokesResponse); // JSON parse into javascript object + document.getElementById('showJoke').innerHTML = randomJoke.value.joke; // set HTML element id="showJoke" content with de random joke value + } + //the setup is ready and now i run it with send() method + jokesXMLHttpRequest.send(); +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_3/js/promise.js b/01-JS-DOM-APIs/EX_3/js/promise.js new file mode 100644 index 000000000..49583197f --- /dev/null +++ b/01-JS-DOM-APIs/EX_3/js/promise.js @@ -0,0 +1,52 @@ +//EXERCISE START HERE! +function simpleXMLHttpRequest(method, url){ + // Create new promise with the Promise() constructor; + // This has as its argument a function + // with two parameters, resolve and reject + var promise = new Promise(function(resolve, rejected){ + + var request = new XMLHttpRequest(); + + request.open(method, url); + + request.responseType = 'text'; + + //when the request load, check if all is ok + request.onload = function(){ + if(request.status === 200){ + // If successful, resolve the promise by passing back the request response + resolve(request.response); + }else{ + //fails, reject the promise + rejected(Error("Request Fail!")); + } + }; + + //othe error + request.onerror = function(){ + //when the entire request fails, probably a network problem + rejected(Error("Network Fails")); + }; + //setup ready now send de request + request.send(); + }); + + return promise; +} + +var myObject = { + myMethod: "GET", + myURL: "http://api.icndb.com/jokes/random" +} + +var newSimpleRequest = simpleXMLHttpRequest(myObject.myMethod, myObject.myURL); +// promise then() method on to the end of it. This contains two callbacks +newSimpleRequest.then(function(response){ + var jsonResponse = JSON.parse(response); + document.getElementById('showJoke').innerHTML = jsonResponse.value.joke; +}).catch(function(error){ + console.log(error); + document.getElementById('showJoke').style.color = "red"; + document.getElementById('showJoke').innerHTML = "Request Error"; + +}); \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_4/css/normalize.css b/01-JS-DOM-APIs/EX_4/css/normalize.css new file mode 100644 index 000000000..c21680721 --- /dev/null +++ b/01-JS-DOM-APIs/EX_4/css/normalize.css @@ -0,0 +1,269 @@ +/*! 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/01-JS-DOM-APIs/EX_4/css/style.css b/01-JS-DOM-APIs/EX_4/css/style.css new file mode 100644 index 000000000..f4317166d --- /dev/null +++ b/01-JS-DOM-APIs/EX_4/css/style.css @@ -0,0 +1,63 @@ +body{ + font-family: Arial, Verdana; + background-color: rgb(230,235, 200); +} + header{ + padding: 5px; + background-color: rgb(210, 215, 180); + border-bottom: 1px dashed grey; +} + h1, h2, h6{ + text-align: center; +} +h2, h6{ + background-color: rgba(220,200,200); + border: 0px solid black; + margin: 5px; + padding: 5px; +} +section{ + margin:0 auto; + width: 80%; + text-align: center; +} +article{ + padding: 5px; + border-bottom: 1px dashed black; +} + p{ + margin: 20px; +} +footer{ + width: 100%; + background-color: rgba(220,200,200); + text-align: center; + position: fixed; + bottom: 0; + padding: 5px; +} + img{ + margin: 20px; +} + .hiddenSection{ + opacity: 0; + transition: opacity 2s; + +} +.showSection { + opacity: 1; +} + .btnDefault{ + color:red; + display: block; + margin: 5px auto; + padding: 10px; + background-color: rgb(255,200,150); + border: 2px solid red; + box-shadow: 1px 1px 5px black; +} +#columnaDerecha{ + float: right; + background-color: lightblue; + overflow: hidden; +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_4/index.html b/01-JS-DOM-APIs/EX_4/index.html new file mode 100644 index 000000000..8a78cf79f --- /dev/null +++ b/01-JS-DOM-APIs/EX_4/index.html @@ -0,0 +1,30 @@ + + + + + + + + Excersise 4 + + + + + +
+

GitHub API

+
search repository by name
+
+
+
+ + +
+
+
+ + + + + + \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_4/js/first.js b/01-JS-DOM-APIs/EX_4/js/first.js new file mode 100644 index 000000000..a29ddc332 --- /dev/null +++ b/01-JS-DOM-APIs/EX_4/js/first.js @@ -0,0 +1,54 @@ +//EXERCISE START HERE! +function simpleXMLHttpRequest(method, url){ + // Create new promise with the Promise() constructor; + // This has as its argument a function + // with two parameters, resolve and reject + var promise = new Promise(function(resolve, rejected){ + + var request = new XMLHttpRequest(); + request.open(method, url); + request.responseType = 'text'; + //when the request load, check if all is ok + request.onload = function(){ + if(request.status === 200){ + // If successful, resolve the promise by passing back the request response + resolve(request.response); + }else{ + //fails, reject the promise + rejected(Error("Request Fail!")); + } + }; + // + request.onerror = function(){ + //when the entire request fails, probably a network problem + rejected(Error("Network Fails")); + }; + //setup ready now send de request + request.send(); + }); + return promise; +} +var myObject = { + oMethod: "GET", + oURL: "https://api.github.com/search/repositories?q=", + oParameter: "JavaScript" +} + var newSimpleRequest = simpleXMLHttpRequest(myObject.oMethod, myObject.oURL, myObject.oParameter ); +// promise then() method on to the end of it. This contains two callbacks +newSimpleRequest.then(function(response){ + var jsonResponse = JSON.parse(response); + var ArrayNombresRepositorios = []; + for(let i=0; i < jsonResponse.items.length; i++) + { + ArrayNombresRepositorios.push(jsonResponse.items[i].name); + } + var string = "" + document.getElementById('mostrarResultados').innerHTML = string; + }).catch(function(error){ + console.log(error); + document.getElementById('mostrarResultados').innerHTML = "Algo anda mal!"; + }); \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_4/js/input.js b/01-JS-DOM-APIs/EX_4/js/input.js new file mode 100644 index 000000000..cdeb03900 --- /dev/null +++ b/01-JS-DOM-APIs/EX_4/js/input.js @@ -0,0 +1,58 @@ +//EXERCISE START HERE! +function simpleXMLHttpRequest(method, url, search){ + // Create new promise with the Promise() constructor; + // This has as its argument a function + // with two parameters, resolve and reject + var promise = new Promise(function(resolve, rejected){ + + var request = new XMLHttpRequest(); + var completeUrl = url + search; + request.open(method, completeUrl); + request.responseType = 'text'; + //when the request load, check if all is ok + request.onload = function(){ + if(request.status === 200){ + // If successful, resolve the promise by passing back the request response + resolve(request.response); + }else{ + //fails, reject the promise + rejected(Error("Request Fail!")); + } + }; + // + request.onerror = function(){ + //when the entire request fails, probably a network problem + rejected(Error("Network Fails")); + }; + //setup ready now send de request + request.send(); + }); + return promise; +} + +var myObject = { + oMethod: "GET", + oURL: "https://api.github.com/search/repositories?q=", +} + function buscarRepositorio(){ + var nombreRepo = document.getElementById('nombreRepo').value; + var newSimpleRequest = simpleXMLHttpRequest(myObject.oMethod, myObject.oURL, nombreRepo); + // promise then() method on to the end of it. This contains two callbacks + newSimpleRequest.then(function(response){ + var jsonResponse = JSON.parse(response); + var ArrayNombresRepositorios = []; + for(let i=0; i < jsonResponse.items.length; i++) + { + ArrayNombresRepositorios.push(jsonResponse.items[i].name); + } + var string = "" + document.getElementById('mostrarResultados').innerHTML = string; + }).catch(function(error){ + console.log(error); + document.getElementById('mostrarResultados').innerHTML = "Algo anda mal!"; + }); +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_6/code.js b/01-JS-DOM-APIs/EX_6/code.js new file mode 100644 index 000000000..3620b2610 --- /dev/null +++ b/01-JS-DOM-APIs/EX_6/code.js @@ -0,0 +1,47 @@ +//EXERCISE 6 +function loadTable(){ + var matrix = [ + ['Boca', 'River', 'Independiente'], + ['Barcelona', 'Real Madrid', 'Atelico de Madrid'], + ['Milan', 'Inter', 'Juventus'] + ]; + + var table = document.createElement('table'); + var thead = document.createElement('thead'); + var tr = document.createElement('tr'); + var tbody = document.createElement('tbody'); + var div = document.getElementById('divTable'); + + matrix[0].forEach(function (element) { + var th = document.createElement('th'); + var node = document.createTextNode(element); + th.appendChild(node); + tr.appendChild(th); // I HAD A TIPING ERROR HERE IN THE PREVIOUS COMMIT + }); + + thead.appendChild(tr); + table.appendChild(thead); + //create a new element tr + var tr = document.createElement('tr'); + matrix[1].forEach(function (element){ + var td = document.createElement('td'); + var node = document.createTextNode(element); + td.appendChild(node); + tr.appendChild(td); + }); + tbody.appendChild(tr); + + //create a new element tr + var tr = document.createElement('tr'); + matrix[2].forEach(function (element){ + var td = document.createElement('td'); + var node = document.createTextNode(element); + td.appendChild(node); + tr.appendChild(td); + }); + tbody.appendChild(tr); + + table.appendChild(tbody); + + div.appendChild(table); +} \ No newline at end of file diff --git a/01-JS-DOM-APIs/EX_6/index.html b/01-JS-DOM-APIs/EX_6/index.html new file mode 100644 index 000000000..65971759b --- /dev/null +++ b/01-JS-DOM-APIs/EX_6/index.html @@ -0,0 +1,11 @@ + + + + + EX 6 + + + +
+ + \ No newline at end of file diff --git a/02-oop-inheritance/index.html b/02-oop-inheritance/index.html new file mode 100644 index 000000000..e2913135e --- /dev/null +++ b/02-oop-inheritance/index.html @@ -0,0 +1,11 @@ + + + + + + EX 1 + + + + + \ No newline at end of file diff --git a/02-oop-inheritance/js/classes/Actor.js b/02-oop-inheritance/js/classes/Actor.js new file mode 100644 index 000000000..f64bfdc8b --- /dev/null +++ b/02-oop-inheritance/js/classes/Actor.js @@ -0,0 +1,8 @@ +class Actor { + constructor(name, age) { + this.name = name; + this.age = age; + } +} + +export default Actor; \ No newline at end of file diff --git a/02-oop-inheritance/js/classes/EventEmitter.js b/02-oop-inheritance/js/classes/EventEmitter.js new file mode 100644 index 000000000..bbd24cfb5 --- /dev/null +++ b/02-oop-inheritance/js/classes/EventEmitter.js @@ -0,0 +1,39 @@ +class EventEmitter { + constructor() { + this.events = {}; + } + + on(eventName, callback) { + if (!this.events[eventName]) { + this.events[eventName] = []; + } + //the solution because i think should not use de callback as array :O + + this.events[eventName].push(callback); + //console.log(this.events[eventName]); la funcion guardada en la array + } + + emit(eventName) { + const event = this.events[eventName]; + if (event) { + event.forEach(function (callback) { callback.call(null, eventName); }); + } + } + + off(eventName, callback) { + //this.events = {}; if i want to remove all propertys(eventsNames)- all + const event = this.events[eventName]; + if (event) { + event.forEach(function (e, index) { + //event.splice(index, 1); if i want to remove all the elements(callbacks functions)at the array but keep the porperty name(eventName) + //and finally if i want to remove an specific element(callback) at the array but keep the others callbacks + if (e.name == callback.name) { + event.splice(index, 1); + } + }); + } + } + +} + +export default EventEmitter; \ No newline at end of file diff --git a/02-oop-inheritance/js/classes/Logger.js b/02-oop-inheritance/js/classes/Logger.js new file mode 100644 index 000000000..871d0f135 --- /dev/null +++ b/02-oop-inheritance/js/classes/Logger.js @@ -0,0 +1,10 @@ +class Logger { + constructor() { + + } + log(info) { + console.log(`output: The ${info} event has been emitted`); + } +} + +export default Logger; \ No newline at end of file diff --git a/02-oop-inheritance/js/classes/Movie.js b/02-oop-inheritance/js/classes/Movie.js new file mode 100644 index 000000000..8a8491797 --- /dev/null +++ b/02-oop-inheritance/js/classes/Movie.js @@ -0,0 +1,35 @@ +class Movie extends EventEmitter { + constructor(title, year, duration) { + super(); + this.title = title; + this.year = year; + this.duration = duration; + this.actors = []; + } + play() { + super.emit('Play'); + + } + + pause() { + super.emit('Pause'); + } + + resume() { + super.emit('Resume'); + } + + addCast(cast) { + const actors = this.actors; + if (Array.isArray(cast)) { + actors.forEach(function (e) { + actors.push(e); + }); + } else { + actors.push(cast); + } + } + +} + +export default Movie; \ No newline at end of file diff --git a/02-oop-inheritance/js/classes/Social.js b/02-oop-inheritance/js/classes/Social.js new file mode 100644 index 000000000..026bfcfd6 --- /dev/null +++ b/02-oop-inheritance/js/classes/Social.js @@ -0,0 +1,10 @@ +let social = { + share: function(friendName){ + console.log(`${friendName} likes ${this.title}`); + }, + like: function(friendName){ + console.log(`${friendName} share ${this.title}`); + } +} + +export default social; \ No newline at end of file diff --git a/02-oop-inheritance/js/index.js b/02-oop-inheritance/js/index.js new file mode 100644 index 000000000..56927b261 --- /dev/null +++ b/02-oop-inheritance/js/index.js @@ -0,0 +1,47 @@ +import {EventEmitter} from "js/classes/EventEmitter.js"; +import {Actor}from "js/classes/Actor"; +import {Logger} from "js/classes/Logger"; +import {Movie}from "js/classes/Movie"; +import {social}from "js/classes/Social"; + + +const terminatrMovie = new Movie('TerminatorMovie I', 1985, 60); +const terminatorActor = new Actor('terminatorActor Schwarzenegger', 50); +const terminatorActors = [ + new Actor('Paul Winfield', 50), + new Actor('Michael Biehn', 50), + new Actor('Linda Hamilton', 50) +]; +terminatorMovie.addCast(terminatorActor); +terminatorMovie.addCast(terminatorActors); + +//let 's suppose that's when we emit Play we will have two suscriber, play and ads +let playTheMovie = function playTheMovie() { console.log(`Playing the movie ${terminatorMovie.title} - ${terminatorMovie.year}`) }; +terminatorMovie.on('Play', playTheMovie); + +let adsTheMovie = function adsTheMovie() { console.log('Movie Ads') }; +terminatorMovie.on('Play', adsTheMovie); + +//logger +let logger = new Logger(); +terminatorMovie.on('Play', logger.log); + + +//other events listener... +terminatorMovie.on('Pause', function () { console.log(`Pausing the movie ${terminatorMovie.title}`) }); +terminatorMovie.on('Resume', function () { console.log(`Resuming the movie ${terminatorMovie.title}`) }); + +//mix social +let mix = Object.assign(terminatorMovie, social); +terminatorMovie.share('Norman B'); +terminatorMovie.like('Paul P'); + +terminatorMovie.play(); +terminatorMovie.pause(); +terminatorMovie.resume(); + + + +console.log(terminatorMovie.events); // show terminatorMovie events within the object +terminatorMovie.off('Play', playTheMovie); +console.log(terminatorMovie.events); //show terminatorMovie events bus i remove an element at Play event within the object