chore(i18n,curriculum): processed translations (#43760)
This commit is contained in:
@ -13,7 +13,7 @@ Lo sapevi che ci sono altri modi per rappresentare i colori in CSS? Uno di quest
|
||||
|
||||
Di solito usiamo <dfn>i numeri decimali</dfn> (o numeri in base 10), che usano i simboli da 0 a 9 per ogni cifra. <dfn>Gli esadecimali</dfn> (o <dfn>hex</dfn>) sono numeri in base 16. Ciò significa che utilizzano sedici simboli distinti. Come per i i decimali, i simboli 0-9 rappresentano i valori da zero a nove. I successivi simboli A,B,C,D,E,F rappresentano i valori da dieci a quindici. Complessivamente, una cifra esadecimale può andare da 0 a F, dandoci 16 valori totali possibili. Qui puoi trovare ulteriori informazioni sul [sistema numerico esadecimale](https://it.wikipedia.org/wiki/Sistema_numerico_esadecimale).
|
||||
|
||||
In CSS, possiamo usare 6 cifre esadecimali per rappresentare i colori, due ciascuna per le componenti rossa (R), verde (G) e blu (B). Ad esempio, `#000000` è nero ed è anche il valore più basso possibile. Qui puoi trovare maggiori informazioni sul [sistema di colori RGB](https://it.wikipedia.org/wiki/RGB).
|
||||
In CSS, possiamo usare 6 cifre esadecimali per rappresentare i colori, due ciascuna per le componenti rossa (R), verde (G) e blu (B). Ad esempio, `#000000` è nero ed è anche il valore più basso possibile. You can find more information about the [RGB color system here](https://www.freecodecamp.org/news/rgb-color-html-and-css-guide/#whatisthergbcolormodel).
|
||||
|
||||
```css
|
||||
body {
|
||||
|
@ -2,7 +2,6 @@
|
||||
id: bad87fee1348bd9aedf08812
|
||||
title: Aggiungere immagini al tuo sito web
|
||||
challengeType: 0
|
||||
videoUrl: 'https://scrimba.com/p/pVMPUv/c8EbJf2'
|
||||
forumTopicId: 16640
|
||||
dashedName: add-images-to-your-website
|
||||
---
|
||||
@ -37,7 +36,7 @@ Cerchiamo di aggiungere un'immagine al nostro sito web:
|
||||
|
||||
All'interno dell'elemento `main` esistente, inserisci un elemento `img` prima degli elementi `p` esistenti.
|
||||
|
||||
Ora imposta l'attributo `src` in modo che punti all'url `https://www.bit.ly/fcc-relaxing-cat`
|
||||
Ora imposta l'attributo `src` in modo che punti all'url `https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
Infine, non dimenticare di dare al tuo elemento `img` un attributo `alt` con il relativo testo.
|
||||
|
||||
@ -52,7 +51,7 @@ assert($('img').length);
|
||||
La tua immagine dovrebbe avere un attributo `src` che punta all'immagine del gattino.
|
||||
|
||||
```js
|
||||
assert(/^https:\/\/(www\.)?bit\.ly\/fcc-relaxing-cat$/i.test($('img').attr('src')));
|
||||
assert(/^https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg$/i.test($('img').attr('src')));
|
||||
```
|
||||
|
||||
L'elemento `alt` della tua immagine non dovrebbe essere vuoto.
|
||||
@ -86,7 +85,7 @@ assert(
|
||||
```html
|
||||
<h2>CatPhotoApp</h2>
|
||||
<main>
|
||||
<a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
||||
<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
|
||||
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
|
||||
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
|
||||
</main>
|
||||
|
@ -26,7 +26,7 @@ var cat = {
|
||||
};
|
||||
```
|
||||
|
||||
In questo esempio, tutte le proprietà sono memorizzate come stringhe, come `name`, `legs` e `tails`. Per le proprietà puoi anche usare i numeri. Puoi anche omettere le virgolette per le proprietà di tipo stringa di una sola parola, come segue:
|
||||
In questo esempio, tutte le proprietà sono memorizzate come stringhe, come `name`, `legs`e `tails`. Per le proprietà puoi anche usare i numeri. Puoi anche omettere le virgolette per le proprietà di tipo stringa di una sola parola, come segue:
|
||||
|
||||
```js
|
||||
var anotherObject = {
|
||||
|
@ -10,7 +10,7 @@ dashedName: prevent-object-mutation
|
||||
|
||||
Come visto nella sfida precedente, la dichiarazione `const` da sola non protegge davvero i tuoi dati dalla mutazione. Per garantire che i tuoi dati non cambino, JavaScript fornisce una funzione `Object.freeze` per prevenire la mutazione dei dati.
|
||||
|
||||
Una volta che l'oggetto è congelato, non è più possibile aggiungere, aggiornare o eliminare proprietà da esso. Qualsiasi tentativo di cambiare l'oggetto verrà rifiutato senza errore.
|
||||
Qualsiasi tentativo di cambiare l'oggetto verrà rifiutato, con un errore generato se lo script viene eseguito in modalità rigorosa.
|
||||
|
||||
```js
|
||||
let obj = {
|
||||
@ -23,7 +23,7 @@ obj.newProp = "Test";
|
||||
console.log(obj);
|
||||
```
|
||||
|
||||
Le assegnazioni su `obj.review` e `obj.newProp` si tradurranno in errori, e la console mostrerà il valore `{ name: "FreeCodeCamp", review: "Awesome" }`.
|
||||
Gli assegnamenti `obj.review` e `obj.newProp` provocheranno errori, perché il nostro editor viene eseguito in modalità rigorosa per impostazione predefinita, e la console visualizzerà il valore `{ name: "FreeCodeCamp", review: "Awesome" }`.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
@ -38,7 +38,7 @@ Il metodo di ordinamento predefinito di JavaScript è in base ai valori Unicode
|
||||
|
||||
# --instructions--
|
||||
|
||||
Usa il metodo `sort` nella funzione `alphabeticalOrder` per ordinare gli elementi di `arr` in ordine alfabetico.
|
||||
Usa il metodo `sort` nella funzione `alphabeticalOrder` per ordinare gli elementi di `arr` in ordine alfabetico. La funzione dovrebbe restituire l'array ordinato.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -83,7 +83,7 @@ assert(
|
||||
function alphabeticalOrder(arr) {
|
||||
// Only change code below this line
|
||||
|
||||
|
||||
return arr
|
||||
// Only change code above this line
|
||||
}
|
||||
alphabeticalOrder(["a", "d", "c", "a", "z", "g"]);
|
||||
|
@ -42,10 +42,10 @@ assert.deepEqual(addTogether(23, 30), 53);
|
||||
assert.deepEqual(addTogether(5)(7), 12);
|
||||
```
|
||||
|
||||
`addTogether("http://bit.ly/IqT6zt")` dovrebbe restituire `undefined`.
|
||||
`addTogether("https://www.youtube.com/watch?v=dQw4w9WgXcQ")` dovrebbe restituire `undefined`.
|
||||
|
||||
```js
|
||||
assert.isUndefined(addTogether('http://bit.ly/IqT6zt'));
|
||||
assert.isUndefined(addTogether('https://www.youtube.com/watch?v=dQw4w9WgXcQ'));
|
||||
```
|
||||
|
||||
`addTogether(2, "3")` dovrebbe restituire `undefined`.
|
||||
|
@ -8,7 +8,7 @@ dashedName: make-images-mobile-responsive
|
||||
|
||||
# --description--
|
||||
|
||||
Innanzitutto, aggiungi una nuova immagine sotto quella esistente. Imposta l'attributo `src` su `https://bit.ly/fcc-running-cats`.
|
||||
Innanzitutto, aggiungi una nuova immagine sotto quella esistente. Imposta l'attributo `src` su `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
|
||||
Sarebbe bello se questa immagine potesse essere larga esattamente come lo schermo del nostro telefono.
|
||||
|
||||
@ -34,10 +34,10 @@ La tua nuova immagine non dovrebbe avere la classe `smaller-image`.
|
||||
assert(!$('img:eq(1)').hasClass('smaller-image'));
|
||||
```
|
||||
|
||||
La tua nuova immagine dovrebbe avere un `src` di `https://bit.ly/fcc-running-cats`.
|
||||
La tua nuova immagine dovrebbe avere un attributo `src` di `https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg`.
|
||||
|
||||
```js
|
||||
assert($('img:eq(1)').attr('src') === 'https://bit.ly/fcc-running-cats');
|
||||
assert($('img:eq(1)').attr('src') === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg');
|
||||
```
|
||||
|
||||
Il tuo nuovo elemento `img` dovrebbe avere una parentesi angolare di chiusura.
|
||||
@ -87,7 +87,7 @@ assert(
|
||||
|
||||
<p>Click here for <a href="#">cat photos</a>.</p>
|
||||
|
||||
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
||||
<a href="#"><img class="smaller-image thick-green-border" src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
|
||||
|
||||
<p>Things cats love:</p>
|
||||
<ul>
|
||||
@ -148,8 +148,8 @@ assert(
|
||||
|
||||
<p>Click here for <a href="#">cat photos</a>.</p>
|
||||
|
||||
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
||||
<img src="https://bit.ly/fcc-running-cats" class="img-responsive">
|
||||
<a href="#"><img class="smaller-image thick-green-border" src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg" class="img-responsive">
|
||||
|
||||
<p>Things cats love:</p>
|
||||
<ul>
|
||||
|
@ -35,40 +35,66 @@ Invia la tua pagina quando pensi di averlo fatto correttamente. Se dovessi incon
|
||||
|
||||
# --hints--
|
||||
|
||||
La rotta /auth/github dovrebbe essere corretta.
|
||||
La rotta `/auth/github` dovrebbe essere corretta.
|
||||
|
||||
```js
|
||||
(getUserInput) =>
|
||||
$.get(getUserInput('url') + '/_api/routes.js').then(
|
||||
(data) => {
|
||||
async (getUserInput) => {
|
||||
try {
|
||||
const res = await fetch(getUserInput('url') + '/_api/routes.js');
|
||||
if (res.ok) {
|
||||
const data = await res.text();
|
||||
assert.match(
|
||||
data.replace(/\s/g, ''),
|
||||
/('|")\/auth\/github\/?\1[^]*?get.*?passport.authenticate.*?github/gi,
|
||||
'Route auth/github should only call passport.authenticate with github'
|
||||
);
|
||||
},
|
||||
(xhr) => {
|
||||
throw new Error(xhr.statusText);
|
||||
data.replace(/\s/g, ''),
|
||||
/passport.authenticate.*?github/g,
|
||||
'Route auth/github should only call passport.authenticate with github'
|
||||
);
|
||||
} else {
|
||||
throw new Error(res.statusText);
|
||||
}
|
||||
);
|
||||
const res2 = await fetch(getUserInput('url') + '/_api/app-stack');
|
||||
if (res2.ok) {
|
||||
const data2 = JSON.parse(await res2.json());
|
||||
const dataLayer = data2.find(layer => layer?.route?.path === '/auth/github');
|
||||
assert.deepInclude(dataLayer?.route, { methods: {get: true}, path: "/auth/github"});
|
||||
assert.deepInclude(dataLayer?.route?.stack?.[0], {method: "get", name: "authenticate"});
|
||||
} else {
|
||||
throw new Error(res2.statusText);
|
||||
}
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
La rotta /auth/github/callback dovrebbe essere corretta.
|
||||
La rotta `/auth/github/callback` dovrebbe essere corretta.
|
||||
|
||||
```js
|
||||
(getUserInput) =>
|
||||
$.get(getUserInput('url') + '/_api/routes.js').then(
|
||||
(data) => {
|
||||
async (getUserInput) => {
|
||||
try {
|
||||
const res = await fetch(getUserInput('url') + '/_api/routes.js');
|
||||
if (res.ok) {
|
||||
const data = await res.text();
|
||||
assert.match(
|
||||
data.replace(/\s/g, ''),
|
||||
/('|")\/auth\/github\/callback\/?\1[^]*?get.*?passport.authenticate.*?github.*?failureRedirect:("|')\/\2/gi,
|
||||
/failureRedirect:("|')\/\1/g,
|
||||
'Route auth/github/callback should accept a get request and call passport.authenticate for github with a failure redirect to home'
|
||||
);
|
||||
},
|
||||
(xhr) => {
|
||||
throw new Error(xhr.statusText);
|
||||
} else {
|
||||
throw new Error(res.statusText);
|
||||
}
|
||||
);
|
||||
const res2 = await fetch(getUserInput('url') + '/_api/app-stack');
|
||||
if (res2.ok) {
|
||||
const data2 = JSON.parse(await res2.json());
|
||||
const dataLayer = data2.find(layer => layer?.route?.path === '/auth/github/callback');
|
||||
assert.deepInclude(dataLayer?.route, { methods: {get: true}, path: "/auth/github/callback"});
|
||||
assert.deepInclude(dataLayer?.route?.stack?.[0], {method: "get", name: "authenticate"});
|
||||
} else {
|
||||
throw new Error(res2.statusText);
|
||||
}
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -85,7 +85,7 @@ console.log = function (msg) {
|
||||
assert.throws(() => beagle.eat(), 'nom nom nom');
|
||||
```
|
||||
|
||||
`beagle.bark()` deve mostrar no console a string `nom nom nom`
|
||||
`beagle.bark()` deve mostrar no console a string `Woof!`
|
||||
|
||||
```js
|
||||
console.log = function (msg) {
|
||||
|
Reference in New Issue
Block a user