Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practicesof week one #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/week1/day0/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="media_queries.css" />
<title>Index</title>
</head>
<header>
Index
</header>
<body>
<table>
<thead>
<tr>
<th>#</th>
<th>description</th>
<th>quantity</th>
<th>$</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>2</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
</body>
</html>
27 changes: 27 additions & 0 deletions src/week1/day0/media_content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="media_queries.css" />
<title>Media content</title>
</head>
<header>
Media content
</header>
<body>
<audio controls>
<source src="https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3" type="audio/mp3" />
</audio>
<br />
<img src="https://html.com/wp-content/uploads/flamingo.webp" alt="pink flamingo" width="400" />
<br />
<video controls width="400">
<source
src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
type="video/mp4"
/>
</video>
</body>
</html>
12 changes: 12 additions & 0 deletions src/week1/day0/media_queries.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@media (min-width: 40rem) {
html {
font-size: 112%;
}
}

/* large screen (1024px) */
@media (min-width: 64rem) {
html {
font-size: 120%;
}
}
33 changes: 33 additions & 0 deletions src/week1/day0/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
21 changes: 21 additions & 0 deletions src/week1/day0/todo_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="media_queries.css" />
<title>My todo list</title>
</head>
<header>
My todo list
</header>
<body>
<ul>
<li>task 1</li>
<li>task 2</li>
<li>task 3</li>
<li>task ...</li>
</ul>
</body>
</html>
33 changes: 33 additions & 0 deletions src/week1/days2-5/expanses_table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<header>
<h1>Expenses Table</h1>
</header>
<section>
<table>
<tr>
<th>Expenses</th>
<th>Cost</th>
</tr>
<tr>
<td>Comida</td>
<td>$800</td>
</tr>
<tr>
<td>Transporte</td>
<td>$500</td>
</tr>
<tr>
<td>Internet</td>
<td>$500</td>
</tr>
</table>
</section>
</body>
</html>
24 changes: 24 additions & 0 deletions src/week1/days2-5/image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<section>
<h1>Image</h1>
<img src="./images/video.png" alt="Not avaible">
<h1>Video</h1>
<video width="320" height="240" controls>
<source src="./images/globant.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<h1>Audio</h1>
<audio controls>
<source src="./images/globant_audio.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
</section>
</body>
</html>
21 changes: 21 additions & 0 deletions src/week1/days2-5/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<header>
<h1>My todo List Otto</h1>
</header>
<section>
<ul class="todo-items">
<li>Learn</li>
<li>Eat</li>
<li>Study</li>
<li>Work</li>
</ul>
</section>
</body>
</html>
42 changes: 42 additions & 0 deletions src/week1/days2-5/sing_out.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<header>
<h1>Sign Up</h1>
</header>
<section>
<form>
First name:<br>
<input type="text" name="firstname" value="" required>
<br>
Last name:<br>
<input type="text" name="lastname" value="" required>
<br>
Email:<br>
<input type="email" name="email" value="" required>
<br>
Birthday:<br>
<input type="date" name="birthday" required>
<br>
Favourite Sport:<br>
<select name="sport" required>
<option value="Soccer">Soccer</option>
<option value="Basketball">Basketball</option>
<option value="Baseball">Baseball</option>
<option value="Football">Football</option>
<option value="Other">Other</option>
</select>
<br>
Bio:<br>
<textarea name="bio" rows="10" cols="30"></textarea>
<br>
<br>
<button type="reset">Clear All</button>
<button type="submit">Submit</button>
</form>
</section>
</body>
</html>
83 changes: 74 additions & 9 deletions src/week2/day1/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,81 @@
<!-- Take this file and open it on a browser, then open the console
inside developer tools -->
<script>
var Animal = (function(type) {
this.type = type;
});

Animal.prototype.talk = function() {
console.log(`Hi, I'm an Animal, but also a ${this.type}`);
};
class Animal {
constructor(type, color, nombre) {
this.type = type;
this.color = color;
this.nombre = nombre;
}

get talk() {
if (this.color != 'No info' || this.nombre != 'No info')
console.log(`Hola, soy un ${this.color} ${this.type} de nombre ${this.nombre} `);

else
console.log(`Hola, soy animal, pero tambien un ${this.type} `)
}

set setType(type) {
this.type = type;
}

set setEdad(edad) {
this.edad = edad == 0 ? Math.floor((Math.random() * 20) + 1) : edad;
}

get getEdad() {
return this.edad;
}

get isMayor() {
if (this.edad > 12) {
console.log(`Soy mayor a ${this.type}`)

} else if (this.edad < 4) {
console.log(`Soy menor ${this.type} `);
} else {
console.log(`Tengo una edad de ${this.edad} ${this.type}`)
}
}

}

class Cat extends Animal {
constructor(nombre, genero) {
this.nombre = nombre;
this.genero = genero;
}

set setRaza(raza) {
this.raza = this.raza;
}

get talk(){
if ( typeof this.raza == undefined)
console.log(`Hola, soy un animal pero tambien un ${this.type}`)

else
console.log(`Hola, soy un animal de raza ${this.raza} ${this.type}`);
}

}

let rabbit = new Animal("Conejo","Gris","Carlos");
rabbit.talk;
rabbit.setType='Big Rabbit';
rabbit.talk;
rabbit.setEdad=0;
console.log("Edad : " ,rabbit.getEdad);

let cat = new Cat();
cat.talk;
cat.setRaza = 'Siames';
cat.talk;
console.log(``);


let rabbit = new Animal("Rabbit");
rabbit.talk();
</script>

<!-- Now it's your turn to make some changes
Expand All @@ -25,4 +90,4 @@
**** MAKE A 2nd VERSION USING ES6 CLASSES ****
**** ****
****************************************************
-->
-->
4 changes: 2 additions & 2 deletions src/week2/day2/indexErrors.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
(function(){
"use strict";
var willPass = "Hi there";
wontPass = "nope";
var wontPass = "nope";

console.log(`willPass = ${willPass}`);
console.log(`wontPass = ${wontPass}`);

let someArr = [1, 2, 3, 4];

function giveMe(inx) {
return someArr[counter];
return someArr[inx];
}

for (let counter= 0; counter <= someArr.length; counter++) {
Expand Down
Loading