├── index.html ├── .learn ├── assets │ ├── preview-raw.png │ ├── 13.gif │ ├── 12.1.png │ ├── build.png │ ├── thumb.png │ ├── 4geeks.png │ ├── preview.png │ ├── strategy.gif │ ├── VZS6rNiYfC.gif │ ├── run-button.png │ ├── github-logo.webp │ ├── header-styles.png │ ├── new-terminal.png │ ├── red-borders.png │ ├── header-content.png │ ├── 07-the-first-div.png │ ├── 12.1-body-content.gif │ ├── 11-postcard-divisions.gif │ ├── 12-split-postcard-body.gif │ └── display-block-vs-flex.png ├── utils │ ├── jest.config.js │ ├── sample.html │ ├── test.js │ └── dom.js └── exercises │ ├── 02-create-index │ ├── test.js │ ├── README.es.md │ └── README.md │ ├── 11.1-header-content │ ├── solution.hide.css │ ├── solution.hide.html │ ├── README.md │ ├── README.es.md │ └── test.js │ ├── 04-build-the-website │ ├── README.md │ └── README.es.md │ ├── 01-design │ ├── README.md │ └── README.es.md │ ├── 14-goodbye │ ├── README.md │ └── README.es.md │ ├── 03-add-first-html │ ├── README.md │ └── README.es.md │ ├── 08-adding-styles │ ├── README.es.md │ ├── README.md │ └── test.js │ ├── 11.2-header-styles │ ├── test.js │ ├── README.md │ └── README.es.md │ ├── 08.1-red-borders │ ├── README.md │ ├── README.es.md │ └── test.js │ ├── 06-lets-start-building │ ├── test.js │ ├── README.md │ └── README.es.md │ ├── 09-connecting-stylesheet │ ├── README.es.md │ ├── README.md │ └── test.js │ ├── 13-check-your-code │ ├── README.es.md │ └── README.md │ ├── 11-postcard-divisions │ ├── README.es.md │ ├── README.md │ └── test.js │ ├── 07-the-first-div │ ├── README.es.md │ ├── README.md │ └── test.js │ ├── 05-how-to-start │ ├── README.md │ └── README.es.md │ ├── 12.1-body-content │ ├── test.js │ ├── README.es.md │ └── README.md │ ├── 12-split-postcard-body │ ├── test.js │ ├── README.es.md │ └── README.md │ ├── 10-center-postcard │ ├── README.md │ ├── README.es.md │ └── test.js │ └── 00-welcome │ ├── README.md │ └── README.es.md ├── .gitignore ├── .vscode └── settings.json ├── .gitpod.Dockerfile ├── .gitpod.yml ├── .github └── workflows │ └── learnpack-audit.yml ├── .devcontainer └── devcontainer.json ├── learn.json ├── README.es.md └── README.md /index.html: -------------------------------------------------------------------------------- 1 | hello!! world 2 | -------------------------------------------------------------------------------- /.learn/assets/preview-raw.png: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.learn/utils/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | }; -------------------------------------------------------------------------------- /.learn/assets/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/13.gif -------------------------------------------------------------------------------- /.learn/assets/12.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/12.1.png -------------------------------------------------------------------------------- /.learn/assets/build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/build.png -------------------------------------------------------------------------------- /.learn/assets/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/thumb.png -------------------------------------------------------------------------------- /.learn/assets/4geeks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/4geeks.png -------------------------------------------------------------------------------- /.learn/assets/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/preview.png -------------------------------------------------------------------------------- /.learn/assets/strategy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/strategy.gif -------------------------------------------------------------------------------- /.learn/assets/VZS6rNiYfC.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/VZS6rNiYfC.gif -------------------------------------------------------------------------------- /.learn/assets/run-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/run-button.png -------------------------------------------------------------------------------- /.learn/assets/github-logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/github-logo.webp -------------------------------------------------------------------------------- /.learn/assets/header-styles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/header-styles.png -------------------------------------------------------------------------------- /.learn/assets/new-terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/new-terminal.png -------------------------------------------------------------------------------- /.learn/assets/red-borders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/red-borders.png -------------------------------------------------------------------------------- /.learn/assets/header-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/header-content.png -------------------------------------------------------------------------------- /.learn/assets/07-the-first-div.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/07-the-first-div.png -------------------------------------------------------------------------------- /.learn/assets/12.1-body-content.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/12.1-body-content.gif -------------------------------------------------------------------------------- /.learn/assets/11-postcard-divisions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/11-postcard-divisions.gif -------------------------------------------------------------------------------- /.learn/assets/12-split-postcard-body.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/12-split-postcard-body.gif -------------------------------------------------------------------------------- /.learn/assets/display-block-vs-flex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breatheco-de/exercise-postcard/HEAD/.learn/assets/display-block-vs-flex.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .theia 2 | 3 | .learn/_app 4 | .learn/.session 5 | .learn/dist 6 | .learn/reports 7 | app.tar.gz 8 | config.json 9 | vscode_queue.json 10 | !.vscode -------------------------------------------------------------------------------- /.learn/exercises/02-create-index/test.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | 3 | test("Make sure you have your index.html", function(){ 4 | const indexExists = fs.existsSync(`./index.html`); 5 | expect(indexExists).toBe(true); 6 | }) -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.autoSave": "afterDelay", 3 | "files.autoSaveDelay": 700, 4 | "editor.minimap.enabled": false, 5 | "workbench.editorAssociations": { 6 | "*.md": "vscode.markdown.preview.editor" 7 | } 8 | } -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-full 2 | 3 | USER gitpod 4 | 5 | RUN npm i jest@29.7.0 jest-environment-jsdom@29.7.0 -g 6 | RUN npm i @learnpack/learnpack@4.0.8 -g && learnpack plugins:install @learnpack/node@1.1.12 && learnpack plugins:install @learnpack/html@1.1.7 7 | -------------------------------------------------------------------------------- /.learn/exercises/11.1-header-content/solution.hide.css: -------------------------------------------------------------------------------- 1 | * { 2 | min-height: 10px; 3 | border: 1px dashed red; 4 | } 5 | body { 6 | background: black; 7 | } 8 | 9 | .postcard { 10 | width: 400px; 11 | height: 300px; 12 | background: white; 13 | margin: auto; 14 | } 15 | -------------------------------------------------------------------------------- /.learn/utils/sample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.learn/exercises/04-build-the-website/README.md: -------------------------------------------------------------------------------- 1 | # `04` Build the website 2 | 3 | Now it's time to see how your changes look like on your website! 4 | 5 | ## 📝 Instructions: 6 | 7 | 1. Click the `Run`, to see your website live. 8 | 9 | ## 🔎 Important: 10 | 11 | + You can build as many times as you want, we recommend you to do it every time you make changes, that way you can check your progress as you go. 12 | -------------------------------------------------------------------------------- /.learn/exercises/04-build-the-website/README.es.md: -------------------------------------------------------------------------------- 1 | # `04` Build the website 2 | 3 | ¡Es hora de revisar cómo se ven los cambios en tu sitio web! 4 | 5 | ## 📝 Instrucciones: 6 | 7 | 1. Haz clic en botón `Ejecutar`, para ver tu website en vivo. 8 | 9 | ## 🔎 Importante: 10 | 11 | + Puedes hacerlo cuantas veces quieras. Te recomendamos hacerlo cada vez que hagas cambios, de esa forma puedes verificar tu progreso. 12 | -------------------------------------------------------------------------------- /.learn/exercises/01-design/README.md: -------------------------------------------------------------------------------- 1 | 2 | # `01` Design 3 | 4 | We are going to be building this postcard in HTML/CSS: 5 | 6 | ![Poscard Preview](../../assets/thumb.png?raw=true) 7 | 8 | [Click here to open a bigger picture](https://raw.githubusercontent.com/breatheco-de/exercise-postcard/86dcbe572cfad6a40b1909025a2fdaa63d76919c/.learn/assets/preview.png?raw=true) 9 | 10 | Click on the `next ➡` button on the upper right corner of the screen to go to the next instructions. 11 | -------------------------------------------------------------------------------- /.learn/exercises/14-goodbye/README.md: -------------------------------------------------------------------------------- 1 | # `14` Goodbye 2 | 3 | ## You did it, your postcard is ready! 👏 4 | 5 | The HTML is at 100%, maybe you can add a few more styles to make it look even better. You can keep playing with them to make your postcard look even more similar to the given example ;) 6 | 7 | > If you have questions remember to ask using [4Geeks Academy's Slack channel](https://4geeksacademy.slack.com/), and here is my twitter [alesanchezr](https://twitter.com/alesanchezr). 8 | -------------------------------------------------------------------------------- /.learn/exercises/02-create-index/README.es.md: -------------------------------------------------------------------------------- 1 | # `02` Create Index 2 | 3 | Todos los sitios web en el mundo deben comenzarse con un archivo llamado `index.html`, al crearlo manualmente el computador lo reconocerá como el `entry point` (punto de entrada) de tu aplicación. 4 | 5 | ## 📝 Instrucciones: 6 | 7 | 1. Por favor, crea un archivo llamado `index.html` en la raíz del proyecto. 8 | 9 | ## 💡 Pista: 10 | 11 | + Debes ser cuidadoso porque el nombre del archivo debe ser exactamente ese. 12 | -------------------------------------------------------------------------------- /.learn/exercises/01-design/README.es.md: -------------------------------------------------------------------------------- 1 | 2 | # `01` Design 3 | 4 | Vamos a construir este postcard (postal) con HTML/CSS: 5 | 6 | ![Poscard Preview](../../assets/thumb.png?raw=true) 7 | 8 | [Haz clic aquí para ver la imagen más grande](https://raw.githubusercontent.com/breatheco-de/exercise-postcard/86dcbe572cfad6a40b1909025a2fdaa63d76919c/.learn/assets/preview.png?raw=true) 9 | 10 | Haz clic en el botón `next ➡` en la esquina superior derecha de la pantalla para ir a las siguientes instrucciones. 11 | -------------------------------------------------------------------------------- /.learn/exercises/03-add-first-html/README.md: -------------------------------------------------------------------------------- 1 | # `03` Add first HTML 2 | 3 | Our file is currently empty; `.html` files must be filled with HTML ``. 4 | 5 | An HTML `` is just a sentence that starts and ends with the same word. 6 | 7 | ### Example: 8 | 9 | ```html 10 | Anything 11 | ``` 12 | 13 | > `` is an HTML tag used to make the text bold (more thick). 14 | 15 | ## 📝 Instructions: 16 | 17 | 1. Add into your `index.html` file the HTML code of the example. 18 | -------------------------------------------------------------------------------- /.learn/exercises/14-goodbye/README.es.md: -------------------------------------------------------------------------------- 1 | # `14` Goodbye 2 | 3 | ## ¡Lo lograste, tu postcard está lista! 👏 4 | 5 | El HTML está al 100%, tal vez puedas añadir algunos estilos más para que se vea aún mejor. Puedes seguir jugando con ellos para que tu postcard se vea incluso más similar al ejemplo dado ;) 6 | 7 | > Si tienes alguna pregunta, puedes hacerlas a través de Slack [4Geeks Academy's Slack channel](https://4geeksacademy.slack.com/), y aquí tienes mi twitter [alesanchezr](https://twitter.com/alesanchezr). 8 | -------------------------------------------------------------------------------- /.learn/exercises/02-create-index/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=-ewDD9VJE80 3 | --- 4 | 5 | # `02` Create Index 6 | 7 | All websites in the world must start with a file called `index.html`, when you manually create it, the computer will recognize it as the `entry point` of your application. 8 | 9 | ## 📝 Instructions: 10 | 11 | 1. Please create a file called `index.html` on the root of the project. 12 | 13 | ## 💡 Hint: 14 | 15 | + Be very careful because the name of the file has to be exact. 16 | 17 | -------------------------------------------------------------------------------- /.learn/exercises/03-add-first-html/README.es.md: -------------------------------------------------------------------------------- 1 | # `03` Add first HTML 2 | 3 | Nuestro archivo está vacío; los archivos `.html` deben tener `` (etiquetas) HTML. 4 | 5 | Un `` HTML es simplemente una oración que comienza y termina con la misma palabra. 6 | 7 | ### Ejemplo: 8 | 9 | ```html 10 | Cualquier cosa 11 | ``` 12 | 13 | > `` es un tag HTML utilizado para que el texto esté en negrita (más grueso). 14 | 15 | ## 📝 Instrucciones: 16 | 17 | 1. Añade dentro de tu archivo `index.html` el código HTML que aparece en el ejemplo. 18 | -------------------------------------------------------------------------------- /.learn/exercises/08-adding-styles/README.es.md: -------------------------------------------------------------------------------- 1 | # `08` Adding styles 2 | 3 | Si le das clic a `build` ahora, verás que solo dice "Hello". Eso es porque el `
` que acabamos de añadir no tiene estilos; cambiemos eso. 4 | 5 | Para comenzar a darle vida a tu sitio web, debes empezar por añadir un archivo `styles.css`. Este contendrá todo el código de estilos de tu sitio web. 6 | 7 | ## 📝 Instrucciones 8 | 9 | 1. Crea un archivo `styles.css` en la raíz del proyecto y añade el siguiente contenido: 10 | 11 | ```css 12 | body{ 13 | background: black; 14 | } 15 | ``` 16 | -------------------------------------------------------------------------------- /.learn/exercises/08-adding-styles/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=EbkgFTqpRxc 3 | --- 4 | 5 | # `08` Adding styles 6 | 7 | If you `build` your website right now, you will see that it only says "Hello". That is because the `
` we just added is invisible; let's change that. 8 | 9 | To start bringing your website to life, we must begin by adding a `styles.css` file. This will contain all our website styling code. 10 | 11 | ## 📝 Instructions: 12 | 13 | 1. Create a `styles.css` file on the root of your project and add the following content to it: 14 | 15 | ```css 16 | body{ 17 | background: black; 18 | } 19 | ``` -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | 4 | # List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/ 5 | ports: 6 | - port: 3000 7 | onOpen: ignore 8 | 9 | vscode: 10 | extensions: 11 | - learn-pack.learnpack-vscode 12 | 13 | github: 14 | prebuilds: 15 | # enable for the master/default branch (defaults to true) 16 | master: true 17 | # enable for pull requests coming from this repo (defaults to true) 18 | pullRequests: false 19 | # add a "Review in Gitpod" button as a comment to pull requests (defaults to true) 20 | addComment: false 21 | -------------------------------------------------------------------------------- /.learn/exercises/11.2-header-styles/test.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | const { fromFile, fromHTML } = require("../../utils/dom"); 4 | let dom = fromFile(); 5 | 6 | test("In your CSS create a .postcard-header class that will apply styles to the .postcard-header
", function(){ 7 | dom = dom.withStylesheet(); 8 | dom.selector('.postcard-header'); 9 | expect(dom).toBeTruthy(); 10 | }) 11 | 12 | test("The .postcard-header
must have a display:flex to allow its childs to display horizontally", function(){ 13 | dom = dom.withStylesheet(); 14 | dom.selector('.postcard-header').hasStyles({ 15 | display: "flex", 16 | }) 17 | }) 18 | -------------------------------------------------------------------------------- /.learn/exercises/08.1-red-borders/README.md: -------------------------------------------------------------------------------- 1 | # `08.1` Red Borders 2 | 3 | To be able to debug better the application, we strongly recommend to include certain styles inside your `styles.css`. 4 | 5 | ## 📝 Instructions: 6 | 7 | 1. Copy and paste into your `styles.css` file, the following code: 8 | 9 | ```css 10 | * { 11 | border: 1px dashed red; 12 | min-height: 10px; 13 | } 14 | ``` 15 | 16 | ## 💡 Hint: 17 | 18 | + This code is going to add a red dashed border to every element in the website, making them easier to see and debug. 19 | 20 | ![Red Borders](../../assets/red-borders.png?raw=true) 21 | 22 | ## 🔎 Important: 23 | 24 | + This code will be removed once you finish your postcard. 25 | -------------------------------------------------------------------------------- /.learn/exercises/08.1-red-borders/README.es.md: -------------------------------------------------------------------------------- 1 | # `08.1` Red Borders 2 | 3 | Para poder depurar mejor la aplicación, te recomendamos incluir ciertos estilos dentro de tu `styles.css`. 4 | 5 | ## 📝 Instrucciones: 6 | 7 | 1. Copia y pega dentro de tu archivo `styles.css`, el siguiente código. 8 | 9 | ```css 10 | * { 11 | border: 1px dashed red; 12 | min-height: 10px; 13 | } 14 | ``` 15 | 16 | ## 💡 Pista: 17 | 18 | + Este código añadirá un borde rojo con una línea punteada a cada elemento del sitio web, así podrás visualizar y depurar todo más fácilmente. 19 | 20 | ![Red Borders](../../assets/red-borders.png?raw=true) 21 | 22 | ## 🔎 Importante: 23 | 24 | + Este código se eliminará luego de que termines tu postcard. 25 | -------------------------------------------------------------------------------- /.learn/exercises/06-lets-start-building/test.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | const { fromFile, fromHTML } = require("../../utils/dom"); 4 | const dom = fromFile(); 5 | 6 | test("Make sure you have your index.html", function(){ 7 | const indexExists = fs.existsSync(`./index.html`); 8 | expect(indexExists).toBe(true); 9 | }) 10 | 11 | test("The tag must exist and it must be properly formatted", function(){ 12 | const found = dom.tagExists('html') 13 | expect(found).toBe(true); 14 | }) 15 | 16 | test("Make sure there is a tag inside the <head> tag", function(){ 17 | const found = dom.insideTags('head').insideTags('title') 18 | expect(found).not.toBe(null); 19 | }) -------------------------------------------------------------------------------- /.learn/exercises/11.1-header-content/solution.hide.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8" /> 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 6 | <link rel="stylesheet" href="./styles.css" /> 7 | <title>Document 8 | 9 | 10 |
11 |
12 |

My Postcard

13 | 17 |
18 |
19 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /.learn/exercises/09-connecting-stylesheet/README.es.md: -------------------------------------------------------------------------------- 1 | # `09` Connecting Stylesheet 2 | 3 | En tu archivo `styles.css` hemos especificado que queremos que el `body` del sitio web sea de color negro. Para que esto funcione, debemos conectar ese archivo con el de `index.html`, por medio del tag ``. 4 | 5 | > El tag `` es la única manera de conectar stylesheets (hoja de estilos) **CSS** con archivos **HMTL**. 6 | 7 | ## 📝 Instrucciones: 8 | 9 | 1. Añade el siguiente código dentro de los tags de apertura y cierre ``. 10 | 11 | ```html 12 | 13 | ``` 14 | 15 | ## 💡 Pista: 16 | 17 | + Si la conexión entre CSS y HTML fue exitosa, tu sitio web debería tener un fondo **negro** luego de hacer clic en `build`. 18 | -------------------------------------------------------------------------------- /.learn/exercises/08.1-red-borders/test.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | test("Make sure you have your index.html", function(){ 5 | const indexExists = fs.existsSync(`./index.html`); 6 | expect(indexExists).toBe(true); 7 | }) 8 | 9 | test("Make sure you created the styles.css file", function(){ 10 | const indexExists = fs.existsSync(`./styles.css`); 11 | expect(indexExists).toBe(true); 12 | }) 13 | 14 | test("Make sure your styles.css contains the expected style", function(){ 15 | const content = fs.readFileSync("./styles.css", 'utf8') 16 | 17 | const expected = /\*\s*{\s*border\s*:\s*1px\s*dashed\s*red\s*;\s*min-height\s*:\s*10px\s*;\s*}/; 18 | expect(content).toEqual(expect.stringMatching(expected)); 19 | }) -------------------------------------------------------------------------------- /.learn/exercises/09-connecting-stylesheet/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=rzDFkhUgZks 3 | --- 4 | 5 | # `09` Connecting Stylesheet 6 | 7 | In your `styles.css` file we have specified that we want the `body` of the website to be black. If we want it to work, we must connect that file to the `index.html` file, using the `` tag. 8 | 9 | > `` tags are the only way to connect **CSS** Stylesheets with **HTML** files. 10 | 11 | ## 📝 Instructions: 12 | 13 | 1. Add the following code inside the opening and closing `` tags: 14 | 15 | ```html 16 | 17 | ``` 18 | ## 💡 Hint: 19 | 20 | + If the connection between CSS and HTML was successful, your website should be **black** after you build. 21 | -------------------------------------------------------------------------------- /.learn/exercises/13-check-your-code/README.es.md: -------------------------------------------------------------------------------- 1 | # `13` Check Your Postcard 2 | 3 | La última parte será el pie del postcard. ¿Cuál es el único elemento presente allí? 4 | 5 | ![Postcard body content](../../assets/13.gif) 6 | 7 | ## 📝 Instrucciones: 8 | 9 | 1. Crea un botón ` 14 |
15 | ``` 16 | 17 | 2. Aplica la regla `text-align: center;` a la clase `.postcard-footer`, este estilo ayudará a alinear el contenido del `
` hacia el centro (el botón estará centrado). 18 | 19 | ```css 20 | .postcard-footer { 21 | text-align: x; 22 | } 23 | ``` 24 | 25 | 3. Aplica un `background` más oscuro y un `padding` al botón. 26 | 27 | ```css 28 | button { 29 | background-color: x; 30 | padding: x; 31 | } 32 | ``` 33 | -------------------------------------------------------------------------------- /.learn/exercises/08-adding-styles/test.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | test("Make sure you have your index.html", function(){ 5 | const indexExists = fs.existsSync(`./index.html`); 6 | expect(indexExists).toBe(true); 7 | }) 8 | 9 | test("Make sure you created the styles.css file", function(){ 10 | const indexExists = fs.existsSync(`./styles.css`); 11 | expect(indexExists).toBe(true); 12 | }) 13 | 14 | test("The name of the file is styles.css in plural", function(){ 15 | const indexExists = fs.existsSync(`./style.css`); 16 | expect(indexExists).not.toBe(true); 17 | }) 18 | 19 | test("Make sure your styles.css contains the expected style", function(){ 20 | const content = fs.readFileSync("./styles.css", 'utf8') 21 | const expected = /body\s*{\s*background\s*:\s*black\s*;\s*}/; 22 | expect(content).toEqual(expect.stringMatching(expected)); 23 | }) -------------------------------------------------------------------------------- /.learn/exercises/13-check-your-code/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=zChIjQQ52is 3 | --- 4 | 5 | # `13` Check Your Postcard 6 | 7 | The last part will be our footer. What is the only element present in the footer? 8 | 9 | ![Postcard body content](../../assets/13.gif) 10 | 11 | ## 📝 Instructions: 12 | 13 | 1. Create a ` 18 |
19 | ``` 20 | 21 | 2. Apply `text-align: center;` rule to the `.postcard-footer` class, that style will help align all of the `
` content to the center (the button will be centered). 22 | 23 | ```css 24 | .postcard-footer { 25 | text-align: x; 26 | } 27 | ``` 28 | 29 | 3. Apply a darker `background` and a `padding` to the button. 30 | 31 | ```css 32 | button { 33 | background-color: x; 34 | padding: x; 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /.github/workflows/learnpack-audit.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Learnpack audit 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | pull_request: 10 | branches: [ main ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [20.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v2 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v2 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - run: npm install @learnpack/learnpack@latest -g 29 | - run: learnpack audit -------------------------------------------------------------------------------- /.learn/exercises/06-lets-start-building/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=DWUqB5mVVT0 3 | --- 4 | 5 | # `06` Let's start building 6 | 7 | It's time to start building your Postcard! 8 | 9 | All websites need a basic HTML template that includes a ``, ``, etc. 10 | 11 | ## 📝 Instructions: 12 | 13 | 1. Delete all the previous content inside the `index.html` and paste this code: 14 | 15 | ```html 16 | 17 | 18 | 19 | 20 | 21 | Document 22 | 23 | 24 | 25 | 26 | 27 | ``` 28 | 29 | ## 💡 Hint: 30 | 31 | + Every website starts with this skeleton. If you `build` your website you'll see that it is white (empty), but only because the `` is invisible to the website user, only the tags you add to the `` are visible to all. -------------------------------------------------------------------------------- /.learn/exercises/11-postcard-divisions/README.es.md: -------------------------------------------------------------------------------- 1 | # `11` Postcard Divisions 2 | 3 | Ahora hay que seguir armando la estrategia para nuestro HTML, tenemos que continuar dividiendo el postcard en pedazos para poder aplicarle estilos y manejarlo con facilidad. 4 | 5 | ![Postcard Divisions](../../assets/11-postcard-divisions.gif?raw=true) 6 | 7 | ## 📝 Instrucciones: 8 | 9 | 1. Dentro de tu `
` añade tres `` adicionales. 10 | 11 | ```txt 12 | 1. .postcard 13 | 1.1. .postcard-header 14 | 1.2. .postcard-body 15 | 1.3. .postcard-footer 16 | ``` 17 | 18 | >Nota: Los tres son hijos directos de ese div. 19 | 20 | ## 💡 Pista: 21 | 22 | + Asegúrate de que los divs tengan las clases especificadas. El primero de los tres divs debe tener la clase `postcard-header`, el segundo la clase `postcard-body` y el tercero la clase `postcard-footer`. 23 | 24 | ## 🔎 Importante: 25 | 26 | + No debes incluir el punto (`.`) en el nombre de tu clase, solo usarás puntos en CSS. 27 | -------------------------------------------------------------------------------- /.learn/exercises/06-lets-start-building/README.es.md: -------------------------------------------------------------------------------- 1 | # `06` Let's start building 2 | 3 | ¡Es hora de empezar a construir tu Postcard! 4 | 5 | Todos los sitios web tienen un formato HTML básico que incluye un ``, un ``, etc. 6 | 7 | ## 📝 Instrucciones: 8 | 9 | 1. Elimina todo el contenido dentro del archivo `index.html` y pega el siguiente código: 10 | 11 | ```html 12 | 13 | 14 | 15 | 16 | 17 | Document 18 | 19 | 20 | 21 | 22 | 23 | ``` 24 | 25 | ## 💡 Pista: 26 | 27 | + Todos los sitios web comienzan con este esqueleto. Si le das clic al botón de `build` verás que está en blanco (vacío), pero es solo porque el `` es invisible para el sitio web de los usuarios, únicamente los tags que añadas dentro del `` son visibles para todos. 28 | -------------------------------------------------------------------------------- /.learn/exercises/07-the-first-div/README.es.md: -------------------------------------------------------------------------------- 1 | # `07` The first div 2 | 3 | Ahora que tienes la estructura básica, es hora de añadir nuestro primer elemento dentro del ``. 4 | 5 | La mayoría de las veces, el primer elemento dentro del `` es un `
` (div quiere decir división). Básicamente, son una herramienta genial para dividir tu sitio web en varias secciones. 6 | 7 | ![paso 1](../../assets/07-the-first-div.png?raw=true) 8 | 9 | ## 📝 Instrucciones: 10 | 11 | 1. Añade un nuevo `
` entre los tags de apertura y de cierre del ``, de esta forma: 12 | 13 | ```html 14 | 15 |
Hello
16 | 17 | ``` 18 | 19 | ## 💡 Pistas: 20 | 21 | + El `
` que añadiste debe tener la clase `class="postcard"` porque así nos referiremos a él más tarde, es como asignarle un nombre al elemento HTML en caso de que lo modifiquemos. 22 | 23 | + Asegúrate que la etiqueta `
` esté cerrada. 24 | 25 | + Asegúrate también de escribir la palabra `Hello` entre los tags del ``. 26 | -------------------------------------------------------------------------------- /.learn/exercises/11-postcard-divisions/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=dj4OZQm4DSo 3 | --- 4 | 5 | # `11` Postcard Divisions 6 | 7 | Now we have to keep building the strategy for our HTML, we have to continue dividing the postcard in pieces to be able to apply styles and control it easily. 8 | 9 | ![Postcard Divisions](../../assets/11-postcard-divisions.gif?raw=true) 10 | 11 | ## 📝 Instructions: 12 | 13 | 1. Inside your `
` add three additional divs. 14 | 15 | ```txt 16 | 1. .postcard 17 | 1.1. .postcard-header 18 | 1.2. .postcard-body 19 | 1.3. .postcard-footer 20 | ``` 21 | >Note: All three of them are immediate children. 22 | 23 | ## 💡 Hint: 24 | 25 | + Please make sure the divs have the specified classes, the first of the 3 divs should have the class `postcard-header`, the second one `postcard-body` and the third one `postcard-footer`. 26 | 27 | ## 🔎 Important: 28 | 29 | + You don't have to include the dot symbol (`.`) in your class name, you will only use the dots in the CSS. 30 | -------------------------------------------------------------------------------- /.learn/exercises/07-the-first-div/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | tutorial: https://www.youtube.com/watch?v=bB7MLP37zqk 3 | --- 4 | 5 | # `07` The first div 6 | 7 | Now that we have our basic structure, it is time to add our first element inside the `` tags. 8 | 9 | Most of the time, the first element inside the `` is a `
`, (div stands for division). Basically, they are great tools to split your website into several sections. 10 | 11 | ![step-1](../../assets/07-the-first-div.png?raw=true) 12 | 13 | ## 📝 Instructions: 14 | 15 | 1. Add a new `
` between the opening and closing `` tags, like this: 16 | 17 | ```html 18 | 19 |
Hello
20 | 21 | ``` 22 | 23 | ## 💡 Hints: 24 | 25 | + The `
` you added must have the `class="postcard"`, because that is how we are going to refer to it later, it is like assigning a name to the HTML element for later modification. 26 | 27 | + Make sure the `
` tag is closed. 28 | 29 | + Also make sure to write the word `Hello` between the opening and closing `` tags. 30 | -------------------------------------------------------------------------------- /.learn/exercises/05-how-to-start/README.md: -------------------------------------------------------------------------------- 1 | # `05` How to start 2 | 3 | To start building your website, you need to identify what are the `` needed for this particular design. 4 | 5 | Take a look at this animation that shows you what `` should be used on this postcard: 6 | 7 | ![HTML Postcard Strategy](../../assets/strategy.gif?raw=true) 8 | 9 | ### To better understand and identify the Tags: 10 | 11 | > Think for a moment about a text document in Microsoft Word. There is an HTML `` for almost anything you can do in it: paragraphs, strong or italic text, headings, images, etc. 12 | 13 | ## 📝 Instructions: 14 | 15 | 1. Memorize the 6 most important HTML `` and what they do: 16 | 17 | | Tag | Usage | 18 | | ----------------- | --------------------- | 19 | | `

` | for paragraphs | 20 | | `