* chore: rename APIs and Microservices to include "Backend" (#42515) * fix typo * fix typo * undo change * Corrected grammar mistake Corrected a grammar mistake by removing a comma. * change APIs and Microservices cert title * update title * Change APIs and Microservices certi title * Update translations.json * update title * feat(curriculum): rename apis and microservices cert * rename folder structure * rename certificate * rename learn Markdown * apis-and-microservices -> back-end-development-and-apis * update backend meta * update i18n langs and cypress test Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> * fix: add development to front-end libraries (#42512) * fix: added-the-word-Development-to-front-end-libraries * fix/added-the-word-Development-to-front-end-libraries * fix/added-word-development-to-front-end-libraries-in-other-related-files * fix/added-the-word-Development-to-front-end-and-all-related-files * fix/removed-typos-from-last-commit-in-index.md * fix/reverted-changes-that-i-made-to-dependecies * fix/removed xvfg * fix/reverted changes that i made to package.json * remove unwanted changes * front-end-development-libraries changes * rename backend certSlug and README * update i18n folder names and keys * test: add legacy path redirect tests This uses serve.json from the client-config repo, since we currently use that in production * fix: create public dir before moving serve.json * fix: add missing script * refactor: collect redirect tests * test: convert to cy.location for stricter tests * rename certificate folder to 00-certificates * change crowdin config to recognise new certificates location * allow translations to be used Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> * add forwards slashes to path redirects * fix cypress path tests again * plese cypress * fix: test different challenge Okay so I literally have no idea why this one particular challenge fails in Cypress Firefox ONLY. Tom and I paired and spun a full build instance and confirmed in Firefox the page loads and redirects as expected. Changing to another bootstrap challenge passes Cypress firefox locally. Absolutely boggled by this. AAAAAAAAAAAAAAA * fix: separate the test Okay apparently the test does not work unless we separate it into a different `it` statement. >:( >:( >:( >:( Co-authored-by: Sujal Gupta <55016909+heysujal@users.noreply.github.com> Co-authored-by: Noor Fakhry <65724923+NoorFakhry@users.noreply.github.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
203 lines
6.0 KiB
Markdown
203 lines
6.0 KiB
Markdown
---
|
|
id: bad87fee1348bd9aed908845
|
|
title: Stilizzare gli input di testo come controlli del modulo
|
|
challengeType: 0
|
|
forumTopicId: 18312
|
|
required:
|
|
-
|
|
link: >-
|
|
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css
|
|
raw: true
|
|
dashedName: style-text-inputs-as-form-controls
|
|
---
|
|
|
|
# --description--
|
|
|
|
Puoi inserire l'icona `fa-paper-plane` di Font Awesome aggiungendo `<i class="fa fa-paper-plane"></i>` all'interno del tuo `button` di invio.
|
|
|
|
Dai al campo di input testo del tuo modulo una classe `form-control`. Dai al pulsante di invio del tuo modulo le classi `btn btn-primary`. Dai a questo bottone anche l'icona `fa-paper-plane` di Font Awesome.
|
|
|
|
Tutti gli elementi testuali `<input>`, `<textarea>`, e `<select>` di classe `.form-control` hanno una larghezza del 100%.
|
|
|
|
# --hints--
|
|
|
|
Il bottone di invio nel tuo modulo dovrebbe avere le classi `btn btn-primary`.
|
|
|
|
```js
|
|
assert($('button[type="submit"]').hasClass('btn btn-primary'));
|
|
```
|
|
|
|
Dovresti aggiungere un elemento `<i class="fa fa-paper-plane"></i>` all'interno del tuo `button` di invio.
|
|
|
|
```js
|
|
assert($('button[type="submit"]:has(i.fa.fa-paper-plane)').length > 0);
|
|
```
|
|
|
|
L'`input` di testo nel tuo modulo dovrebbe avere la classe `form-control`.
|
|
|
|
```js
|
|
assert($('input[type="text"]').hasClass('form-control'));
|
|
```
|
|
|
|
Ognuno dei tuoi elementi `i` dovrebbe avere un tag di chiusura.
|
|
|
|
```js
|
|
assert(code.match(/<\/i>/g) && code.match(/<\/i/g).length > 3);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
|
|
<style>
|
|
h2 {
|
|
font-family: Lobster, Monospace;
|
|
}
|
|
|
|
.thick-green-border {
|
|
border-color: green;
|
|
border-width: 10px;
|
|
border-style: solid;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<h2 class="text-primary text-center">CatPhotoApp</h2>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
|
</div>
|
|
</div>
|
|
<img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera.">
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
|
|
</div>
|
|
</div>
|
|
<p>Things cats <span class="text-danger">love:</span></p>
|
|
<ul>
|
|
<li>cat nip</li>
|
|
<li>laser pointers</li>
|
|
<li>lasagna</li>
|
|
</ul>
|
|
<p>Top 3 things cats hate:</p>
|
|
<ol>
|
|
<li>flea treatment</li>
|
|
<li>thunder</li>
|
|
<li>other cats</li>
|
|
</ol>
|
|
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Loving</label>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Lazy</label>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Crazy</label>
|
|
</div>
|
|
</div>
|
|
<input type="text" placeholder="cat photo URL" required>
|
|
<button type="submit">Submit</button>
|
|
</form>
|
|
</div>
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```html
|
|
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
|
|
<style>
|
|
h2 {
|
|
font-family: Lobster, Monospace;
|
|
}
|
|
|
|
.thick-green-border {
|
|
border-color: green;
|
|
border-width: 10px;
|
|
border-style: solid;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<h2 class="text-primary text-center">CatPhotoApp</h2>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
|
</div>
|
|
</div>
|
|
<img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera.">
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
|
|
</div>
|
|
</div>
|
|
<p>Things cats <span class="text-danger">love:</span></p>
|
|
<ul>
|
|
<li>cat nip</li>
|
|
<li>laser pointers</li>
|
|
<li>lasagna</li>
|
|
</ul>
|
|
<p>Top 3 things cats hate:</p>
|
|
<ol>
|
|
<li>flea treatment</li>
|
|
<li>thunder</li>
|
|
<li>other cats</li>
|
|
</ol>
|
|
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Loving</label>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Lazy</label>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<label><input type="checkbox" name="personality"> Crazy</label>
|
|
</div>
|
|
</div>
|
|
<input type="text" class="form-control" placeholder="cat photo URL" required>
|
|
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
|
|
</form>
|
|
</div>
|
|
```
|