diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index ca78824c500..eb8ff2ac035 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ assert(myVar === 88); ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index 0012e0526aa..da6d4ab55d9 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ assert(myVar === 88); ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/espanol/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml b/curriculum/challenges/espanol/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml index 8d6092b1c8a..c6ad8caf239 100644 --- a/curriculum/challenges/espanol/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml +++ b/curriculum/challenges/espanol/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml @@ -7,16 +7,16 @@ isPrivate: true tests: - id: bd7158d8c442eddfaeb5bd18 - title: Crea una página de tributo + title: Crea una página de homenaje - id: 587d78af367417b2b2512b03 title: Crea un formulario de encuesta - id: 587d78af367417b2b2512b04 - title: Crea una Página de Producto + title: Crea una página de producto - id: 587d78b0367417b2b2512b05 title: Construye una página de documentación técnica - id: bd7158d8c242eddfaeb5bd13 - title: Crea un Portafolio Personal + title: Crea un portafolio personal diff --git a/curriculum/challenges/espanol/01-responsive-web-design/css-grid/divide-the-grid-into-an-area-template.md b/curriculum/challenges/espanol/01-responsive-web-design/css-grid/divide-the-grid-into-an-area-template.md index 8c9eb51cc67..20cf51998e0 100644 --- a/curriculum/challenges/espanol/01-responsive-web-design/css-grid/divide-the-grid-into-an-area-template.md +++ b/curriculum/challenges/espanol/01-responsive-web-design/css-grid/divide-the-grid-into-an-area-template.md @@ -17,7 +17,7 @@ grid-template-areas: "advert footer footer"; ``` -El código anterior agrupa las celdas de la cuadrícula en cuatro áreas; `header`, `advert`, `content`y `footer`. Cada palabra representa una celda y cada par de comillas representa una fila. +El código anterior agrupa las celdas de la cuadrícula en cuatro áreas; `header`, `advert`, `content` y `footer`. Cada palabra representa una celda y cada par de comillas representa una fila. # --instructions-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index a0b31c5f345..a6ccf7e45d0 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ No debes utilizar el operador de asignación. ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.md index 9818a82a1a0..a4b874b0e18 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.md @@ -8,13 +8,11 @@ dashedName: dna-pairing # --description-- -A la cadena de ADN le falta el elemento de emparejamiento. Toma cada carácter, obtén su par y devuelve los resultados como un arreglo bidimensional. +Los pares de las cadenas de ADN consisten en pares de base de proteínas. Los pares de base son representados por los caracteres AT y CG, que forman bloques de doble hélix ADN. -[Par de bases](https://es.wikipedia.org/wiki/Par_de_bases) son un par de AT y CG. Haz coincidir el elemento que falta con el carácter proporcionado. +A la cadena de ADN le falta el elemento de emparejamiento. Escribe una función que coincida con los pares de base faltantes para la hebra de ADN proporcionada. Para cada carácter de la cadena proporcionada, encuentra el carácter de par base. Devuelve los resultados como un arreglo 2d. -Devuelve el carácter proporcionado como primer elemento de cada arreglo. - -Por ejemplo, la entrada `GCG`, devolverá `[["G", "C"], ["C","G"], ["G", "C"]]` +Por ejemplo, la entrada `GCG`, devuelve `[["G", "C"], ["C","G"], ["G", "C"]]` El carácter y su par se emparejan en un arreglo, y todos los arreglos se agrupan en un arreglo encapsulado. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris.md index d6dd3dd0eca..ffba8b4997e 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris.md @@ -8,15 +8,22 @@ dashedName: map-the-debris # --description-- +De acuerdo con la Tercera Ley de Kepler, el período orbital $T$ de dos puntos se orbitan mutuamente en una órbita circular o elíptica es: + +$$ T = 2 \pi \sqrt{\frac{a^{3}}{\mu}} $$ + +- $a$ es el eje semi-mayor de la órbita +- $μ = GM$ es el parámetro gravitatorio estándar +- $G$ es la constante gravitatoria, +- $M$ es la masa del cuerpo más masivo. + Devuelve un nuevo arreglo que transforma la altitud media de los elementos en sus periodos orbitales (en segundos). El arreglo contendrá objetos en el formato `{name: 'name', avgAlt: avgAlt}`. -Puedes leer sobre los períodos orbitales [en Wikipedia](https://es.wikipedia.org/wiki/Per%C3%Adodo_orbital). - Los valores deben redondearse al número entero más cercano. El cuerpo orbitado es la Tierra. -El radio de la tierra es de 6367.4447 kilómetros y el valor GM de la tierra es de 398600.4418 km3s-2. +El radio de la tierra es de, 6367.4447 kilómetros y el valor GM de la tierra es de, 398600.4418 km3s-2. # --hints-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md index 06bd0ee5bbe..9c01b9c0d02 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md @@ -10,9 +10,9 @@ dashedName: caesars-cipher Uno de los cifrados más simples y conocidos es el cifrado César, también conocido como cifrado por desplazamiento. En un cifrado por desplazamiento los significados de las letras se desplazan por una cantidad determinada. -Un uso moderno común es el cifrado [ROT13](https://en.wikipedia.org/wiki/ROT13), donde los valores de las letras son desplazados por 13 lugares. Así que `A ↔ N`, `B ↔ O` y así sucesivamente. +Un uso moderno común es el cifrado [ROT13](https://www.freecodecamp.org/news/how-to-code-the-caesar-cipher-an-introduction-to-basic-encryption-3bf77b4e19f7/), donde los valores de las letras son desplazados por 13 lugares. Así que `A ↔ N`, `B ↔ O` y así sucesivamente. -Escribe una función que reciba una cadena codificada en [ROT13](https://en.wikipedia.org/wiki/ROT13) como entrada y devuelva una cadena decodificada. +Escribe una función que reciba una cadena codificada en [ROT13](https://www.freecodecamp.org/news/how-to-code-the-caesar-cipher-an-introduction-to-basic-encryption-3bf77b4e19f7/) como entrada y devuelva una cadena decodificada. Todas las letras estarán en mayúsculas. No transformes ningún carácter no alfabético (espacios, puntuación, por ejemplo), pero si transmítelos. diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md index 6bf89199aa1..9cce1426ec5 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md @@ -10,7 +10,23 @@ dashedName: roman-numeral-converter Convierte el número proporcionado en un número romano. -Todos los [números romanos](http://www.mathsisfun.com/roman-numerals.html) deben proporcionarse en mayusculas. +| Números romanos | Números arábigos | +| --------------- | ---------------- | +| M | 1000 | +| CM | 900 | +| D | 500 | +| CD | 400 | +| C | 100 | +| XC | 90 | +| L | 50 | +| XL | 40 | +| X | 10 | +| IX | 9 | +| V | 5 | +| IV | 4 | +| I | 1 | + +Todas las respuestas de los números romanos deben ser proporcionadas en mayúsculas. # --hints-- diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md index 816ecaf51fc..69bca9bb57e 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-25-5-clock.md @@ -8,9 +8,9 @@ dashedName: build-a-25--5-clock # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar cualquier combinación de HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux y jQuery para completar este proyecto. Debes usar un framework frontend (como React por ejemplo), ya que esta sección trata sobre el aprendizaje de frameworks frontend. No se recomienda utilizar tecnologías adicionales que no estén enlistadas, su uso corre bajo tu propio riesgo. Estamos buscando apoyar otros frameworks de frontend como Angular y Vue, pero actualmente no están soportados. Aceptaremos e intentaremos arreglar todos los informes de problemas que utilicen el stack de tecnologías sugeridas para este proyecto. ¡Feliz día programando! diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md index c831759733a..14b86d981ba 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md @@ -8,9 +8,9 @@ dashedName: build-a-drum-machine # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar cualquier combinación de HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux y jQuery para completar este proyecto. Debe usar un framework frontend (como React por ejemplo), ya que esta sección trata sobre el aprendizaje de frameworks frontend. No se recomienda utilizar tecnologías adicionales que no estén enlistadas, su uso corre bajo tu propio riesgo. Estamos buscando apoyar otros frameworks de frontend como Angular y Vue, pero actualmente no están soportados. Aceptaremos e intentaremos arreglar todos los informes de problemas que utilicen el stack de tecnologías sugeridas para este proyecto. ¡Feliz día programando! diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md index 3f1c52737ce..b51149f1b6c 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md @@ -8,9 +8,9 @@ dashedName: build-a-javascript-calculator # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar cualquier combinación de HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux y jQuery para completar este proyecto. Debes usar un framework frontend (como React por ejemplo), ya que esta sección trata sobre el aprendizaje de frameworks frontend. No se recomienda utilizar tecnologías adicionales que no estén enlistadas, su utilización corre bajo tu propio riesgo. Estamos buscando apoyar otros frameworks de frontend como Angular y Vue, pero actualmente no están soportados. Aceptaremos e intentaremos arreglar todos los informes de problemas que utilicen el stack de tecnologías sugeridas para este proyecto. ¡Feliz día programando! diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md index 2135c88c3b9..9bf759237aa 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-markdown-previewer.md @@ -8,9 +8,9 @@ dashedName: build-a-markdown-previewer # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar cualquier combinación de HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux y jQuery para completar este proyecto. Debes usar un framework frontend (como React por ejemplo), ya que esta sección trata sobre el aprendizaje de frameworks frontend. No se recomienda utilizar tecnologías adicionales que no estén enlistadas, su utilización corre bajo tu propio riesgo. Estamos buscando apoyar otros frameworks de frontend como Angular y Vue, pero actualmente no están soportados. Aceptaremos e intentaremos arreglar todos los informes de problemas que utilicen el stack de tecnologías sugeridas para este proyecto. ¡Feliz día programando! diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md index b07568950de..7b364ddc130 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-random-quote-machine.md @@ -8,9 +8,9 @@ dashedName: build-a-random-quote-machine # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar cualquier combinación de HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux y jQuery para completar este proyecto. Debes usar un framework frontend (como React por ejemplo), ya que esta sección trata sobre el aprendizaje de frameworks frontend. No se recomienda utilizar tecnologías adicionales que no estén enlistadas, su utilización corre bajo tu propio riesgo. Estamos buscando apoyar otros frameworks de frontend como Angular y Vue, pero actualmente no están soportados. Aceptaremos e intentaremos arreglar todos los informes de problemas que utilicen el stack de tecnologías sugeridas para este proyecto. ¡Feliz día programando! diff --git a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart.md b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart.md index ec3cb917cd8..953e78adf14 100644 --- a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart.md +++ b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart.md @@ -8,9 +8,9 @@ dashedName: visualize-data-with-a-bar-chart # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar HTML, JavaScript, CSS y la librería D3 de visualización basada en svg. Las pruebas requieren que los ejes se generen utilizando la propiedad de eje D3, que genera automáticamente marcas a lo largo del eje. Estas marcas son necesarias para pasar las pruebas D3, ya que sus posiciones se utilizan para determinar la alineación de los elementos gráficos. Encontrarás información sobre cómo generar ejes en . Los elementos DOM obligatorios (no virtuales) son consultados en el momento de cada prueba. Si usas un framework frontend (como por ejemplo Vue), los resultados de la prueba pueden ser inexactos para el contenido dinámico. Esperamos poder adaptarlos eventualmente, pero por ahora estos frameworks no son soportados por los proyectos con D3. diff --git a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-choropleth-map.md b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-choropleth-map.md index 596de171fb9..9a7300c8ce4 100644 --- a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-choropleth-map.md +++ b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-choropleth-map.md @@ -8,9 +8,9 @@ dashedName: visualize-data-with-a-choropleth-map # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar HTML, JavaScript, CSS y la librería D3 de visualización basada en svg. Los elementos DOM obligatorios (no virtuales) son consultados en el momento de cada prueba. Si usas un framework frontend (como por ejemplo Vue), los resultados de la prueba pueden ser inexactos para el contenido dinámico. Esperamos poder adaptarlos eventualmente, pero por ahora estos frameworks no son soportados por los proyectos con D3. diff --git a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-heat-map.md b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-heat-map.md index 457823a9272..0f3f9b11e35 100644 --- a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-heat-map.md +++ b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-heat-map.md @@ -8,9 +8,9 @@ dashedName: visualize-data-with-a-heat-map # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar HTML, JavaScript, CSS y la librería D3 de visualización basada en svg. Los elementos DOM obligatorios (no virtuales) son consultados en el momento de cada prueba. Si usas un framework frontend (como por ejemplo Vue), los resultados de la prueba pueden ser inexactos para el contenido dinámico. Esperamos poder adaptarlos eventualmente, pero por ahora estos frameworks no son soportados por los proyectos con D3. diff --git a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph.md b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph.md index ad7aeeead0f..dfb56d1de96 100644 --- a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph.md +++ b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph.md @@ -8,9 +8,9 @@ dashedName: visualize-data-with-a-scatterplot-graph # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar HTML, JavaScript, CSS y la librería D3 de visualización basada en svg. Las pruebas requieren que los ejes se generen utilizando la propiedad de eje D3, que genera automáticamente marcas a lo largo del eje. Estas marcas son necesarias para pasar las pruebas de D3, ya que sus posiciones se utilizan para determinar el alineamiento de los elementos gráficos. Encontrarás información sobre cómo generar ejes en . Los elementos DOM requeridos (no virtuales) son consultados en el momento de cada prueba. Si usas un framework frontend (como por ejemplo Vue), los resultados de la prueba pueden ser inexactos para el contenido dinámico. Esperamos poder adaptarlos eventualmente, pero por ahora estos frameworks no son soportados por los proyectos con D3. diff --git a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-treemap-diagram.md b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-treemap-diagram.md index 79e685d8965..516b8c47782 100644 --- a/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-treemap-diagram.md +++ b/curriculum/challenges/espanol/04-data-visualization/data-visualization-projects/visualize-data-with-a-treemap-diagram.md @@ -8,9 +8,9 @@ dashedName: visualize-data-with-a-treemap-diagram # --description-- -**Objetivo:** Construye una aplicación en [CodePen.io](https://codepen.io) que funcionalmente sea similar a esta: . +**Objetivo:** Crear una aplicación que sea funcionalmente similar a . -Completa las siguientes [historias de usuario](https://en.wikipedia.org/wiki/User_story) y consigue que pasen todas las pruebas. Dale tu propio estilo personal. +Completa las historias de usuario a continuación y obtén todas las pruebas para aprobar. Utiliza cualquier librería o API que necesites. Dale tu propio estilo. Puedes utilizar HTML, JavaScript, CSS y la librería D3 de visualización basada en svg. Las pruebas requieren que los ejes se generen utilizando la propiedad de eje D3, que genera automáticamente marcas a lo largo del eje. Estas marcas son necesarias para pasar las pruebas de D3, ya que sus posiciones se utilizan para determinar el alineamiento de los elementos gráficos. Encontrarás información sobre cómo generar ejes en . Los elementos DOM requeridos (no virtuales) son consultados en el momento de cada prueba. Si usas un framework frontend (como por ejemplo Vue), los resultados de la prueba pueden ser inexactos para el contenido dinámico. Esperamos poder adaptarlos eventualmente, pero por ahora estos frameworks no son soportados por los proyectos con D3. diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/authentication-strategies.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/authentication-strategies.md index b0389c7b98f..5debb56e80c 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/authentication-strategies.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/authentication-strategies.md @@ -8,7 +8,7 @@ dashedName: authentication-strategies # --description-- -Una estrategia es una manera de autenticar a un usuario. Puedes utilizar una estrategia para permitir que los usuarios se autentiquen basándose en la información guardada localmente (si les haces registrarse primero) o desde una variedad de proveedores como Google o GitHub. Para este proyecto, estableceremos una estrategia local. Para ver una lista de los cientos de estrategias, visita el sitio de Passport [aquí](http://passportjs.org/). +Una estrategia es una manera de autenticar a un usuario. Puedes utilizar una estrategia para permitir que los usuarios se autentiquen basándose en la información guardada localmente (si les haces registrarse primero) o desde una variedad de proveedores como Google o GitHub. Para este proyecto, usaremos el agente intermedio Passport. Passport provee un comprensivo set de estrategias que soportan la autenticación usando un nombre de usuario y una contraseña, GitHub, Google, y más. Agrega `passport-local@~1.0.0` como dependencia y agrégalo a tu servidor de la siguiente manera: `const LocalStrategy = require('passport-local');` diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md index e3403e6305c..6356b39ace8 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.md @@ -10,7 +10,7 @@ dashedName: implement-the-serialization-of-a-passport-user Ahora mismo, no estamos cargando un objeto de usuario real ya que no hemos configurado nuestra base de datos. Esto puede hacerse de muchas maneras, pero para nuestro proyecto nos conectaremos a la base de datos una vez cuando iniciemos el servidor y mantendremos una conexión persistente durante todo el ciclo de vida de la aplicación. Para hacer esto, agrega la cadena de conexión de tu base de datos (por ejemplo: `mongodb+srv://:@cluster0-jvwxi.mongodb.net/?retryWrites=true&w=majority`) a la variable de entorno `MONGO_URI`. Esto se utiliza en el archivo `connection.js`. -*Puedes configurar una base de datos gratuita en [MongoDB Atlas](https://www.mongodb.com/cloud/atlas).* +*Si tienes problemas para configurar una base de datos gratuita en MongoDB Atlas, consulta [tutorial](https://www.freecodecamp.org/news/get-started-with-mongodb-atlas/).* Ahora queremos conectarnos a nuestra base de datos y empezar a escuchar las peticiones. El propósito de esto es no permitir peticiones antes de que nuestra base de datos esté conectada o si hay un error en la base de datos. Para lograr esto, querrás englobar tu serialización y las rutas de tu aplicación en el siguiente código: diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md index 6fc8642e823..98ec6d9a68a 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii.md @@ -10,9 +10,11 @@ dashedName: implementation-of-social-authentication-ii La última parte de configurar tu autentificación de GitHub es crear la propia estrategia. Para esto, necesitarás agregar la dependencia de `passport-github@~1.1.0` a tu proyecto y requiérelo en tu `auth.js` como `GithubStrategy` así: `const GitHubStrategy = require('passport-github').Strategy;`. No olvides requerir y configurar `dotenv` para usar tus variables de entorno. -Para configurar la estrategia de GitHub, debes decirle a Passport que utilice una instancia de `GitHubStrategy`, que acepta 2 argumentos: un objeto (que contiene `clientID`, `clientSecret`, y `callbackURL`) y una función a ser llamada cuando un usuario es autentificado con éxito, que determinará si el usuario es nuevo y qué campos guardar inicialmente en el objeto de base de datos del usuario. Esto es común en muchas estrategias, pero algunas pueden requerir más información como se indica en el README de GitHub de esa estrategia específica. Por ejemplo, Google requiere un *ámbito* también que determina qué tipo de información está pidiendo que se le devuelva y pide al usuario que apruebe dicho acceso. La estrategia actual que estamos implementando tiene su uso descrito [aquí](https://github.com/jaredhanson/passport-github/), ¡pero estamos pasando por todo aquí mismo en freeCodeCamp! +Para configurar la estrategia de GitHub, debes decirle a Passport que utilice una instancia de `GitHubStrategy`, que acepta 2 argumentos: un objeto (que contiene `clientID`, `clientSecret`, y `callbackURL`) y una función a ser llamada cuando un usuario es autentificado con éxito, que determinará si el usuario es nuevo y qué campos guardar inicialmente en el objeto de base de datos del usuario. Esto es común en muchas estrategias, pero algunas pueden requerir más información como se indica en el README de GitHub de esa estrategia específica. Por ejemplo, Google requiere un *ámbito* también que determina qué tipo de información está pidiendo que se le devuelva y pide al usuario que apruebe dicho acceso. -Así es como debe ser tu nueva estrategia en este punto: +La estrategia actual que estamos implementando auténtica a los usuarios mediante una cuenta de GitHub y tokens OAuth 2.0. El ID de cliente y el secreto obtenidos al crear una aplicación se proporcionan como opciones al crear la estrategia. La estrategia también requiere un callback `verify`, que recibe el token de acceso y el token de actualización opcional, así como `profile` que contiene el perfil de GitHub del usuario autenticado. El callback `verify` debe llamar a `cb` que proporciona un usuario para completar la autenticación. + +Así es como debe verse tu nueva estrategia en este punto: ```js passport.use(new GitHubStrategy({ @@ -27,13 +29,13 @@ passport.use(new GitHubStrategy({ )); ``` -Tu autentificación no tendrá éxito todavía, y de hecho lanzará un error sin la lógica de la base de datos y el callback, ¡pero debería registrar tu perfil de GitHub en tu consola si lo intentas! +¡Tu autenticación aún no será exitosa, y en realidad arrojará un error sin la lógica de la base de datos y el callback, pero debería registrar tu perfil de GitHub en tu consola si lo intentas! -Envía tu página cuando creas que lo has hecho bien. Si te encuentras con errores, puedes revisar el proyecto completado hasta este punto [aquí](https://gist.github.com/camperbot/ff3a1166684c1b184709ac0bee30dee6). +Envía tu página cuando creas que la tienes correcta. Si te encuentras con errores, puedes consultar el proyecto completado hasta este punto [Aquí](https://gist.github.com/camperbot/ff3a1166684c1b184709ac0bee30dee6). # --hints-- -debe añadirse la dependencia passport-github. +se debe agregar la dependencia passport-github. ```js (getUserInput) => @@ -52,7 +54,7 @@ debe añadirse la dependencia passport-github. ); ``` -passport-github debe ser requerido. +se debe requerir passport-github. ```js (getUserInput) => @@ -70,7 +72,7 @@ passport-github debe ser requerido. ); ``` -La estrategia de GitHub debe configurarse correctamente hasta ahora. +La estrategia de GitHub debe estar configurada correctamente hasta ahora. ```js (getUserInput) => diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md index 2d238a9f4d4..a3861f31018 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.md @@ -12,15 +12,39 @@ Una de las mayores características del uso de un motor de plantillas, es ser ca En tu archivo Pug, puedes usar variables referenciando el nombre de la misma como `#{variable_name}`, en la misma línea con otro texto en un elemento o utilizando un signo igual en el elemento sin un espacio como `p=variable_name`, lo cual asigna el valor de la variable al texto del elemento p. -Recomendamos encarecidamente ver la sintaxis y estructura de Pug [aquí](https://github.com/pugjs/pug) en el README de GitHub. Pug se basa en el uso de espacios en blanco y pestañas para mostrar los elementos anidados y reducir la cantidad de código necesario para hacer un sitio hermoso. + Pug se trata de usar espacios en blanco y pestañas para mostrar elementos anidados y reducir la cantidad de código necesario para crear un sitio hermoso. Lee la documentación de Pug para obtener más información sobre el uso y la sintaxis. -Mirando nuestro archivo pug 'index.pug' incluido en tu proyecto, Se usan las variables *title* y *message*. + Aquí hay un ejemplo: -Para pasar estos a lo largo de nuestro servidor, necesitas añadir un objeto como segundo argumento a tu *res.render* con las variables y sus valores. Por ejemplo, pase este objeto para establecer las variables hacia la vista index: `{title: 'Hello', message: 'Please login'}` + ```html + + head + script(type='text/javascript'). + if (foo) bar(1 + 5); + body + if youAreUsingPug + p You are amazing + else + p Get on it! -Debe verse como: `res.render(process.cwd() + '/views/pug/index', {title: 'Hello', message: 'Please login'});`, Ahora actualiza tu página y deberías ver esos valores renderizados en tu vista en el lugar correcto tal y como se establece en tu archivo index.pug! + + + + + +

You are amazing

+ + ``` -Envía tu página cuando creas que está correcto. Si estás experimentando errores, puedes revisar el proyecto completado hasta este punto [aquí](https://gist.github.com/camperbot/4af125119ed36e6e6a8bb920db0c0871). +Mirando nuestro archivo pug `index.pug` incluida tu proyecto, utilizamos las variables `title` y `message`. + +Para pasarlos desde nuestro servidor, debes agregar un objeto como segundo argumento a tu `res.render` con las variables y sus valores. Por ejemplo, pasa este objeto junto con la configuración de las variables para tu vista de índice: `{title: 'Hello', message: 'Please login'}` + +!Debe verse así: `res.render(process.cwd() + '/views/pug/index', {title: 'Hello', message: 'Please login'});` Ahora actualiza tu página y debes ver esos valores representados en tu vista en el lugar correcto como se establece en tu archivo `index.pug`! + +Envía tu página cuando creas que la tienes correcta. Si te encuentras con errores, puedes consultar el [proyecto completado hasta este momento](https://gist.github.com/camperbot/4af125119ed36e6e6a8bb920db0c0871). # --hints-- diff --git a/curriculum/challenges/espanol/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.md b/curriculum/challenges/espanol/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.md index c6aee4fbcef..e71120192d8 100644 --- a/curriculum/challenges/espanol/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.md +++ b/curriculum/challenges/espanol/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.md @@ -10,6 +10,12 @@ bilibiliIds: dashedName: relational-databases-and-sqlite --- +# --description-- + +[Descargar SQLite](https://www.sqlite.org/download.html) +[Descargar el navegador DB para SQLite](https://sqlitebrowser.org/dl/) +[uso de SQLite](https://www.sqlite.org/famous.html) + # --question-- ## --text-- @@ -18,7 +24,7 @@ dashedName: relational-databases-and-sqlite ## --answers-- -index +índice --- diff --git a/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md index 10b7e3ad58f..5e7e1874c51 100644 --- a/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md @@ -1,6 +1,6 @@ --- id: 587d824a367417b2b2512c45 -title: Anonymous Message Board +title: Tablero de mensajes anónimos challengeType: 4 forumTopicId: 301568 dashedName: anonymous-message-board @@ -8,38 +8,38 @@ dashedName: anonymous-message-board # --description-- -Build a full stack JavaScript app that is functionally similar to this: . +Construye una aplicación full stack de JavaScript que sea funcionalmente similar a esta: . -Working on this project will involve you writing your code using one of the following methods: +Trabajar en este proyecto implicará escribir tu código utilizando uno de los siguientes métodos: -- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-messageboard/) and complete your project locally. -- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-messageboard) to complete your project. -- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo. +- Clona [este repositorio de GitHub](https://github.com/freeCodeCamp/boilerplate-project-messageboard/) y completa tu proyecto localmente. +- Usa [nuestro proyecto inicial de Replit](https://replit.com/github/freeCodeCamp/boilerplate-project-messageboard) para completar tu proyecto. +- Utiliza un constructor de sitios de tu elección para completar el proyecto. Asegúrate de incorporar todos los archivos de nuestro repositorio GitHub. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your projects source code in the `GitHub Link` field. +Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. # --instructions-- -1. Set `NODE_ENV` to test without quotes when ready to write tests and DB to your databases connection string (in `.env`) -2. Recommended to create controllers/handlers and handle routing in `routes/api.js` -3. You will add any security features to `server.js` +1. Define `NODE_ENV` para probar sin comillas cuando esté listo para escribir pruebas y BD en la cadena de conexión de tus bases de datos (en `.env`) +2. Se recomienda crear controladores/manejadores y manejar el enrutamiento en `routes/api.js` +3. Añadirás cualquier característica de seguridad a `server.js` -Write the following tests in `tests/2_functional-tests.js`: +Escribe las siguientes pruebas en `tests/2_functional-tests.js`: -- Creating a new thread: POST request to `/api/threads/{board}` -- Viewing the 10 most recent threads with 3 replies each: GET request to `/api/threads/{board}` -- Deleting a thread with the incorrect password: DELETE request to `/api/threads/{board}` with an invalid `delete_password` -- Deleting a thread with the correct password: DELETE request to `/api/threads/{board}` with a valid `delete_password` -- Reporting a thread: PUT request to `/api/threads/{board}` -- Creating a new reply: POST request to `/api/replies/{board}` -- Viewing a single thread with all replies: GET request to `/api/replies/{board}` -- Deleting a reply with the incorrect password: DELETE request to `/api/replies/{board}` with an invalid `delete_password` -- Deleting a reply with the correct password: DELETE request to `/api/replies/{board}` with a valid `delete_password` -- Reporting a reply: PUT request to `/api/replies/{board}` +- Creando un nuevo hilo: solicitud de POST a `/api/threads/{board}` +- Viendo los 10 hilos más recientes con 3 respuestas cada una: Solicitud GET a `/api/threads/{board}` +- Eliminando un hilo con la contraseña incorrecta: solicitud de DELETE a `/api/threads/{board}` con una `delete_password` inválida +- Eliminando un hilo con la contraseña incorrecta: solicitud de DELETE a `/api/threads/{board}` con una `delete_password` inválida +- Creando un nuevo hilo: solicitud de PUT a `/api/threads/{board}` +- Creando una nueva respuesta: solicitud de POST a `/api/replies/{board}` +- Viendo un hilo simple con todas las respuestas: Solicitud GET a `/api/replies/{board}` +- Eliminando una respuesta con la contraseña incorrecta: solicitud de DELETE a `/api/replies/{board}` con un `delete_password` inválido +- Eliminando una respuesta con la contraseña correcta: solicitud de DELETE a `/api/replies/{board}` con un `delete_password` válido +- Creando una respuesta: solicitud de PUT a `/api/replies/{board}` # --hints-- -You can provide your own project, not the example URL. +Puedes proporcionar tu propio proyecto, no la URL de ejemplo. ```js (getUserInput) => { @@ -51,7 +51,7 @@ You can provide your own project, not the example URL. }; ``` -Only allow your site to be loaded in an iFrame on your own pages. +Solo permite que tu sitio se cargue en un iFrame en tus propias páginas. ```js async (getUserInput) => { @@ -61,7 +61,7 @@ async (getUserInput) => { }; ``` -Do not allow DNS prefetching. +No permitas la captación previa de DNS. ```js async (getUserInput) => { @@ -71,7 +71,7 @@ async (getUserInput) => { }; ``` -Only allow your site to send the referrer for your own pages. +Solo permite que tu sitio envíe el referente hacia tus propias páginas. ```js async (getUserInput) => { @@ -81,7 +81,7 @@ async (getUserInput) => { }; ``` -You can send a POST request to `/api/threads/{board}` with form data including `text` and `delete_password`. The saved database record will have at least the fields `_id`, `text`, `created_on`(date & time), `bumped_on`(date & time, starts same as `created_on`), `reported` (boolean), `delete_password`, & `replies` (array). +Puedes enviar una solicitud POST a `/api/threads/{board}` con datos de formulario incluyendo `text` y `delete_password`. El registro de base de datos guardado tendrá al menos los campos `_id`, `text`, `created_on`(fecha & hora), `bumped_on`(fecha & hora, comienza igual que `created_on`), `reported` (boolean), `delete_password`, & `replies` (arreglo). ```js async (getUserInput) => { @@ -113,52 +113,273 @@ async (getUserInput) => { }; ``` -You can send a POST request to `/api/replies/{board}` with form data including `text`, `delete_password`, & `thread_id`. This will update the `bumped_on` date to the comment's date. In the thread's `replies` array, an object will be saved with at least the properties `_id`, `text`, `created_on`, `delete_password`, & `reported`. +Puedes enviar una solicitud POST a `/api/replies/{board}` con datos de formulario incluyendo `text`, `delete_password`, & `thread_id`. Esto actualizará la fecha de `bumped_on` a la fecha del comentario. En el arreglo de `replies` del hilo, un objeto se guardará con al menos las propiedades `_id`, `text`, `created_on`, `delete_password`, & `reported`. ```js +async (getUserInput) => { + const url = getUserInput('url'); + const body = await fetch(url + '/api/threads/fcc_test'); + const thread = await body.json(); + const date = new Date(); + const text = `fcc_test_reply_${date}`; + const delete_password = 'delete_me'; + const thread_id = thread[0]._id; + const replyCount = thread[0].replies.length; + + const data = { text, delete_password, thread_id }; + const res = await fetch(url + '/api/replies/fcc_test', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + if (res.ok) { + const checkData = await fetch(`${url}/api/replies/fcc_test?thread_id=${thread_id}`); + const parsed = await checkData.json(); + try { + assert.equal(parsed.replies.length, replyCount + 1); + assert.equal(parsed.replies[0].text, text); + assert.equal(parsed._id, thread_id); + assert.equal(parsed.bumped_on, parsed.replies[0].created_on); + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a GET request to `/api/threads/{board}`. Returned will be an array of the most recent 10 bumped threads on the board with only the most recent 3 replies for each. The `reported` and `delete_password` fields will not be sent to the client. +Puedes enviar una solicitud GET a `/api/threads/{board}`. Se devolverá un arreglo de los 10 hilos más recientes en el tablero con solo las 3 respuestas más recientes para cada uno. Los campos `reported` y `delete_password` no serán enviados al cliente. ```js +async (getUserInput) => { + const url = getUserInput('url'); + const res = await fetch(url + '/api/threads/fcc_test'); + if (res.ok) { + const threads = await res.json(); + try { + assert.equal(res.status, 200); + assert.isAtMost(threads.length, 10); + for (let i = 0; i < threads.length; i++) { + assert.containsAllKeys(threads[i], ["_id", "text", "created_on", "bumped_on", "replies"]); + assert.isAtMost(threads[i].replies.length, 3); + assert.notExists(threads[i].delete_password); + assert.notExists(threads[i].reported); + for (let j = 0; j < threads[i].replies.length; j++) { + assert.notExists(threads[i].replies[j].delete_password); + assert.notExists(threads[i].replies[j].reported); + } + } + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a GET request to `/api/replies/{board}?thread_id={thread_id}`. Returned will be the entire thread with all its replies, also excluding the same fields from the client as the previous test. +Puedes enviar una solicitud GET a `/api/replies/{board}?thread_id={thread_id}`. Se devolverá el hilo completo con todas sus respuestas, también excluyendo los mismos campos del cliente que la prueba anterior. ```js +async (getUserInput) => { + const url = getUserInput('url'); + let res = await fetch(url + '/api/threads/fcc_test'); + const threads = await res.json(); + const thread_id = threads[0]._id; + res = await fetch(`${url}/api/replies/fcc_test?thread_id=${thread_id}`); + if (res.ok) { + const thread = await res.json(); + try { + assert.equal(res.status, 200); + assert.isObject(thread); + assert.containsAllKeys(thread, ["_id", "text", "created_on", "bumped_on", "replies"]); + assert.isArray(thread.replies); + assert.notExists(thread.delete_password); + assert.notExists(thread.reported); + for (let i = 0; i < thread.replies.length; i++) { + assert.notExists(thread.replies[i].delete_password); + assert.notExists(thread.replies[i].reported); + } + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a DELETE request to `/api/threads/{board}` and pass along the `thread_id` & `delete_password` to delete the thread. Returned will be the string `incorrect password` or `success`. +Puedes enviar una solicitud DELETE a `/api/threads/{board}` y pasar a lo largo del `thread_id` & `delete_password` para eliminar el hilo. Devuelto será la cadena `incorrect password` o `success`. ```js +async (getUserInput) => { + const url = getUserInput('url'); + let res = await fetch(url + '/api/threads/fcc_test'); + const threads = await res.json(); + const thread_id = threads[0]._id; + let data = { thread_id, delete_password: "wrong_password" }; + const res_invalid = await fetch(url + '/api/threads/fcc_test', { + method: 'DELETE', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + data = { thread_id, delete_password: "delete_me" }; + res = await fetch(url + '/api/threads/fcc_test', { + method: 'DELETE', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + if (res.ok) { + const deleted = await res.text(); + const not_deleted = await res_invalid.text(); + try { + assert.equal(res.status, 200); + assert.equal(deleted, "success"); + assert.equal(not_deleted, "incorrect password"); + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a DELETE request to `/api/replies/{board}` and pass along the `thread_id`, `reply_id`, & `delete_password`. Returned will be the string `incorrect password` or `success`. On success, the text of the `reply_id` will be changed to `[deleted]`. +Puedes enviar una solicitud DELETE a `/api/replies/{board}` y pasar a lo largo del `thread_id`, `reply_id`, & `delete_password`. Devuelta será la cadena `incorrect password` o `success`. En caso de éxito, el texto del `reply_id` se cambiará a `[deleted]`. ```js +async (getUserInput) => { + const url = getUserInput('url'); + const thread_data = { + text: "fcc_test_thread", + delete_password: "delete_me", + }; + await fetch(`${url}/api/threads/fcc_test`, { + method: "POST", + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(thread_data) + }); + let res = await fetch(`${url}/api/threads/fcc_test`); + let threads = await res.json(); + const thread_id = threads[0]._id; + + const reply_data = { thread_id, text: "fcc_test_reply", delete_password: "delete_me" }; + await fetch(`${url}/api/replies/fcc_test`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(reply_data) + }); + res = await fetch(`${url}/api/threads/fcc_test`); + threads = await res.json(); + const reply_id = threads[0].replies[0]._id; + + const data = { thread_id, reply_id, delete_password: "delete_me" }; + res = await fetch(url + '/api/replies/fcc_test', { + method: 'DELETE', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + + if (res.ok) { + const deleted = await res.text(); + try { + assert.equal(res.status, 200); + assert.equal(deleted, "success"); + res = await fetch(`${url}/api/replies/fcc_test?thread_id=${thread_id}`); + const thread = await res.json(); + assert.equal(thread._id, thread_id); + assert.equal(thread.replies[0]._id, reply_id); + assert.equal(thread.replies[0].text, "[deleted]"); + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a PUT request to `/api/threads/{board}` and pass along the `thread_id`. Returned will be the string `success`. The `reported` value of the `thread_id` will be changed to `true`. +Puedes enviar una solicitud PUT a `/api/threads/{board}` y pasar a lo largo del `thread_id`. Devuelta será la cadena `reported`. El valor `reported` del `thread_id` será cambiado a `true`. ```js +async (getUserInput) => { + const url = getUserInput('url'); + let res = await fetch(`${url}/api/threads/fcc_test`); + const threads = await res.json(); + const report_id = threads[0]._id; + const data = { report_id }; + + res = await fetch(`${url}/api/threads/fcc_test`, { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + + if (res.ok) { + const reported = await res.text(); + try { + assert.equal(res.status, 200); + assert.equal(reported, "reported"); + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -You can send a PUT request to `/api/replies/{board}` and pass along the `thread_id` & `reply_id`. Returned will be the string `success`. The `reported` value of the `reply_id` will be changed to `true`. +Puedes enviar una solicitud PUT a`/api/replies/{board}` y pasar a lo largo de `thread_id` & `reply_id`. Devuelta será la cadena `reported`. El valor `reported` del `reply_id` será cambiado a `true`. ```js +async (getUserInput) => { + const url = getUserInput('url'); + let res = await fetch(`${url}/api/threads/fcc_test`); + const threads = await res.json(); + const thread_id = threads[0]._id; + const reply_id = threads[0].replies[0]._id; + const data = { thread_id, reply_id }; + + res = await fetch(`${url}/api/replies/fcc_test`, { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data) + }); + + if (res.ok) { + const reported = await res.text(); + try { + assert.equal(res.status, 200); + assert.equal(reported, "reported"); + } catch (err) { + throw new Error(err.responseText || err.message); + } + } else { + throw new Error(`${res.status} ${res.statusText}`); + } +}; ``` -All 10 functional tests are complete and passing. +Las 10 pruebas funcionales están completas y pasan. ```js - +async (getUserInput) => { + const tests = await fetch(getUserInput('url') + '/_api/get-tests'); + const parsed = await tests.json(); + assert.isTrue(parsed.length >= 10); + parsed.forEach((test) => { + assert.equal(test.state, 'passed'); + assert.isAtLeast(test.assertions.length, 1); + }); +}; ``` # --solutions-- diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index 435b92ad320..a20c696babe 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ Non dovresti utilizzare l'operatore di assegnazione. ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md b/curriculum/challenges/italian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md index 6c433375ba7..682637b431a 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md @@ -1,6 +1,6 @@ --- id: 587d78b0367417b2b2512b05 -title: Build a Technical Documentation Page +title: Crea una pagina di documentazione tecnica challengeType: 14 forumTopicId: 301146 dashedName: build-a-technical-documentation-page @@ -8,45 +8,47 @@ dashedName: build-a-technical-documentation-page # --description-- -**Objective:** Build an app that is functionally similar to https://technical-documentation-page.freecodecamp.rocks +**Obbiettivo:** Crea un'app funzionalmente simile a https://technical-documentation-page.freecodecamp.rocks -**User Stories:** +**User story:** -1. You can see a `main` element with a corresponding `id="main-doc"`, which contains the page's main content (technical documentation) -1. Within the `#main-doc` element, you can see several `section` elements, each with a class of `main-section`. There should be a minimum of five -1. The first element within each `.main-section` should be a `header` element, which contains text that describes the topic of that section. -1. Each `section` element with the class of `main-section` should also have an `id` that corresponds with the text of each `header` contained within it. Any spaces should be replaced with underscores (e.g. The section that contains the header "JavaScript and Java" should have a corresponding `id="JavaScript_and_Java"`) -1. The `.main-section` elements should contain at least ten `p` elements total (not each) -1. The `.main-section` elements should contain at least five `code` elements total (not each) -1. The `.main-section` elements should contain at least five `li` items total (not each) -1. You can see a `nav` element with a corresponding `id="navbar"` -1. The navbar element should contain one `header` element which contains text that describes the topic of the technical documentation -1. Additionally, the navbar should contain link (`a`) elements with the class of `nav-link`. There should be one for every element with the class `main-section` -1. The `header` element in the `#navbar` must come before any link (`a`) elements in the navbar -1. Each element with the class of `nav-link` should contain text that corresponds to the `header` text within each `section` (e.g. if you have a "Hello world" section/header, your navbar should have an element which contains the text "Hello world") -1. When you click on a navbar element, the page should navigate to the corresponding section of the `main-doc` element (e.g. If you click on a `nav-link` element that contains the text "Hello world", the page navigates to a `section` element with that id, and contains the corresponding header) -1. On regular sized devices (laptops, desktops), the element with `id="navbar"` should be shown on the left side of the screen and should always be visible to the user -1. Your technical documentation should use at least one media query +1. Devi avere un elemento `main` con un corrispondente `id="main-doc"`, che contiene il contenuto principale della pagina (technical documentation) +1. Dentro l'elemento `#main-doc`, puoi aggiungere svariati elementi `section`, ognuno con una classe di valore `main-section`. Dovrebbero essercene almeno cinque +1. Il primo elemento dentro ogni `.main-section` dovrebbe essere un elemento `header`, che contiene testo che descrive l'argomento della sezione. +1. Ogni elemento `section` con la classe `main-section` dovrebbe avere un `id` che corrisponde al testo di ogni elemento `header` al suo interno. Qualsiasi spazio deve essere sostituito con un underscore (ad esempio, la sezione che contiene l'intestazione "JavaScript and Java" dovrebbe avere un corrispondente `id="JavaScript_and_Java"`) +1. Gli elementi `.main-section` dovrebbero contenere almeno dieci elementi `p` in totale (non ciascuno) +1. Gli elementi `.main-section` dovrebbero contenere almeno cinque elementi `code` in totale (non ciascuno) +1. Gli elementi `.main-section` dovrebbero contenere almeno cinque elementi `li` in totale (non ciascuno) +1. Dovresti aggiungere un elemento `nav` con un corrispondente `id="navbar"` +1. L'elemento navbar dovrebbe contenere un elemento `header` con del testo che descrive l'argomento della documentazione tecnica +1. In aggiunta, l'elemento navbar dovrebbe contenere dei link (elementi `a`) con la classe `nav-link`. Dovrebbe essercene uno per ogni elemento di classe `main-section` +1. L'elemento `header` dentro `#navbar` deve trovarsi prima di qualsiasi link (elemento `a`) nella barra di navigazione +1. Ogni elemento con la classe `nav-link` dovrebbe contenere del testo corrispondente al testo dell'elemento `header` dentro ogni elemento `section` (per esempio, se c'è una sezione/intestazione "Hello world", la barra di navigazione dovrebbe avere un elemento che contiene il testo "Hello world") +1. Quando clicchi su un elemento navbar, la pagina dovrebbe andare alla sezione corrispondente dell'elemento `#main-doc` (per esempio se clicchi su un elemento `.nav-link` che contiene il testo "Hello world", la pagina va fino all'elemento `section` che ha quell'id, e contiene l'intestazione corrispondente) +1. Su dispositivi di dimensione regolare (laptop, desktop), l'elemento con `id="navbar"` dovrebbe essere sempre nella parte sinistra dello schermo e dovrebbe essere sempre visibile all'utente +1. La tua documentazione tecnica dovrebbe avere almeno un media query -Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding! +Soddisfa le user story e passa tutti i test qui sotto per completare questo progetto. Usa il tuo stile personale. Buon divertimento! + +**Nota:** Assicurati di aggiungere `` nell'HTML per linkare il foglio di stile e applicare il CSS # --hints-- -You should have a `main` element with an `id` of `main-doc` +Dovresti avere un elemento `main` con un `id` di `main-doc`. ```js const el = document.getElementById('main-doc') assert(!!el) ``` -You should have at least five `section` elements with a class of `main-section` +Dovresti avere almeno cinque elementi `section` con la classe `main-section`. ```js const els = document.querySelectorAll('#main-doc section') assert(els.length >= 5) ``` -All of your `.main-section` elements should be `section` elements +Tutti gli elementi `.main-section` dovrebbero essere elementi `section`. ```js const els = document.querySelectorAll('.main-section') @@ -56,14 +58,14 @@ els.forEach(el => { assert(els.length > 0) ``` -You should have at least five `.main-section` elements that are descendants of `#main-doc` +Dovrebbero esserci almeno cinque elementi `.main-section` discendenti di `#main-doc`. ```js const els = document.querySelectorAll('#main-doc .main-section') assert(els.length >= 5) ``` -The first child of each `.main-section` should be a `header` element +Il primo figlio di ogni elemento `.main-section` dovrebbe essere un elemento `header`. ```js const els = document.querySelectorAll('.main-section') @@ -73,7 +75,7 @@ els.forEach(el => { assert(els.length > 0) ``` -None of your `header` elements should be empty +Nessuno degli elementi `header` dovrebbe essere vuoto. ```js const els = document.querySelectorAll('header') @@ -83,7 +85,7 @@ els.forEach(el => { assert(els.length > 0) ``` -All of your `.main-section` elements should have an `id` +Tutti gli elementi `.main-section` dovrebbero avere un `id`. ```js const els = document.querySelectorAll('.main-section') @@ -93,7 +95,7 @@ els.forEach(el => { assert(els.length > 0) ``` -Each `.main-section` should have an `id` that matches the text of its first child, having any spaces in the child's text replaced with underscores (`_`) for the id’s +Ogni elemento `.main-section` dovrebbe avere un `id` che corrisponde con il testo del primo figlio, e ogni spazio nel testo del figlio deve essere sostituito con dei trattini bassi (`_`). ```js const els = document.querySelectorAll('.main-section') @@ -104,49 +106,49 @@ els.forEach(el => { assert(els.length > 0) ``` -You should have at least 10 `p` elements (total) within your `.main-section` elements +Dovresti avere almeno 10 elementi `p` (in totale) dentro gli elementi `.main-section`. ```js const els = document.querySelectorAll('.main-section p') assert(els.length >= 10) ``` -You should have at least five `code` elements that are descendants of `.main-section` elements +Dovresti avere almeno cinque elementi `code` che sono discendenti degli elementi `.main-section`. ```js const els = document.querySelectorAll('.main-section code') assert(els.length >= 5) ``` -You should have at least five `li` elements that are descendants of `.main-section` elements +Dovrebbero esserci almeno cinque elementi `li` che sono discendenti degli elementi `.main-section`. ```js const els = document.querySelectorAll('.main-section li') assert(els.length >= 5) ``` -You should have a `nav` element with an `id` of `navbar` +Dovrebbe esserci un elemento `nav` con un attributo `id` con il valore `navbar`. ```js const el = document.getElementById('navbar') assert(!!el && el.tagName === 'NAV') ``` -Your `#navbar` should have exactly one `header` element within it +L'elemento `#navbar` dovrebbe avere un solo elemento `header` al suo interno. ```js const els = document.querySelectorAll('#navbar header') assert(els.length === 1) ``` -You should have at least one `a` element with a class of `nav-link` +Dovrebbe esserci almeno un elemento `a` con la classe `nav-link`. ```js -const els = document.querySelectorAll('a[class="nav-link"]') +const els = document.querySelectorAll('a.nav-link') assert(els.length >= 1) ``` -All of your `.nav-link` elements should be anchor (`a`) elements +Tutti gli elementi `.nav-link` dovrebbero essere elementi di ancoraggio (`a`). ```js const els = document.querySelectorAll('.nav-link') @@ -156,7 +158,7 @@ els.forEach(el => { assert(els.length > 0) ``` -All of your `.nav-link` elements should be in the `#navbar` +Tutti gli elementi `.nav-link` dovrebbero essere dentro `#navbar`. ```js const els1 = document.querySelectorAll('.nav-link') @@ -164,7 +166,7 @@ const els2 = document.querySelectorAll('#navbar .nav-link') assert(els2.length > 0 && els1.length === els2.length) ``` -You should have the same number of `.nav-link` and `.main-section` elements +Dovresti avere lo stesso numero di elementi `.nav-link` e di elementi `.main-section`. ```js const els1 = document.querySelectorAll('.main-section') @@ -172,7 +174,7 @@ const els2 = document.querySelectorAll('.nav-link') assert(els1.length > 0 && els2.length > 0 && els1.length === els2.length) ``` -The `header` element in the `#navbar` should come before any link (`a`) elements also in the `#navbar` +L'elemento `header` dentro `#navbar` dovrebbe trovarsi prima di qualsiasi link (elemento `a`) all'interno di `#navbar`. ```js const navLinks = document.querySelectorAll('#navbar a.nav-link'); @@ -188,7 +190,7 @@ navLinks.forEach((navLink) => { assert(!!header) ``` -Each `.nav-link` should have text that corresponds to the `header` text of its related `section` (e.g. if you have a "Hello world" section/header, your `#navbar` should have a `.nav-link` which has the text "Hello world") +Ogni elemento `.nav-link` dovrebbe avere del testo corrispondente all'elemento `header` del relativo elemento `section` (per esempio, se hai una sezione/intestazione con "Hello world", l'elemento `#navbar` dovrebbe avere un elemento `.nav-link` con il testo "Hello world"). ```js const headerText = Array.from(document.querySelectorAll('.main-section')).map(el => @@ -201,7 +203,7 @@ const remainder = headerText.filter(str => linkText.indexOf(str) === -1) assert(headerText.length > 0 && headerText.length > 0 && remainder.length === 0) ``` -Each `.nav-link` should have an `href` attribute that links to its corresponding `.main-section` (e.g. If you click on a `.nav-link` element that contains the text "Hello world", the page navigates to a `section` element with that id) +Ogni elemento `.nav-link` dovrebbe avere un attributo `href` che linka all'elemento `.main-section` corrispondente (per esempio, se clicchi su un elemento `.nav-link` che contiene il testo "Hello world", la pagina va all'elemento `section` con quell'id). ```js const hrefValues = Array.from(document.querySelectorAll('.nav-link')).map(el => el.getAttribute('href')) @@ -210,7 +212,7 @@ const missingHrefValues = mainSectionIDs.filter(str => hrefValues.indexOf('#' + assert(hrefValues.length > 0 && mainSectionIDs.length > 0 && missingHrefValues.length === 0) ``` -Your `#navbar` should always be on the left edge of the window +L'elemento `#navbar` dovrebbe sempre essere sul bordo sinistro della finestra. ```js const el = document.getElementById('navbar') @@ -219,10 +221,12 @@ const left2 = el?.offsetLeft assert(!!el && left1 >= -15 && left1 <= 15 && left2 >= -15 && left2 <= 15) ``` -Your Technical Documentation project should use at least one media query +Il progetto di documentazione tecnica dovrebbe avere almeno un media query. ```js -assert.isAtLeast(new __helpers.CSSHelp(document).getCSSRules('media')?.length, 1); +const htmlSourceAttr = Array.from(document.querySelectorAll('source')).map(el => el.getAttribute('media')) +const cssCheck = new __helpers.CSSHelp(document).getCSSRules('media') +assert(cssCheck.length > 0 || htmlSourceAttr.length > 0); ``` # --seed-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md index d369e2350a2..fa56a3c82f9 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md @@ -13,6 +13,12 @@ Attualmente esistono due principali modelli dei colori: il modello additivo Innanzitutto, aggiungi `one` all'attributo `class` del primo elemento `div`. +```html +
+ ...content +
+``` + # --hints-- Dovresti aggiungere la classe `one` al primo elemento `div`. diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md new file mode 100644 index 00000000000..6b1d5ec25b3 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md @@ -0,0 +1,131 @@ +--- +id: 612e6afc009b450a437940a1 +title: Step 1 +challengeType: 0 +dashedName: step-1 +--- + +# --description-- + +Inizia a scrivere la struttura HTML di base. Aggiungi la dichiarazione `DOCTYPE` e gli elementi `html`, `head`, `body` e `title`. Aggiungi il testo `Piano` nell'elemento `title`. + +# --hints-- + +Il codice dovrebbe contenere il riferimento `DOCTYPE`. + +```js +assert(code.match(/`. + +```js +assert(code.match(//gi)); +``` + +L'elemento `html` dovrebbe avere un tag di apertura. + +```js +assert(code.match(//gi)); +``` + +L'elemento `html` dovrebbe avere un tag di chiusura. + +```js +assert(code.match(/<\/html\s*>/)); +``` + +La dichiarazione `DOCTYPE` dovrebbe essere all'inizio del tuo HTML. + +```js +assert(__helpers.removeHtmlComments(code).match(/^\s*/i)); +``` + +Dovresti avere un tag `head` di apertura. + +```js +assert(code.match(//i)); +``` + +Dovresti avere un tag `head` di chiusura. + +```js +assert(code.match(/<\/head\s*>/i)); +``` + +Dovresti avere un tag `body` di apertura. + +```js +assert(code.match(//i)); +``` + +Dovresti avere un tag `body` di chiusura. + +```js +assert(code.match(/<\/body\s*>/i)); +``` + +Gli elementi `head` e `body` dovrebbero essere fratelli. + +```js +assert(document.querySelector('head')?.nextElementSibling?.localName === 'body'); +``` + +L'elemento `head` dovrebbe essere all'interno dell'elemento `html`. + +```js +assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head')); +``` + +L'elemento `body` dovrebbe essere all'interno dell'elemento `html`. + +```js +assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body')); +``` + +Il codice dovrebbe avere un elemento `title`. + +```js +const title = document.querySelector('title'); +assert.exists(title); +``` + +Il progetto dovrebbe avere un titolo di `Piano`. + +```js +const title = document.querySelector('title'); +assert.equal(title?.text?.trim()?.toLowerCase(), 'piano') +``` + +Fai attenzione all'uso delle maiuscole/minuscole e all'ortografia nel titolo. + +```js +const title = document.querySelector('title'); +assert.equal(title?.text?.trim(), 'Piano'); +``` + +# --seed-- + +## --seed-contents-- + +```html +--fcc-editable-region-- + +--fcc-editable-region-- +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md new file mode 100644 index 00000000000..910ed8bb445 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md @@ -0,0 +1,64 @@ +--- +id: 612e77aba7ca691f598feb02 +title: Step 2 +challengeType: 0 +dashedName: step-2 +--- + +# --description-- + +Aggiungi due tag `meta`, uno per ottimizzare la pagina per i dispositivi mobili e uno per specificare il `charset` per la pagina. + +# --hints-- + +Dovresti aggiungere due elementi `meta` alla pagina. + +```js +const meta = document.querySelector('meta'); +assert.exists(meta); +``` + +Dovresti avere due elementi `meta`. + +```js +const meta = document.querySelectorAll('meta'); +assert(meta?.length === 2); +``` + +Un elemento `meta` dovrebbe avere l'attributo `name` impostato su `viewport` e l'attributo `content` impostato su `width=device-width, initial-scale=1.0`. + +```js +const meta = [...document.querySelectorAll('meta')]; +const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && m?.getAttribute('content') === 'width=device-width, initial-scale=1.0' && !m?.getAttribute('charset')); +assert.exists(target); +``` + +L'altro elemento `meta` dovrebbe avere l'attributo `charset` impostato su `UTF-8`. + +```js +const meta = [...document.querySelectorAll('meta')]; +const target = meta?.find(m => !m?.getAttribute('name') && !m?.getAttribute('content') && m?.getAttribute('charset')?.toLowerCase() === 'utf-8'); +assert.exists(target); +``` + + +# --seed-- + +## --seed-contents-- + +```html + + + + Piano + --fcc-editable-region-- + + --fcc-editable-region-- + + + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e78af05201622d4bab8aa.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e78af05201622d4bab8aa.md new file mode 100644 index 00000000000..cc7665297aa --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e78af05201622d4bab8aa.md @@ -0,0 +1,57 @@ +--- +id: 612e78af05201622d4bab8aa +title: Step 3 +challengeType: 0 +dashedName: step-3 +--- + +# --description-- + +È ora di iniziare a lavorare sul pianoforte. Crea un elemento `div` all'interno dell'elemento `body` con l'`id` impostato su `piano`. + +# --hints-- + +Dovresti creare un nuovo elemento `div`. + +```js +const div = document.querySelector('div'); +assert.exists(div); +``` + +L'elemento `div` dovrebbe essere all'interno dell'elemento `body`. + +```js +const div = document.querySelector('div'); +assert(div?.parentElement?.localName === 'body'); +``` + +L'elemento `div` dovrebbe avere un attributo `id` impostato su `piano`. + +```js +const div = document.querySelector('div'); +assert(div?.getAttribute('id') === 'piano'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + --fcc-editable-region-- + + --fcc-editable-region-- + + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e7d1c29fb872d6384379c.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e7d1c29fb872d6384379c.md new file mode 100644 index 00000000000..492da1dfd63 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e7d1c29fb872d6384379c.md @@ -0,0 +1,60 @@ +--- +id: 612e7d1c29fb872d6384379c +title: Step 4 +challengeType: 0 +dashedName: step-4 +--- + +# --description-- + +Annida un secondo `div` all'interno del `div` esistente e assegna all'attributo `class` il valore `keys`. + +# --hints-- + +Dovresti creare un secondo elemento `div`. + +```js +const divDiv = document.querySelectorAll('div'); +assert(divDiv?.length === 2); +``` + +Il nuovo elemento `div` dovrebbe essere all'interno dell'elemento `div` esistente. + +```js +const div = document.querySelector('div'); +assert(div?.children?.length === 1); +assert(div?.children?.[0]?.localName === 'div'); +``` + +Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `keys`. + +```js +const div = document.querySelector('div'); +assert(div?.children?.[0]?.className === 'keys'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + +
+ --fcc-editable-region-- + + --fcc-editable-region-- +
+ + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e804c54d5e7308d7ebe56.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e804c54d5e7308d7ebe56.md new file mode 100644 index 00000000000..01c29a00747 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e804c54d5e7308d7ebe56.md @@ -0,0 +1,60 @@ +--- +id: 612e804c54d5e7308d7ebe56 +title: Step 5 +challengeType: 0 +dashedName: step-5 +--- + +# --description-- + +All'interno dell'elemento `.keys`, aggiungi sette elementi `div`. Assegna a tutti la classe `key`. + +# --hints-- + +Dovresti creare sette nuovi elementi `div`. + +```js +const divDivDiv = document.querySelectorAll('div'); +assert(divDivDiv?.length === 9); +``` + +I sette nuovi elementi `div` dovrebbero essere all'interno dell'elemento `.keys`. + +```js +const keys = document.querySelector('.keys'); +assert([...keys?.children].length === 7); +assert([...keys?.children].every(child => child?.tagName === 'DIV')); +``` + +I sette nuovi elementi `div` dovrebbero tutti avere l'attributo `class` con il valore `key`. + +```js +const keys = document.querySelector('.keys'); +assert([...keys?.children].every(child => child?.classList?.contains('key'))); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + --fcc-editable-region-- +
+
+
+ --fcc-editable-region-- + + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e813b3ba67633222cbe54.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e813b3ba67633222cbe54.md new file mode 100644 index 00000000000..3561ddb7cf5 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e813b3ba67633222cbe54.md @@ -0,0 +1,95 @@ +--- +id: 612e813b3ba67633222cbe54 +title: Step 6 +challengeType: 0 +dashedName: step-6 +--- + +# --description-- + +Ricorda che un attributo `class` può avere valori multipli. Per separare i tasti bianchi dai tasti neri, aggiungerai un secondo valore `class` di `black--key`. Aggiungilo al secondo, terzo, quinto, sesto e settimo elemento `.key`. + +# --hints-- + +Il secondo elemento `.key` dovrebbe avere anche un attributo `class` di `black--key`. + +```js +const key = document.querySelectorAll('.key')?.[1]; +assert(key?.className?.includes('black--key')); +``` + +Il terzo `.key` dovrebbe contenere `black--key` nell'attributo `class`. + +```js +const third = document.querySelectorAll('.key')?.[2]; +assert(third?.classList?.contains('black--key')); +``` + +Il quinto `.key` dovrebbe contenere `black--key` nell'attributo `class`. + +```js +const fifth = document.querySelectorAll('.key')?.[4]; +assert(fifth?.classList?.contains('black--key')); +``` + +Il sesto `.key` dovrebbe contenere `black--key` nell'attributo `class`. + +```js +const sixth = document.querySelectorAll('.key')?.[5]; +assert(sixth?.classList?.contains('black--key')); +``` + +Il settimo `.key` dovrebbe contenere `black--key` nell'attributo `class`. + +```js +const seventh = document.querySelectorAll('.key')?.[6]; +assert(seventh?.classList?.contains('black--key')); +``` + +Dovresti avere cinque elementi `.black--key`. + +```js +const blackKeys = document.querySelectorAll('.black--key'); +assert(blackKeys?.length === 5); +``` + +Dovresti avere sette elementi `.key`. + +```js +const keys = document.querySelectorAll('.key'); +assert(keys?.length === 7); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + --fcc-editable-region-- +
+
+
+
+
+
+
+
+
+
+
+ --fcc-editable-region-- + + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e83ec2eca1e370f830511.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e83ec2eca1e370f830511.md new file mode 100644 index 00000000000..11391517308 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e83ec2eca1e370f830511.md @@ -0,0 +1,99 @@ +--- +id: 612e83ec2eca1e370f830511 +title: Step 8 +challengeType: 0 +dashedName: step-8 +--- + +# --description-- + +Aggiungi un elemento `link` all'interno dell'elemento `head`. Imposta l'attributo `rel` dell'elemento `link` su `stylesheet` e `href` su `./styles.css`. + +# --hints-- + +Il codice dovrebbe avere un elemento `link`. + +```js +assert.match(code, //i)); +``` + +L'elemento `link` dovrebbe essere all'interno dell'elemento `head`. + +```js +assert(code.match(/[\w\W\s]*[\w\W\s]*<\/head>/i)) +``` + +L'elemento `link` dovrebbe avere un attributo `rel` con il valore `stylesheet`. + +```js +assert.match(code, / + + + --fcc-editable-region-- + + Piano + + --fcc-editable-region-- + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css + +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89562043183c86df287c.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89562043183c86df287c.md new file mode 100644 index 00000000000..025eea7e19b --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89562043183c86df287c.md @@ -0,0 +1,77 @@ +--- +id: 612e89562043183c86df287c +title: Step 9 +challengeType: 0 +dashedName: step-9 +--- + +# --description-- + +I browser possono applicare dei valori predefiniti per il margine e il padding di elementi specifici. Per assicurarti che il piano abbia l'aspetto desiderato, devi resettare il box model. + +Aggiungi un selettore `html` al file CSS e imposta la proprietà `box-sizing` su `border-box`. + +# --hints-- + +Dovresti avere un selettore `html`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('html')); +``` + +Il selettore `html` dovrebbe avere la proprietà `box-sizing` impostata su `border-box`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('html')?.boxSizing === 'border-box'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89d254fe5d3df7d6693d.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89d254fe5d3df7d6693d.md new file mode 100644 index 00000000000..ec7f02e8b6c --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e89d254fe5d3df7d6693d.md @@ -0,0 +1,83 @@ +--- +id: 612e89d254fe5d3df7d6693d +title: Step 10 +challengeType: 0 +dashedName: step-10 +--- + +# --description-- + +Ora che hai resettato il box model `html`, devi anche applicarlo agli elementi all'interno. Per fare ciò, puoi impostare la proprietà `box-sizing` su `inherit`, che farà in modo che gli elementi selezionati utilizzino lo stesso valore dell'elemento genitore. + +Avrai anche bisogno di selezionare gli pseudo-elementi, identificati con parole chiave speciali che seguono un selettore. I due pseudo-elementi che userai sono `::before` e `::after`. + +`::before` crea uno pseudo-elemento che è il primo figlio dell'elemento selezionato; `::after` crea uno pseudo-elemento che è l'ultimo figlio dell'elemento selezionato. Questi pseudo-elementi sono spesso utilizzati per creare contenuti estetici, che vedrai più avanti in questo progetto. + +Per ora, crea un selettore CSS per selezionare tutti gli elementi con `*` e includi gli pseudo-elementi con `::before` e `::after`. Imposta la proprietà `box-sizing` su `inherit`. + +# --hints-- + +Dovresti avere un selettore `*, ::before, ::after`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')); +``` + +Il selettore `*, ::before, ::after` dovrebbe avere una proprietà `box-sizing` impostata su `inherit`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.boxSizing === 'inherit'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +--fcc-editable-region-- +html { + box-sizing: border-box; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e8eebe3a6dc3fcc33a66f.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e8eebe3a6dc3fcc33a66f.md new file mode 100644 index 00000000000..296897bf8a2 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e8eebe3a6dc3fcc33a66f.md @@ -0,0 +1,95 @@ +--- +id: 612e8eebe3a6dc3fcc33a66f +title: Step 11 +challengeType: 0 +dashedName: step-11 +--- + +# --description-- + +Ora seleziona l'elemento `#piano` con un selettore di `id`. Imposta `background-color` a `#00471b`, `width` a `992px` e `height` a `290px`. + +# --hints-- + +Dovresti avere un selettore `#piano`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')); +``` + +Il selettore `#piano` dovrebbe avere la proprietà `background-color` impostata a `#00471b`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.backgroundColor === 'rgb(0, 71, 27)'); +``` + +Il selettore `#piano` dovrebbe avere una proprietà `width` impostata su `992px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.width === '992px'); +``` + +Il selettore `#piano` dovrebbe avere una proprietà `height` impostata su `290px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.height === '290px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e95ef2e4bdf41f69067f9.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e95ef2e4bdf41f69067f9.md new file mode 100644 index 00000000000..d2dc1d49706 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e95ef2e4bdf41f69067f9.md @@ -0,0 +1,81 @@ +--- +id: 612e95ef2e4bdf41f69067f9 +title: Step 12 +challengeType: 0 +dashedName: step-12 +--- + +# --description-- + +Imposta la proprietà `margin` dell'elemento `#piano` su `80px auto`. + +# --hints-- + +Il selettore `#piano` dovrebbe avere una proprietà `margin` impostata su `80px auto`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.margin === '80px auto'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +--fcc-editable-region-- +#piano { + background-color: #00471b; + width: 992px; + height: 290px; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e96fc87fe8e44f69f7ec5.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e96fc87fe8e44f69f7ec5.md new file mode 100644 index 00000000000..d334b51f7ca --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e96fc87fe8e44f69f7ec5.md @@ -0,0 +1,102 @@ +--- +id: 612e96fc87fe8e44f69f7ec5 +title: Step 13 +challengeType: 0 +dashedName: step-13 +--- + +# --description-- + +È ora di dedicarci allo stile dei tasti. Sotto la regola `#piano`, crea un selettore per l'attributo `class` con il valore `.keys`. Assegna alla nuova regola una proprietà `background-color` di `#040404`, una proprietà `width` di `949px` e una proprietà `height` di `180px`. + +# --hints-- + +Dovresti avere un selettore `.keys`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')); +``` + +Il selettore `.keys` dovrebbe avere una proprietà `background-color` impostata a `#040404`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')?.backgroundColor === 'rgb(4, 4, 4)'); +``` + +Il selettore `.keys` dovrebbe avere la proprietà `width` impostata a `949px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')?.width === '949px'); +``` + +Il selettore `.keys` dovrebbe avere la proprietà `height` impostata a `180px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')?.height === '180px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e98f3245c98475e49cfc6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e98f3245c98475e49cfc6.md new file mode 100644 index 00000000000..4c13f383a77 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e98f3245c98475e49cfc6.md @@ -0,0 +1,88 @@ +--- +id: 612e98f3245c98475e49cfc6 +title: Step 14 +challengeType: 0 +dashedName: step-14 +--- + +# --description-- + +Dai a `.keys` un `padding-left` di `2px`. + +# --hints-- + +Il selettore `.keys` dovrebbe avere una proprietà `padding-left` impostata a `2px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')?.paddingLeft === '2px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; +} + +--fcc-editable-region-- +.keys { + background-color: #040404; + width: 949px; + height: 180px; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9a21381a1949327512e6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9a21381a1949327512e6.md new file mode 100644 index 00000000000..e07f442716b --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9a21381a1949327512e6.md @@ -0,0 +1,89 @@ +--- +id: 612e9a21381a1949327512e6 +title: Step 15 +challengeType: 0 +dashedName: step-15 +--- + +# --description-- + +Sposta i tasti in posizione regolando il selettore `#piano`. Imposta la proprietà `padding` su `90px 20px 0 20px`. + +# --hints-- + +Il selettore `#piano` dovrebbe avere la proprietà `padding` impostata a `90px 20px 0 20px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.padding === '90px 20px 0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +--fcc-editable-region-- +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; +} +--fcc-editable-region-- + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9d142affc44a453655db.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9d142affc44a453655db.md new file mode 100644 index 00000000000..d4744c2e84e --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9d142affc44a453655db.md @@ -0,0 +1,117 @@ +--- +id: 612e9d142affc44a453655db +title: Step 16 +challengeType: 0 +dashedName: step-16 +--- + +# --description-- + +È tempo di impostare lo stile dei tasti stessi. Crea un selettore per l'attributo `class` con il valore `.key`. Imposta `background-color` su `#ffffff`, `position` su `relative`, `width` a `41px` e `height` a `175px`. + +# --hints-- + +Dovresti avere un selettore `.key`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')); +``` + +Il selettore `.key` dovrebbe avere una proprietà `background-color` impostata su `#ffffff`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.backgroundColor === 'rgb(255, 255, 255)'); +``` + +Il selettore `.key` dovrebbe avere la proprietà `position` impostata su `relative`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.position === 'relative'); +``` + +Il selettore `.key` dovrebbe avere una proprietà `width` impostata a `41px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.width === '41px'); +``` + +Il selettore `.key` dovrebbe avere una proprietà `height` impostata a `175px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.height === '175px'); +``` + + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9f1e7e5ccd4fa9ada0be.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9f1e7e5ccd4fa9ada0be.md new file mode 100644 index 00000000000..9925a230310 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e9f1e7e5ccd4fa9ada0be.md @@ -0,0 +1,103 @@ +--- +id: 612e9f1e7e5ccd4fa9ada0be +title: Step 17 +challengeType: 0 +dashedName: step-17 +--- + +# --description-- + +Assegna a `.key` un `margin` di `2px` e una proprietà `float` con il valore `left`. + +# --hints-- + +Il selettore `.key` dovrebbe avere una proprietà `margin` impostata a `2px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.margin === '2px'); +``` + +Il selettore `.key` dovrebbe avere una proprietà `float` con il valore `left`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.float === 'left'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +--fcc-editable-region-- +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ea97df5742154772f312e.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ea97df5742154772f312e.md new file mode 100644 index 00000000000..624363d7c30 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ea97df5742154772f312e.md @@ -0,0 +1,110 @@ +--- +id: 612ea97df5742154772f312e +title: Step 19 +challengeType: 0 +dashedName: step-19 +--- + +# --description-- + +Nel selettore `.key.black--key::after` imposta la proprietà `position` su `absolute` e la proprietà `left` a `-18px`. + +# --hints-- + +Il selettore `.key.black--key::after` dovrebbe avere una proprietà `position` impostata su `absolute`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key.black--key::after')?.position === 'absolute'); +``` + +Il selettore `.key.black--key::after` dovrebbe avere una proprietà `left` impostata a `-18px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key.black--key::after')?.left === '-18px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +--fcc-editable-region-- +.key.black--key::after { + background-color: #1d1e22; + content: ""; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ead8788d28655ef8db056.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ead8788d28655ef8db056.md new file mode 100644 index 00000000000..9a5e1e91121 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ead8788d28655ef8db056.md @@ -0,0 +1,112 @@ +--- +id: 612ead8788d28655ef8db056 +title: Step 20 +challengeType: 0 +dashedName: step-20 +--- + +# --description-- + +Per il selettore `.key.black--key::after`, imposta `width` a `32px` e `height` a `100px`. + +# --hints-- + +Il selettore `.key.black--key::after` dovrebbe avere una proprietà `width` impostata a `32px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key.black--key::after')?.width === '32px'); +``` + +Il selettore `.key.black--key::after` dovrebbe avere una proprietà `height` impostata a `100px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key.black--key::after')?.height === '100px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +--fcc-editable-region-- +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eaf56b7ba3257fdbfb0db.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eaf56b7ba3257fdbfb0db.md new file mode 100644 index 00000000000..6de434f0748 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eaf56b7ba3257fdbfb0db.md @@ -0,0 +1,144 @@ +--- +id: 612eaf56b7ba3257fdbfb0db +title: Step 21 +challengeType: 0 +dashedName: step-21 +--- + +# --description-- + +Per rendere il piano ufficiale, aggiungiamo il logo di freeCodeCamp. + +Aggiungi un elemento `img` prima dell'elemento `.keys`. Assegna all'elemento `img` un valore `class` di `logo` e imposta l'`src` su `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`. Dagli un testo `alt` di `freeCodeCamp Logo`. + +# --hints-- + +Dovresti aggiungere un nuovo elemento `img`. + +```js +assert(document.querySelectorAll('img')?.length === 1); +``` + +L'elemento `img` dovrebbe trovarsi prima del primo elemento `.key`. + +```js +const img = document.querySelector('img'); +assert(img?.nextElementSibling?.className === 'keys'); +assert(img?.previousElementSibling === null); +``` + +L'elemento `img` dovrebbe avere un attributo `class` con il valore logo. + +```js +const img = document.querySelector('img'); +assert(img?.className === 'logo'); +``` + +L'elemento `img` dovrebbe avere un `src` impostato su `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`. + +```js +const img = document.querySelector('img'); +assert(img?.getAttribute('src') === 'https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg'); +``` + +L'elemento `img` dovrebbe avere un attributo `alt` impostato su `freeCodeCamp Logo`. + +```js +assert(document.querySelector('img')?.getAttribute('alt')?.toLowerCase() === 'freecodecamp logo'); +``` + +Fai attenzione alle maiuscole/minuscole e all'ortografia. + +```js +assert(document.querySelector('img')?.getAttribute('alt') === 'freeCodeCamp Logo'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + + --fcc-editable-region-- +
+
+ --fcc-editable-region-- +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb4893b63c75bb9251ddf.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb4893b63c75bb9251ddf.md new file mode 100644 index 00000000000..0db2b921a17 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb4893b63c75bb9251ddf.md @@ -0,0 +1,129 @@ +--- +id: 612eb4893b63c75bb9251ddf +title: Step 22 +challengeType: 0 +dashedName: step-22 +--- + +# --description-- + +Imposta lo stile del logo creando un selettore `.logo`. Imposta `width` a `200px`, `position` su `absolute` e `top` a `23px`. + +# --hints-- + +Dovresti avere un selettore `.logo`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.logo')); +``` + +Il selettore `.logo` dovrebbe avere una proprietà `width` impostata su `200px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.logo')?.width === '200px'); +``` + +Il selettore `.logo` dovrebbe avere una `position` proprietà impostata su `absolute`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.logo')?.position === 'absolute'); +``` + +Il selettore `.logo` dovrebbe avere una proprietà `top` impostata su `23px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.logo')?.top === '23px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb75153591b5e3b1ab65e.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb75153591b5e3b1ab65e.md new file mode 100644 index 00000000000..7e9408874ad --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb75153591b5e3b1ab65e.md @@ -0,0 +1,115 @@ +--- +id: 612eb75153591b5e3b1ab65e +title: Step 23 +challengeType: 0 +dashedName: step-23 +--- + +# --description-- + +L'elemento `img` ha bisogno che il genitore abbia una proprietà `position` impostata come punto di riferimento. Imposta la proprietà `position` del selettore `#piano` su `relative`. + +# --hints-- + +Il selettore `#piano` dovrebbe avere una proprietà `position` con il valore `relative`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.position === 'relative'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +--fcc-editable-region-- +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; +} +--fcc-editable-region-- + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb7ca8c275d5f89c73333.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb7ca8c275d5f89c73333.md new file mode 100644 index 00000000000..24480c87d4d --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb7ca8c275d5f89c73333.md @@ -0,0 +1,116 @@ +--- +id: 612eb7ca8c275d5f89c73333 +title: Step 24 +challengeType: 0 +dashedName: step-24 +--- + +# --description-- + +Per arrotondare i bordi del pianoforte e dei tasti, assegna al selettore `#piano` un `border-radius` di `10px`. + +# --hints-- + +Il selettore `#piano` dovrebbe avere una proprietà `border-radius` impostata a `10px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('#piano')?.borderRadius === '10px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +--fcc-editable-region-- +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; +} +--fcc-editable-region-- + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb8e984cd73677a92b7e9.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb8e984cd73677a92b7e9.md new file mode 100644 index 00000000000..a78a6e403e7 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb8e984cd73677a92b7e9.md @@ -0,0 +1,117 @@ +--- +id: 612eb8e984cd73677a92b7e9 +title: Step 25 +challengeType: 0 +dashedName: step-25 +--- + +# --description-- + +Assegna al selettore `.key` un valore `border-radius` di `0 0 3px 3px`. + +# --hints-- + +Il selettore `.key` dovrebbe avere una proprietà `border-radius` con il valore `0 0 3px 3px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key')?.borderRadius === '0px 0px 3px 3px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +--fcc-editable-region-- +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; +} +--fcc-editable-region-- + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb934f64a4d6890a45518.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb934f64a4d6890a45518.md new file mode 100644 index 00000000000..1105c412241 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612eb934f64a4d6890a45518.md @@ -0,0 +1,118 @@ +--- +id: 612eb934f64a4d6890a45518 +title: Step 26 +challengeType: 0 +dashedName: step-26 +--- + +# --description-- + +Per dare lo stesso stile a tutti i tasti, assegna al selettore `.key.black--key::after` un `border-radius` di `0 0 3px 3px`. + +# --hints-- + +Il selettore `.key.black--key::after` dovrebbe avere una proprietà `border-radius` impostata a `0 0 3px 3px`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.key.black--key::after')?.borderRadius === '0px 0px 3px 3px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +--fcc-editable-region-- +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; +} +--fcc-editable-region-- + +.logo { + width: 200px; + position: absolute; + top: 23px; +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebcba99bfa46a15370b11.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebcba99bfa46a15370b11.md new file mode 100644 index 00000000000..85a3ab04327 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebcba99bfa46a15370b11.md @@ -0,0 +1,127 @@ +--- +id: 612ebcba99bfa46a15370b11 +title: Step 27 +challengeType: 0 +dashedName: step-27 +--- + +# --description-- + +Ora devi fare in modo che sia responsivo. Aggiungi una `@media` query con una proprietà `max-width` di `768px`. + +# --hints-- + +Dovresti aggiungere una nuova `@media` query. + +```js +assert(new __helpers.CSSHelp(document).getCSSRules('media')?.length === 1); +``` + +La `@media` query dovrebbe avere una proprietà `max-width` di `768px`. + +```js +assert(new __helpers.CSSHelp(document).getCSSRules('media')[0]?.media?.mediaText === '(max-width: 768px)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebe7fe6d07e6b76d1cae2.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebe7fe6d07e6b76d1cae2.md new file mode 100644 index 00000000000..cba22f110cd --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebe7fe6d07e6b76d1cae2.md @@ -0,0 +1,133 @@ +--- +id: 612ebe7fe6d07e6b76d1cae2 +title: Step 28 +challengeType: 0 +dashedName: step-28 +--- + +# --description-- + +Aggiungi un nuovo selettore `#piano` dentro la `@media` query e imposta `width` a `358px`. + +# --hints-- + +La regola `@media` dovrebbe avere un selettore `#piano`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); +const piano = rules?.find(rule => rule.selectorText === '#piano'); +assert(piano); +``` + +Il nuovo selettore `#piano` dovrebbe avere una proprietà `width` di `358px`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); +const piano = rules?.find(rule => rule.selectorText === '#piano'); +assert(piano?.style.width === '358px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +--fcc-editable-region-- +@media (max-width: 768px) { + +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebedec97e096c8bf64999.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebedec97e096c8bf64999.md new file mode 100644 index 00000000000..dc24ad5b27a --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebedec97e096c8bf64999.md @@ -0,0 +1,136 @@ +--- +id: 612ebedec97e096c8bf64999 +title: Step 29 +challengeType: 0 +dashedName: step-29 +--- + +# --description-- + +All'interno della `@media` query, aggiungi un selettore `.keys` e imposta `width` su `318px`. + +# --hints-- + + +La regola `@media` dovrebbe avere un selettore `.keys`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); +const keys = rules?.find(rule => rule.selectorText === '.keys'); +assert(keys); +``` + +Il nuovo selettore `.keys` dovrebbe avere una proprietà `width` di `318px`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); +const keys = rules?.find(rule => rule.selectorText === '.keys'); +assert(keys?.style.width === '318px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +--fcc-editable-region-- +@media (max-width: 768px) { + #piano { + width: 358px; + } +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebf9a210f2b6d77001e68.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebf9a210f2b6d77001e68.md index 66e3fb1dc82..01b9740fcae 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebf9a210f2b6d77001e68.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ebf9a210f2b6d77001e68.md @@ -11,7 +11,7 @@ Ora aggiungi un selettore `.logo` alla `@media` query e imposta la proprietà `w # --hints-- -La `@media` query dovrebbe avere un selettore `.logo`. +La regola `@media` dovrebbe avere un selettore `.logo`. ```js const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); @@ -19,7 +19,7 @@ const logo = rules?.find(rule => rule.selectorText === '.logo'); assert(logo); ``` -Il tuo nuovo selettore `.logo` dovrebbe avere una `width` di `150px`. +Il nuovo selettore `.logo` dovrebbe avere una proprietà `width` di `150px`. ```js const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 768px)'); diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec0490ae8626e9adf82e4.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec0490ae8626e9adf82e4.md new file mode 100644 index 00000000000..6cc35d2b36c --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec0490ae8626e9adf82e4.md @@ -0,0 +1,133 @@ +--- +id: 612ec0490ae8626e9adf82e4 +title: Step 31 +challengeType: 0 +dashedName: step-31 +--- + +# --description-- + +Potresti aver notato che i tasti collassano quando la finestra del browser è più piccola di `768px`. Imposta `overflow` su `hidden` nel primo selettore `.keys`, per evitare questo problema. Questa proprietà nasconderà qualsiasi elemento che si trova al di fuori del valore `width` impostato per `.keys`. + +# --hints-- + +Il selettore `.keys` esistente dovrebbe avere la proprietà `overflow` impostata su `hidden`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.keys')?.overflow === 'hidden'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +--fcc-editable-region-- +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; +} +--fcc-editable-region-- + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +@media (max-width: 768px) { + #piano { + width: 358px; + } + + .keys { + width: 318px; + } + + .logo { + width: 150px; + } +} +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec19d5268da7074941f84.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec19d5268da7074941f84.md new file mode 100644 index 00000000000..ab0e62d60d3 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec19d5268da7074941f84.md @@ -0,0 +1,144 @@ +--- +id: 612ec19d5268da7074941f84 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Aggiungi un'altra regola `@media` da applicare se la finestra del browser è più grande di `769px` ma più piccola di `1199px`. + +# --hints-- + +Dovresti aggiungere una nuova `@media` query. + +```js +assert(new __helpers.CSSHelp(document).getCSSRules('media')?.length === 2); +``` + +La `@media` query dovrebbe avere una `min-width` di `769px` e una `max-width` di `1199px`. + +```js +const mediaText = new __helpers.CSSHelp(document).getCSSRules('media')[1]?.media?.mediaText; +assert(mediaText === '(max-width: 1199px) and (min-width: 769px)' || mediaText === '(min-width: 769px) and (max-width: 1199px)'); +``` + + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; + overflow: hidden; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +@media (max-width: 768px) { + #piano { + width: 358px; + } + + .keys { + width: 318px; + } + + .logo { + width: 150px; + } +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec29c84b9a6718b1f5cec.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec29c84b9a6718b1f5cec.md new file mode 100644 index 00000000000..48a2e9b236c --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612ec29c84b9a6718b1f5cec.md @@ -0,0 +1,288 @@ +--- +id: 612ec29c84b9a6718b1f5cec +title: Step 33 +challengeType: 0 +dashedName: step-33 +--- + +# --description-- + +Per la nuova regola `@media`, imposta la `width` di `#piano` a `675px` e la `width` di `.keys` a `633px`. + +Con questo, il tuo pianoforte è completo! + +# --hints-- + +La seconda regola `@media` dovrebbe avere un selettore `#piano`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 1199px) and (min-width: 769px)'); +const piano = rules?.find(rule => rule.selectorText === '#piano'); +assert(piano); +``` + +Il nuovo selettore `#piano` dovrebbe avere una proprietà `width` di `675px`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 1199px) and (min-width: 769px)'); +const piano = rules?.find(rule => rule.selectorText === '#piano'); +assert(piano?.style.width === '675px'); +``` + +La seconda regola `@media` dovrebbe avere un selettore `.keys`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 1199px) and (min-width: 769px)'); +const keys = rules?.find(rule => rule.selectorText === '.keys'); +assert(keys); +``` + +Il nuovo selettore `.keys` dovrebbe avere una proprietà `width` di `633px`. + +```js +const rules = new __helpers.CSSHelp(document).getRuleListsWithinMedia('(max-width: 1199px) and (min-width: 769px)'); +const keys = rules?.find(rule => rule.selectorText === '.keys'); +assert(keys?.style.width === '633px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; + overflow: hidden; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +@media (max-width: 768px) { + #piano { + width: 358px; + } + + .keys { + width: 318px; + } + + .logo { + width: 150px; + } +} + +--fcc-editable-region-- +@media (max-width: 1199px) and (min-width: 769px) { + +} +--fcc-editable-region-- +``` + +# --solutions-- + +```html + + + + + Piano + + + + +
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +``` + +```css +html { + box-sizing: border-box; +} + +*, *::before, *::after { + box-sizing: inherit; +} + +#piano { + background-color: #00471b; + width: 992px; + height: 290px; + margin: 80px auto; + padding: 90px 20px 0 20px; + position: relative; + border-radius: 10px; +} + +.keys { + background-color: #040404; + width: 949px; + height: 180px; + padding-left: 2px; + overflow: hidden; +} + +.key { + background-color: #ffffff; + position: relative; + width: 41px; + height: 175px; + margin: 2px; + float: left; + border-radius: 0 0 3px 3px; +} + +.key.black--key::after { + background-color: #1d1e22; + content: ""; + position: absolute; + left: -18px; + width: 32px; + height: 100px; + border-radius: 0 0 3px 3px; +} + +.logo { + width: 200px; + position: absolute; + top: 23px; +} + +@media (max-width: 768px) { + #piano { + width: 358px; + } + + .keys { + width: 318px; + } + + .logo { + width: 150px; + } +} + +@media (max-width: 1199px) and (min-width: 769px) { + #piano { + width: 675px; + } + + .keys { + width: 633px; + } +} +``` diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index 703dea7bd62..301e59bdc45 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ assert(myVar === 88); ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index 16b4f4f56ff..936e21280b0 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ Você não deve usar o operador de atribuição. ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md index 9468058c022..606c792bf5c 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764c602bee6974e7790f35.md @@ -13,6 +13,12 @@ Hoje em dia, existem dois modelos de cores: o modelo aditivo RGB (ver Primeiro, adicione a `class` `one` ao primeiro elemento do marcador `div`. +```html +
+ ...content +
+``` + # --hints-- Adicione a class `one` ao primeiro elemento do marcador `div`. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index caf1fad30c2..42a481343e5 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -39,7 +39,7 @@ assert(myVar === 88); ```js assert( - /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code) + /let\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2})/.test(code) ); ```