Skip to content

Styles and classes #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 1-js/01-getting-started/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Introduzione

Riguardo il linguaggio JavaScript e l'ambiente di sviluppo.
Studieremo il linguaggio JavaScript e l'ambiente di sviluppo.
2 changes: 1 addition & 1 deletion 1-js/02-first-steps/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Le basi JavaScript

Impariamo le basi della scrittura di uno script.
Impareremo le basi dello sviluppo di uno script.
2 changes: 1 addition & 1 deletion 1-js/03-code-quality/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Qualità del codice

Questo capitolo spiega le buone pratiche di programmazione da utilizzare durante lo sviluppo.
Impareremo le buone pratiche di programmazione da utilizzare durante lo sviluppo.
2 changes: 1 addition & 1 deletion 1-js/07-object-properties/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Configurazione delle proprietà dell'oggetto

In questa sezione torniamo a vedere gli oggetti e studiremo le loro proprietà più nel dettaglio.
Procederemo con lo studio degli oggetti e studieremo le loro proprietà più nel dettaglio.
3 changes: 2 additions & 1 deletion 1-js/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Il linguaggio JavaScript
Qui impareremo JavaScript, iniziando dalle basi e passando per i concetti avanzati come OOP.

Impareremo JavaScript, iniziando dalle basi e passando a concetti avanzati come OOP.

Ci concentreremo principalmente sul linguaggio, con un minimo di annotazioni riguardo gli ambienti di sviluppo.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2>Notification is on the right</h2>
setTimeout(() => notification.remove(), 1500);
}

// test it
// prova
let i = 1;
setInterval(() => {
showNotification({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ <h2>Notification is on the right</h2>

<script>
function showNotification({top = 0, right = 0, className, html}) {
/* your code */
/* il tuo codice */
}

// test it
// prova
let i = 1;
setInterval(() => {
showNotification({
Expand Down
20 changes: 10 additions & 10 deletions 2-ui/1-document/08-styles-and-classes/2-create-notification/task.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
importance: 5
importanza: 5

---

# Create a notification
# Create un messaggio di notifica

Write a function `showNotification(options)` that creates a notification: `<div class="notification">` with the given content. The notification should automatically disappear after 1.5 seconds.
Scrivete una funzione `showNotification(options)` che crei una notifica: `<div class="notification">` con un dato contenuto. La notifica dovrebbe automaticamente sparire dopo 1.5 secondi.

The options are:
Le opzioni sono:

```js
// shows an element with the text "Hello" near the right-top of the window
// mostra un elemento con il testo "Hello" in prossimità dell'angolo in alto a destra della finestra
showNotification({
top: 10, // 10px from the top of the window (by default 0px)
right: 10, // 10px from the right edge of the window (by default 0px)
html: "Hello!", // the HTML of notification
className: "welcome" // an additional class for the div (optional)
top: 10, // 10px dalla parte superiore della finestra (valore predefinito 0px)
right: 10, // 10px dal bordo destro della finestra (valore predefinito 0px)
html: "Hello!", // l'HTML della notifica
className: "welcome" // una classe addizionale per il div (opzionale)
});
```

[demo src="solution"]


Use CSS positioning to show the element at given top/right coordinates. The source document has the necessary styles.
Usate il posizionamento CSS per mostrare l'elemento nelle coordinate top/right ricevute. Il documento sorgente ha gli stili necessari.
Loading