diff --git a/src/app.js b/src/app.js index f129d1c9e..f8082ee1f 100644 --- a/src/app.js +++ b/src/app.js @@ -1,11 +1,22 @@ -/* eslint-disable */ -import "bootstrap"; -import "./style.css"; - -import "./assets/img/rigo-baby.jpg"; -import "./assets/img/4geeks.ico"; - -window.onload = function() { - //write your code here - console.log("Hello Rigo from the console!"); -}; +// Función para generar excusas +window.onload = function () { + generarExcusa(); +}; + +function generarExcusa() { + let who = ['The dog', 'My grandma', 'The mailman', 'My bird']; + let action = ['ate', 'peed', 'crushed', 'broke']; + let what = ['my homework', 'my phone', 'the car']; + let when = ['before the class', 'when I was sleeping', 'while I was exercising', 'during my lunch', 'while I was praying']; + + let rnd1 = Math.floor(Math.random() * who.length); + let rnd2 = Math.floor(Math.random() * action.length); + let rnd3 = Math.floor(Math.random() * what.length); + let rnd4 = Math.floor(Math.random() * when.length); + + // Genera la excusa combinando las partes + let excuse = `${who[rnd1]} ${action[rnd2]} ${what[rnd3]} ${when[rnd4]}`; + + // Muestra la excusa en el elemento con id "excuse" + document.querySelector("#excuse").innerHTML = excuse; +} diff --git a/src/index.html b/src/index.html index e275741cf..1cfab9b8f 100644 --- a/src/index.html +++ b/src/index.html @@ -1,29 +1,24 @@ - - - - - - Hello Rigo with Vanilla.js - - - - -
-

Hello Rigo!

- -

- If this text is not centered and yellow, you probably have - an error -

-
- Made with ❤️ by - 4Geeks Academy -
-
- - + + + + + + Excusa Segura! + + + + + + + + +
+

No te lo vas a creer pero...

+ Rigo baby +

My dog ate my homework

+
+ + + + + diff --git a/src/style.css b/src/style.css index 9ba1b2987..2a03c63bc 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,11 @@ -@import "~bootstrap/dist/css/bootstrap.min.css"; +@import "~bootstrap/dist/css/bootstrap.min.css"; + +#titulo{ + text-decoration: solid; + color: brown; +} + +#excuse{ + text-decoration: solid; + color: rgb(19, 4, 228); +} \ No newline at end of file