diff --git a/.github/workflows/validate-integrity.yml b/.github/workflows/validate-integrity.yml new file mode 100644 index 000000000..05e8b2d48 --- /dev/null +++ b/.github/workflows/validate-integrity.yml @@ -0,0 +1,15 @@ +name: Validate Integrity + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + - run: npm install @learnpack/learnpack -g + - run: learnpack audit \ No newline at end of file diff --git a/README.es.md b/README.es.md index dc12173b7..d7bb443a4 100644 --- a/README.es.md +++ b/README.es.md @@ -1,46 +1,75 @@ -# ![alt text](https://assets.breatheco.de/apis/img/images.php?blob&random&cat=icon&tags=breathecode,32) The Excuse Generator + +# El Generador de Excusas + -Disneyland para procrastinadores y perezosos. +Disneylandia para procrastinadores y perezosos. -Este proyecto es ideal para evitar que alguien se moleste, no toma más de 20 líneas de código y puede salvarlo por el resto de su vida. +Este proyecto es ideal para evitar alguien molestoso. No toma más de 20 líneas de código y puede salvarte por el resto de tu vida. -## La Meta +## Objetivo -Queríamos un proyecto que usara muy poco Javascript pero aún con una aplicación muy divertida, el generador de excusas toma -20 líneas de código, es super simple de entender y es el primer proyecto perfecto para cualquier desarrollador principiante. +Queríamos un proyecto que usara muy poco JavaScript, pero que tuviese una aplicación muy divertida, el generador de excusas toma 20 líneas de código, es super simple de entender y es el primer proyecto perfecto para cualquier desarrollador principiante. -## Instrucciones +## 📝 Instrucciones: -Cree un sitio web pequeño que genere una excusa cada vez que se presione un botón (vea la demostración de su mentor acerca de los detalles) +1. Por favor, crea un pequeño sitio web que genere una excusa cada vez que se refresca la página, debe verse así: [Vea la animación de demostración](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true). -Tiene que verse así: [Echa un vistazo a la animación de demostración.](https://projects.breatheco.de/json?slug=excuse-generator&preview). +## Discute con tus compañeros de clase la estrategia primero -## Pista +¿Cómo podemos generar una excusa? ¿Cómo se construyen las oraciones? -1. Cree un index.html con una excusa codificada, no js, solo una excusa en HTML puro y simple. -2. La excusa debe estar dentro de una etiqueta HTML que tenga un ID asignado, por ejemplo: +![explicación del generador de excusas](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/explanation.gif?raw=true) + +¡La idea es generar cada parte de la oración al azar para encontrar grandes excusas! + + + +## 🌱 Cómo comenzar este proyecto + +No clones este repositorio porque vamos a usar una plantilla diferente. + +Recomendamos abrir el repositorio `vanillajs-hello` utilizando un entorno de desarrollo como [Codespaces](https://4geeks.com/es/lesson/tutorial-de-github-codespaces) (recomendado) o [Gitpod](https://4geeks.com/es/lesson/como-utilizar-gitpod). Alternativamente, puedes clonarlo en tu computadora local usando el comando `git clone`. + +Este es el repositorio que necesitas abrir o clonar: + +```text +https://github.com/4GeeksAcademy/vanillajs-hello +``` + +**👉 Por favor sigue estos pasos sobre** [cómo comenzar un proyecto de programación.](https://4geeks.com/es/lesson/como-comenzar-un-proyecto-de-codificacion). + + + +## 💡 Pistas: + ++ En el archivo `index.html` inventa una excusa nueva, sin JS, solo una excusa en HTML puro y simple. ++ La excusa debe estar dentro de una etiqueta HTML que tenga un `id` asignado, por ejemplo: ```html -

My dog eat my homework

+

My dog ate my homework

``` -3. Usando javascript, cree una función que genere y devuelva una excusa aleatoria con la siguiente estructura: ++ Usando JavaScript, crea una función que genere y devuelva una excusa aleatoria con la siguiente estructura: ```js -let who = ['the dog','my granma','his turtle','my bird']; -let what = ['eat','pissed','crushed','broked']; -let when = ['before the class','right in time','when I finished','during my lunch','while I was praying']; +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']; ``` -4. Para crear una excusa consistente, tiene que concatenar un elemento de cada matriz en el orden correcto. -5. Llame a esa función onLoad y establezca la excusa en el HTML interno del elemento HTML #excuse. - ++ Para crear una excusa consistente, tienes que concatenar un elemento de cada array o arreglo en el orden correcto. ++ Usa la función `onload` y establece la excusa en el `innerHTML` del elemento HTML `#excuse`. -## Tecnologias +## Tecnologías -HTML, CSS3, Sass, Javascript, Webpack. +HTML, CSS3, JavaScript, Vite. ## Fundamentos + Este ejercicio cubre los siguientes fundamentos: -1. Usando archivos Javascript externos en tu proyecto. -2. Cómo trabajar con matrices. -3. Generando números al azar. -4. Cuerdas de concatenacion. -5. Usando funciones (al menos un poco). -6. Trabajando con eventos (al menos un poco). + +1. Utilizar archivos JavaScript externos en tu proyecto. +2. Cómo trabajar con arreglos/listas (arrays). +3. Generar números al azar. +4. Concatenar strings (cadenas). +5. Utilizar funciones (al menos un poco). +6. Trabajar con eventos (al menos un poco). + +Este y otros proyectos son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Cursos de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning). diff --git a/README.md b/README.md index 7a87080ea..1a606d751 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,75 @@ -# ![alt text](https://assets.breatheco.de/apis/img/images.php?blob&random&cat=icon&tags=breathecode,32) The Excuse Generator + +# The Excuse Generator + Disneyland for procrastinators and lazy people. -This project is ideal to are avoiding someone annoying, it takes no more than 20 lines of code and it can save you for the rest of your life! +This project is ideal for avoiding someone annoying; it takes no more than 20 lines of code, and it can save you for the rest of your life! -## The Goal +## The Goal: -We wanted a project that used very little Javascript but still with a very fun application, the excuse generator takes -20 lines of code, is super simple to understand and is the perfect first project for any beginner developer. +We wanted a project that used very little JavaScript but still had a very fun application. The excuse generator takes 20 lines of code, is super simple to understand, and is the perfect first project for any beginner developer. -## Instructions +## 📝 Instructions: -Please create a small website that generates an excuse each time a button is pressed, it has to look like this: [Checkout the demo animation](https://projects.breatheco.de/json?slug=excuse-generator&preview). +1. Please create a small website that generates an excuse each time you refresh the page, it has to look like this: [Checkout the demo animation](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true). ## Discuss with your classmates the strategy first -How can we generate an excuse? How are sentences build? +How can we generate an excuse? How are sentences built? -![Excuse generator explanation](https://github.com/breatheco-de/projects/blob/master/p/javascript/beginner/excuse-generator/explanation.gif?raw=true) +![Excuse generator explanation](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/explanation.gif?raw=true) The idea is to generate each part of the sentence randomly to come up with great excuses! -## Hint + + +## 🌱 How to start this project -1. Create a index.html with one excuse hard-coded, no js, just one excuse in pure plain HTML. -2. The excuse must be inside an HTML tag that has an id assinged, for example: +Do not clone this repository because we are going to be using a different template. + +We recommend opening the `vanillajs-hello` template using a provisioning tool like [Codespaces](https://4geeks.com/lesson/what-is-github-codespaces) (recommended) or [Gitpod](https://4geeks.com/lesson/how-to-use-gitpod). Alternatively, you can clone it on your local computer using the `git clone` command. + +This is the repository you need to open or clone: + +```text +https://github.com/4GeeksAcademy/vanillajs-hello +``` + +**👉 Please follow these steps on** [how to start a coding project](https://4geeks.com/lesson/how-to-start-a-project). + + + +## 💡 Hints: + ++ Update your `index.html` with one excuse hard-coded, no JS, just one excuse in pure plain HTML. ++ The excuse must be inside an HTML tag that has an `id` assigned, for example: ```html -

My dog eat my homework

+

My dog ate my homework

``` -3. Using javascript, create a function that generates and returns a random excuse with the following structure: ++ Using JavaScript, create a function that generates and returns a random excuse with the following structure: ```js -let who = ['the dog','my granma','his turtle','my bird']; -let what = ['eat','pissed','crushed','broked']; -let when = ['before the class','right in time','when I finished','during my lunch','while I was praying']; +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']; ``` -4. To create a consistent excuse you have to concatenate one item from each array in the proper order. -5. Call that function onLoad and set the excuse into the innerHTML of the #excuse HTML element. - ++ To create a consistent excuse, you have to concatenate one item from each array in the proper order. ++ Call the function `onload` and set the excuse into the `innerHTML` of the `#excuse` HTML element. ## Technologies -HTML, CSS3, Sass, Javascript, Webpack. +HTML, CSS3, JavaScript, Vite. ## Fundamentals + This exercise covers the following fundamentals: -1. Using external Javascript files in your project. -2. How to work with Arrays. + +1. Using external JavaScript files in your project. +2. How to work with arrays. 3. Generating random numbers. 4. Concatenating strings. 5. Using functions (at least a bit). 6. Working with events (at least a bit). + +This and many other projects are built by students as part of the 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) by [Alejandro Sanchez](https://twitter.com/alesanchezr) and many other contributors. Find out more about our [Full Stack Developer Course](https://4geeksacademy.com/us/coding-bootcamps/part-time-full-stack-developer), and [Data Science Bootcamp](https://4geeksacademy.com/us/coding-bootcamps/datascience-machine-learning). diff --git a/bc.json b/bc.json deleted file mode 100644 index 16abb5186..000000000 --- a/bc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title" : "Code an Excuse Generator in Javascript", - "slug" : "excuse-generator", - "status": "published", - "solution": "https://bitbucket.org/codingacademy/excuse-generator", - "duration" : 4, - "translations": ["es", "us"], - "difficulty": "beginner", - "technologies": ["javascript", "html", "the-dom"], - "description" : "Disneyland for procrastinators. Learning Javascript? This excuse generator tutorial takes no more than 20 lines of code and can save you for the rest of your life!", - "talents": [ - { "badge": "identator", "points": 6 }, - { "badge": "tag-master", "points": 3 }, - { "badge": "window-lover", "points": 3 }, - { "badge": "mouse-god", "points": 3 }, - { "badge": "source-inspector", "points": 5 }, - { "badge": "abc", "points": 5 }, - { "badge": "functional-developer", "points": 5 } - ] -} \ No newline at end of file diff --git a/learn.json b/learn.json new file mode 100644 index 000000000..94144844d --- /dev/null +++ b/learn.json @@ -0,0 +1,39 @@ +{ + "gitpod": true, + "title": { + "us": "Code an Excuse Generator in JavaScript", + "es": "Generador de excusas en Javascript" + }, + "slug": "excuse-generator", + "status": "published", + "video": { + "solution": { + "us": "https://www.youtube.com/watch?v=n43ORx4GMJ0" + } + }, + "solution": "https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/tree/solution", + "duration": 4, + "template_url" : "https://github.com/4GeeksAcademy/vanillajs-hello", + "preview": "https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true", + "translations": ["es", "us"], + "difficulty": "beginner", + "technologies": ["javascript", "html", "the-dom"], + "description": { + "us": "Disneyland for procrastinators! Create an Excuse Generator using just 20 lines of JavaScript. This beginner-friendly project teaches arrays, random number generation, and string concatenation while building a tool to generate excuses.", + "es": "¡Disneylandia para procrastinadores! Crea un generador de excusas utilizando solo 20 líneas de JavaScript. Este proyecto apto para principiantes enseña arreglos, generación de números aleatorios y concatenación de cadenas, mientras construyes una herramienta para generar excusas." + }, + "talents": [ + { "badge": "indentator", "points": 6 }, + { "badge": "tag-master", "points": 3 }, + { "badge": "window-lover", "points": 3 }, + { "badge": "mouse-god", "points": 3 }, + { "badge": "source-inspector", "points": 5 }, + { "badge": "abc", "points": 5 }, + { "badge": "functional-developer", "points": 5 } + ], + "autoPlay": false, + "projectType": "project", + "telemetry": { + "batch":"https://breathecode.herokuapp.com/v1/assignment/me/telemetry?asset_id=180" + } +}