Skip to content

Commit

Permalink
Aula 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGabreuw committed Mar 31, 2021
1 parent ec5885b commit 5b6507c
Show file tree
Hide file tree
Showing 29 changed files with 1,379 additions and 1,104 deletions.
104 changes: 52 additions & 52 deletions aula-1/anotacoes.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
# Aula 1 - Conversor de Moedas e Variáveis

### Tags HTML

* h1 = Título

* p = Parágrafo

### Propriedades CSS

* color = colocar uma cor
* text-align: center = centralizar o texto

### JS

* Funções
* _alert_ = popup de alerta
* _prompt_ = popup com um campo de texto
* _parseInt_ = transforma um _String_ para _Int_

* Variáveis

* Sintaxe
```js
var nome_da_variavel = valor
```

* Exemplo
```js
var nome = "Rafaella"
```

### Exemplos

* Exemplo 1
```js
var idadeUsuario = prompt("Quantos anos você tem?") // INPUT = 29
idadeUsuario = idadeUsuario + 1
alert(idadeUsuario) // OUTPUT = 291
```

* Exemplo 2
```js
var idadeUsuarioComoTexto = prompt("Quantos anos você tem?") // INPUT = 29
var idadeUsuarioComoNumero = parseInt(idadeUsuarioComoTexto)
idadeUsuarioComoNumero = idadeUsuarioComoNumero + 1
alert(idadeUsuarioComoNumero) // OUTPUT = 30
# Aula 1 - Conversor de Moedas e Variáveis

### Tags HTML

* h1 = Título

* p = Parágrafo

### Propriedades CSS

* color = colocar uma cor
* text-align: center = centralizar o texto

### JS

* Funções
* _alert_ = popup de alerta
* _prompt_ = popup com um campo de texto
* _parseInt_ = transforma um _String_ para _Int_

* Variáveis

* Sintaxe
```js
var nome_da_variavel = valor
```

* Exemplo
```js
var nome = "Rafaella"
```

### Exemplos

* Exemplo 1
```js
var idadeUsuario = prompt("Quantos anos você tem?") // INPUT = 29
idadeUsuario = idadeUsuario + 1
alert(idadeUsuario) // OUTPUT = 291
```

* Exemplo 2
```js
var idadeUsuarioComoTexto = prompt("Quantos anos você tem?") // INPUT = 29
var idadeUsuarioComoNumero = parseInt(idadeUsuarioComoTexto)
idadeUsuarioComoNumero = idadeUsuarioComoNumero + 1
alert(idadeUsuarioComoNumero) // OUTPUT = 30
```
60 changes: 30 additions & 30 deletions aula-1/index.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html lang="pt-BR">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="styles.css">

<title>Imersão Dev - Aula 01</title>
</head>

<body>
<div class="container">
<h1 class="page-title">
Conversor de moedas
</h1>
<p class="page-subtitle">
Descubra os valores em dolar U$
</p>
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-conversor-de-moedas.svg" class="page-logo" alt="">
</div>
<a href="https://alura.com.br/" target="_blank">
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo">
</a>

<script src="./scripts.js"></script>
</body>

<!DOCTYPE html>
<html lang="pt-BR">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="styles.css">

<title>Imersão Dev - Aula 01</title>
</head>

<body>
<div class="container">
<h1 class="page-title">
Conversor de moedas
</h1>
<p class="page-subtitle">
Descubra os valores em dolar U$
</p>
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-conversor-de-moedas.svg" class="page-logo" alt="">
</div>
<a href="https://alura.com.br/" target="_blank">
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo">
</a>

<script src="./scripts.js"></script>
</body>

</html>
14 changes: 7 additions & 7 deletions aula-1/scripts.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var valorEmDolar = prompt("Qual o valor em dolar que você quer converter?")

var valorEmDolarNumero = parseFloat(valorEmDolar)

var valorEmReal = valorEmDolarNumero * 5.5
var valorEmRealFixado = valorEmReal.toFixed(2)

var valorEmDolar = prompt("Qual o valor em dolar que você quer converter?")

var valorEmDolarNumero = parseFloat(valorEmDolar)

var valorEmReal = valorEmDolarNumero * 5.5
var valorEmRealFixado = valorEmReal.toFixed(2)

alert(valorEmRealFixado)
70 changes: 35 additions & 35 deletions aula-1/styles.css
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
body {
font-family: 'Roboto Mono',monospace;
min-height: 400px;
background-image: url('https://www.alura.com.br/assets/img/imersoes/dev-2021/dia-1-conversor-de-moedas.png');
background-color: black;
background-size: 100vh;
background-position: center bottom;
background-repeat: no-repeat;
}

.container {
text-align: center;
padding: 20px;
height: 100vh;
}

.page-title {
color: #ffffff;
margin: 0 0 5px;
}

.page-subtitle {
color: #ffffff;
margin-top: 5px;
}

.page-logo {
width: 200px;
}

.alura-logo {
width: 40px;
position: absolute;
top: 10px;
right:10px;
body {
font-family: 'Roboto Mono',monospace;
min-height: 400px;
background-image: url('https://www.alura.com.br/assets/img/imersoes/dev-2021/dia-1-conversor-de-moedas.png');
background-color: black;
background-size: 100vh;
background-position: center bottom;
background-repeat: no-repeat;
}

.container {
text-align: center;
padding: 20px;
height: 100vh;
}

.page-title {
color: #ffffff;
margin: 0 0 5px;
}

.page-subtitle {
color: #ffffff;
margin-top: 5px;
}

.page-logo {
width: 200px;
}

.alura-logo {
width: 40px;
position: absolute;
top: 10px;
right:10px;
}
50 changes: 25 additions & 25 deletions aula-2/anotacoes.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Calculadora e Condicionais

### Condicionais

* _if_ = se
* _else_ = senão
* _else-if_ = senão se

### Exemplos

* Exemplo 1 - Escrever algo no documento
```js
document.write("God of War")
```

* Exemplo 2 - Escrever o conteúdo da variável no documento
```js
var nomeDoJogo = "League of Legends"
document.write(nomeDoJogo)
```

* Exemplo 3 - Escrever um texto + conteúdo da variável no documento (CONCATENAÇÃO DE STRINGS)
```js
var nomeDoJogo = "League of Legends"
document.write("Jogo da Rafa: " + nomeDoJogo)
# Calculadora e Condicionais

### Condicionais

* _if_ = se
* _else_ = senão
* _else-if_ = senão se

### Exemplos

* Exemplo 1 - Escrever algo no documento
```js
document.write("God of War")
```

* Exemplo 2 - Escrever o conteúdo da variável no documento
```js
var nomeDoJogo = "League of Legends"
document.write(nomeDoJogo)
```

* Exemplo 3 - Escrever um texto + conteúdo da variável no documento (CONCATENAÇÃO DE STRINGS)
```js
var nomeDoJogo = "League of Legends"
document.write("Jogo da Rafa: " + nomeDoJogo)
```
58 changes: 29 additions & 29 deletions aula-2/index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="style.css">

<title>Imersão Dev - Aula 02</title>
</head>

<body>
<div class="container">
<h1 class="page-title">
Calculadora
</h1>
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-calculadora.svg" class="page-logo" alt="">
<div class="calculadora"></div>
</div>

<a href="https://alura.com.br/" target="_blank">
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo">
</a>

<script src="scripts.js"></script>
</body>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="style.css">

<title>Imersão Dev - Aula 02</title>
</head>

<body>
<div class="container">
<h1 class="page-title">
Calculadora
</h1>
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-calculadora.svg" class="page-logo" alt="">
<div class="calculadora"></div>
</div>

<a href="https://alura.com.br/" target="_blank">
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo">
</a>

<script src="scripts.js"></script>
</body>

</html>
Loading

0 comments on commit 5b6507c

Please sign in to comment.