From d13afec0546e13d23e4368f4989b30f1ac1c4a9e Mon Sep 17 00:00:00 2001 From: Otoniel Olea Date: Tue, 5 Jan 2021 23:09:44 -0600 Subject: [PATCH 1/5] [Add] Practica 1 --- src/week1/day0/index.html | 39 +++++++++++++++++++++++++++++++ src/week1/day0/media_content.html | 27 +++++++++++++++++++++ src/week1/day0/media_queries.css | 12 ++++++++++ src/week1/day0/style.css | 33 ++++++++++++++++++++++++++ src/week1/day0/todo_list.html | 21 +++++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 src/week1/day0/index.html create mode 100644 src/week1/day0/media_content.html create mode 100644 src/week1/day0/media_queries.css create mode 100644 src/week1/day0/style.css create mode 100644 src/week1/day0/todo_list.html diff --git a/src/week1/day0/index.html b/src/week1/day0/index.html new file mode 100644 index 0000000..d2d8b1f --- /dev/null +++ b/src/week1/day0/index.html @@ -0,0 +1,39 @@ + + + + + + + + Index + +
+ Index +
+ + + + + + + + + + + + + + + + + + + + + + + + +
#descriptionquantity$
1.........
2.........
+ + \ No newline at end of file diff --git a/src/week1/day0/media_content.html b/src/week1/day0/media_content.html new file mode 100644 index 0000000..f4112ee --- /dev/null +++ b/src/week1/day0/media_content.html @@ -0,0 +1,27 @@ + + + + + + + + Media content + +
+ Media content +
+ + +
+ pink flamingo +
+ + + \ No newline at end of file diff --git a/src/week1/day0/media_queries.css b/src/week1/day0/media_queries.css new file mode 100644 index 0000000..d99c58b --- /dev/null +++ b/src/week1/day0/media_queries.css @@ -0,0 +1,12 @@ +@media (min-width: 40rem) { + html { + font-size: 112%; + } + } + + /* large screen (1024px) */ + @media (min-width: 64rem) { + html { + font-size: 120%; + } + } \ No newline at end of file diff --git a/src/week1/day0/style.css b/src/week1/day0/style.css new file mode 100644 index 0000000..464a3d4 --- /dev/null +++ b/src/week1/day0/style.css @@ -0,0 +1,33 @@ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} + +body { + line-height: 1; + background-color: antiquewhite; + text-align: center; + font-size: 34px; +} + +header { + text-align: center; + background-color: darkgray; +} + +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; + background-color: cornflowerblue; +} \ No newline at end of file diff --git a/src/week1/day0/todo_list.html b/src/week1/day0/todo_list.html new file mode 100644 index 0000000..c0b0fde --- /dev/null +++ b/src/week1/day0/todo_list.html @@ -0,0 +1,21 @@ + + + + + + + + My todo list + +
+ My todo list +
+ + + + \ No newline at end of file From 5368c45e49351e9fcf62e9cb760a0d83d4a0bb40 Mon Sep 17 00:00:00 2001 From: Otoniel Olea Date: Tue, 5 Jan 2021 23:33:49 -0600 Subject: [PATCH 2/5] [Add] Se agregan ejercicios del dia 2-5 --- src/week1/days2-5/expanses_table.html | 33 +++++++++++++++++++++ src/week1/days2-5/image.html | 24 +++++++++++++++ src/week1/days2-5/index.html | 21 ++++++++++++++ src/week1/days2-5/sing_out.html | 42 +++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 src/week1/days2-5/expanses_table.html create mode 100644 src/week1/days2-5/image.html create mode 100644 src/week1/days2-5/index.html create mode 100644 src/week1/days2-5/sing_out.html diff --git a/src/week1/days2-5/expanses_table.html b/src/week1/days2-5/expanses_table.html new file mode 100644 index 0000000..8f6ca84 --- /dev/null +++ b/src/week1/days2-5/expanses_table.html @@ -0,0 +1,33 @@ + + + + + + + + +
+

Expenses Table

+
+
+ + + + + + + + + + + + + + + + + +
ExpensesCost
Comida$800
Transporte$500
Internet$500
+
+ + \ No newline at end of file diff --git a/src/week1/days2-5/image.html b/src/week1/days2-5/image.html new file mode 100644 index 0000000..07020cb --- /dev/null +++ b/src/week1/days2-5/image.html @@ -0,0 +1,24 @@ + + + + + + + + +
+

Image

+ Not avaible +

Video

+ +

Audio

+ +
+ + \ No newline at end of file diff --git a/src/week1/days2-5/index.html b/src/week1/days2-5/index.html new file mode 100644 index 0000000..63e7824 --- /dev/null +++ b/src/week1/days2-5/index.html @@ -0,0 +1,21 @@ + + + + + + + + +
+

My todo List Otto

+
+
+
    +
  • Learn
  • +
  • Eat
  • +
  • Study
  • +
  • Work
  • +
+
+ + \ No newline at end of file diff --git a/src/week1/days2-5/sing_out.html b/src/week1/days2-5/sing_out.html new file mode 100644 index 0000000..5d9b975 --- /dev/null +++ b/src/week1/days2-5/sing_out.html @@ -0,0 +1,42 @@ + + + + + + +
+

Sign Up

+
+
+
+ First name:
+ +
+ Last name:
+ +
+ Email:
+ +
+ Birthday:
+ +
+ Favourite Sport:
+ +
+ Bio:
+ +
+
+ + +
+
+ + \ No newline at end of file From 1f8ef963d2af6bafd9888668f968f8889ddd8196 Mon Sep 17 00:00:00 2001 From: Otoniel Olea Date: Mon, 11 Jan 2021 20:54:50 -0600 Subject: [PATCH 3/5] [Add] Ejercicios 1 - 2 de la week 2 --- src/week2/day1/index.html | 83 +++++++++++++++++++++++++++++---- src/week2/day2/indexErrors.html | 4 +- 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/src/week2/day1/index.html b/src/week2/day1/index.html index 246e778..ce98f42 100644 --- a/src/week2/day1/index.html +++ b/src/week2/day1/index.html @@ -1,16 +1,81 @@ +--> \ No newline at end of file diff --git a/src/week2/day2/indexErrors.html b/src/week2/day2/indexErrors.html index f72446f..92c3556 100644 --- a/src/week2/day2/indexErrors.html +++ b/src/week2/day2/indexErrors.html @@ -4,7 +4,7 @@ (function(){ "use strict"; var willPass = "Hi there"; - wontPass = "nope"; + var wontPass = "nope"; console.log(`willPass = ${willPass}`); console.log(`wontPass = ${wontPass}`); @@ -12,7 +12,7 @@ let someArr = [1, 2, 3, 4]; function giveMe(inx) { - return someArr[counter]; + return someArr[inx]; } for (let counter= 0; counter <= someArr.length; counter++) { From 89ae5ed2d03aea3e0e38f834476e1f99fb65dbac Mon Sep 17 00:00:00 2001 From: Otoniel Olea Date: Mon, 11 Jan 2021 21:28:40 -0600 Subject: [PATCH 4/5] [Add] Se agregan ejercicios day3 de la week 2 --- src/week2/day3/indexDOM.html | 28 +++++++++++++++++++++---- src/week2/day3/indexEvents.html | 37 +++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/src/week2/day3/indexDOM.html b/src/week2/day3/indexDOM.html index fe114cd..db59be6 100644 --- a/src/week2/day3/indexDOM.html +++ b/src/week2/day3/indexDOM.html @@ -1,11 +1,31 @@ + +
+
+ + + +
+
+ + + + +--> \ No newline at end of file diff --git a/src/week2/day3/indexEvents.html b/src/week2/day3/indexEvents.html index 7fc3f8a..ffdfc9e 100644 --- a/src/week2/day3/indexEvents.html +++ b/src/week2/day3/indexEvents.html @@ -1,11 +1,40 @@ + + + + + + + +

Da click aqui

+ + + + + + +--> \ No newline at end of file From 03dc85366e9b1ef475a077d4a9ce7d9c50158d3e Mon Sep 17 00:00:00 2001 From: Otoniel Olea Date: Mon, 11 Jan 2021 21:59:18 -0600 Subject: [PATCH 5/5] [Add] ejecicios de node 4-5 week2 --- src/week2/day4-5/expressDemo.js | 18 +++++++++++++++++- src/week2/day4-5/fsDemo.js | 18 ++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/week2/day4-5/expressDemo.js b/src/week2/day4-5/expressDemo.js index 000831f..64ab6a2 100644 --- a/src/week2/day4-5/expressDemo.js +++ b/src/week2/day4-5/expressDemo.js @@ -1,4 +1,5 @@ -const express = ; +const express = require("express"); +const fs = require("fs"); const app = express(); const port = 3000; @@ -6,6 +7,21 @@ app.get('/', (req, res) => { res.send('Hello There!'); }) +app.get('/ramdom', (req, res) => { + res.send(`Random number: ${parseInt(Math.random() * 10)}`) +}) + +// app.get('/bonus', (req, res) => { +// res.send(`Bonus ok`) +// }) + +app.get('/json', (req, res) => { + fs.readFile(__dirnaame + '/package.json', function (err, data) { + if (err) throw err; + res.send(data.toString()); + }) +}) + app.listen(port, () => { console.log('Example server listening on port ' + port); console.log('Enter http://localhost:' + port + ' on your browser') diff --git a/src/week2/day4-5/fsDemo.js b/src/week2/day4-5/fsDemo.js index 8d42541..2469e3b 100644 --- a/src/week2/day4-5/fsDemo.js +++ b/src/week2/day4-5/fsDemo.js @@ -2,13 +2,19 @@ const fs = require('fs'); var fileName = "test.txt", content = "Hey There!"; -fs.writeFile(__dirname + "/" + fileName, content, function(err) { - if(err) { - return console.log(err) - } - console.log("The file was saved!"); -}); +fs.stat(__dirname + "/" + fileName, (err) => { + if (err) { + fs.writeFile(__dirname + "/" + fileName, content, function (err) { + if (err) { + return console.log(err) + } + console.log("The file was saved!"); + }); + } else { + console.log("Existe archivo") + } +}) // This is a node app, this code saves a file on the current path with // the content on the variable with that name.