Skip to content

Commit 1201927

Browse files
committed
curso-finalizado
1 parent f97c745 commit 1201927

17 files changed

Lines changed: 537 additions & 0 deletions

File tree

aula14ex/ex016/index.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Document</title>
7+
<link rel="stylesheet" href="style.css" />
8+
<link
9+
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"
10+
rel="stylesheet"
11+
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB"
12+
crossorigin="anonymous"
13+
/>
14+
</head>
15+
<body class="bg-primary">
16+
<h1 class="text-white">Vamos Contar</h1>
17+
<section id="calculo">
18+
<div class="mb-3">
19+
<label for="inicio" class="form-label pt-3">INÍCIO:</label>
20+
<input type="number"class="form-control border-secondary" id="inicio"/>
21+
<label for="fim" class="form-label mt-3">FIM:</label>
22+
<input type="number"class="form-control border-secondary" id="fim"/>
23+
<label for="passo" class="form-label pt-3">PASSO:</label>
24+
<input type="number" id="passo" class="form-control border-secondary"/>
25+
</div>
26+
<div class="position-relative">
27+
<input type="button" value="Contar" onclick="calc()" class="btn btn-outline-primary position-absolute top-100 start-50 translate-middle mt-5 w-100" />
28+
</div>
29+
</section>
30+
<div id="res">
31+
<p>Preparando a contagem...</p>
32+
</div>
33+
34+
<footer>&copy Luizeh</footer>
35+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
36+
<script src="script.js"></script>
37+
</body>
38+
</html>

aula14ex/ex016/script.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
function calc() {
2+
let inicio = document.getElementById("inicio")
3+
let fim = document.getElementById("fim")
4+
let passo = document.getElementById("passo")
5+
let res = document.getElementById("res")
6+
7+
if(inicio.value.length == 0 || fim.value.length == 0 || passo.value.length == 0){
8+
res.innerHTML = 'Impossível Contar'
9+
} else{
10+
res.innerHTML = 'Contando <br>'
11+
let i = Number(inicio.value)
12+
let f = Number(fim.value)
13+
let p = Number(passo.value)
14+
if (p <=0){
15+
window.alert('Passo inválido! Considerando Passo 1!')
16+
p = 1
17+
}
18+
if(i < f){
19+
for(let c = i; c <= f; c+= p){
20+
res.innerHTML += `${c} \u{1F449}`
21+
}
22+
res.innerHTML += `\u{1F3C1}`
23+
} else{
24+
for(let c = i; c>= f; c -= p)
25+
res.innerHTML += `${c} \u{1F449}`
26+
}
27+
}
28+
}

aula14ex/ex016/style.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@charset "UTF-8";
2+
3+
*{
4+
margin: 0;
5+
padding: 0;
6+
font-family: Arial, Helvetica, sans-serif;
7+
}
8+
9+
h1{
10+
color: white;
11+
text-align: center;
12+
padding: 20px;
13+
}
14+
15+
section#calculo {
16+
background-color: white;
17+
border-radius: 8px;
18+
padding: 15px;
19+
width: 500px;
20+
height: 400px;
21+
margin: auto;
22+
margin-bottom: 60px;
23+
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.274);
24+
25+
}
26+
div#res{
27+
color: black;
28+
background-color: white;
29+
border-radius: 8px;
30+
padding: 15px;
31+
width: 500px;
32+
margin: auto;
33+
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.274);
34+
}
35+
/* div img {
36+
margin-top: 35px;
37+
border-radius: 50%;
38+
width: 280px;
39+
height: 280px;
40+
} */
41+
42+
43+
footer {
44+
color: white;
45+
text-align: center;
46+
font-style: italic;
47+
padding: 10px;
48+
}

aula14ex/ex017/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-br">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Tabuada</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body class="bg-blue-200">
10+
<h1>Tabuada</h1>
11+
<section>
12+
<label for="num" class="mb-2 block text-sm font-medium text-zinc-700 text-xl/10">NÚMERO:</label>
13+
<input type="number" id="num" class="w-full h-8 rounded-lg border border-zinc-700 outline-none transition focus:border-blue-500 focus:ring-2 focus:ring-blue-500/30"/>
14+
<input type="button" value="Gerar Tabuada" id="valor" onclick="calc()" class="w-full h-7 rounded-lg bg-blue-400 px-5 py-3 text-sm font-semibold text-white transition hover:bg-blue-700">
15+
<select name="tabuada" id="seltab" size ="10">
16+
<option>Digite um numero acima</option>
17+
</select>
18+
<!-- <input type="number" placeholder="Digite um numero acima..." class="w-70 h-55 rounded-lg border border-zinc-700 outline-none transition focus:border-blue-500 focus:ring-2 focus:ring-blue-500/30"> -->
19+
</section>
20+
21+
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
22+
<script src="script.js"></script>
23+
</body>
24+
</html>

aula14ex/ex017/script.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function calc(){
2+
let num = document.getElementById('num')
3+
let tab = document.getElementById('seltab')
4+
if(num.value.length == 0){
5+
window.alert('Por favor, digite um número!')
6+
} else{
7+
let n = Number(num.value)
8+
let c = 1
9+
tab.innerHTML = ''
10+
while (c <= 10){
11+
let item = document.createElement('option')
12+
item.text = `${n} x ${c} = ${n*c}`
13+
item.value = `tab${c}`
14+
tab.appendChild(item)
15+
c++
16+
}
17+
}
18+
}

aula14ex/ex017/style.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@charset "UTF-8";
2+
3+
*{
4+
margin: 0;
5+
padding: 0;
6+
font-family: Arial, Helvetica, sans-serif;
7+
}
8+
9+
h1{
10+
color: white;
11+
text-align: center;
12+
padding: 20px;
13+
font-size: 3em;
14+
}
15+
16+
section {
17+
background-color: white;
18+
border-radius: 8px;
19+
padding: 15px;
20+
width: 650px;
21+
height: 400px;
22+
margin: auto;
23+
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.274);
24+
}
25+
26+
input#valor{
27+
margin-top: 10px;
28+
margin-bottom: 30px;
29+
}
30+
/* div img {
31+
margin-top: 35px;
32+
border-radius: 50%;
33+
width: 280px;
34+
height: 280px;
35+
} */
36+
37+
38+
footer {
39+
color: white;
40+
text-align: center;
41+
font-style: italic;
42+
padding: 10px;
43+
}

aula15/ambiente.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
let enzinx = [5, 8, 2, 9, 3];
2+
enzinx.push(1);
3+
enzinx.sort();
4+
console.log(`Esse é o enzinx!: ${enzinx}`);
5+
console.log(`o enzinx tem ${enzinx.length} posições`);
6+
console.log(`o primeiro valor do enzinx é ${enzinx[0]}`);
7+
console.log(`o último valor do enzinx é ${enzinx[5]}`);
8+
let pos = enzinx.indexOf(8);
9+
if (pos == -1) {
10+
console.log("O valor não foi encontrado!");
11+
} else {
12+
console.log(`O valor 8 está na posição ${pos}`);
13+
}

aula15/enzenhex.php

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<?php
2+
$nome = "Pagotti";
3+
$ano = date("Y");
4+
$frases = [
5+
"o sistema é bruto",
6+
"PHP funcionando sem frescura",
7+
"arquivo único, simples e direto",
8+
"servidor local rodando liso",
9+
$nome,
10+
$ano,
11+
];
12+
13+
$fraseAleatoria = $frases[array_rand($frases)];
14+
15+
?>
16+
17+
<!DOCTYPE html>
18+
<html lang="pt-BR">
19+
<head>
20+
<meta charset="UTF-8">
21+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
22+
<title>Projeto PHP Pro Max</title>
23+
24+
<style>
25+
* {
26+
margin: 0;
27+
padding: 0;
28+
box-sizing: border-box;
29+
}
30+
31+
body {
32+
min-height: 100vh;
33+
font-family: Arial, Helvetica, sans-serif;
34+
background: linear-gradient(135deg, #111827, #1e293b, #0f172a);
35+
color: white;
36+
display: flex;
37+
align-items: center;
38+
justify-content: center;
39+
padding: 20px;
40+
}
41+
42+
.card {
43+
width: 100%;
44+
max-width: 600px;
45+
background: rgba(255, 255, 255, 0.08);
46+
border: 1px solid rgba(255, 255, 255, 0.15);
47+
border-radius: 24px;
48+
padding: 35px;
49+
text-align: center;
50+
backdrop-filter: blur(12px);
51+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
52+
}
53+
54+
h1 {
55+
font-size: 2.5rem;
56+
margin-bottom: 15px;
57+
}
58+
59+
.destaque {
60+
color: #38bdf8;
61+
}
62+
63+
p {
64+
font-size: 1.1rem;
65+
line-height: 1.6;
66+
margin-bottom: 20px;
67+
color: #dbeafe;
68+
}
69+
70+
.box {
71+
background: rgba(0, 0, 0, 0.25);
72+
border-radius: 16px;
73+
padding: 18px;
74+
margin-top: 20px;
75+
border: 1px solid rgba(255, 255, 255, 0.1);
76+
}
77+
78+
.frase {
79+
font-size: 1.2rem;
80+
font-weight: bold;
81+
color: #facc15;
82+
}
83+
84+
.btn {
85+
display: inline-block;
86+
margin-top: 25px;
87+
padding: 12px 24px;
88+
border-radius: 999px;
89+
text-decoration: none;
90+
color: #020617;
91+
background: #38bdf8;
92+
font-weight: bold;
93+
transition: 0.3s;
94+
}
95+
96+
.btn:hover {
97+
transform: scale(1.05);
98+
background: #7dd3fc;
99+
}
100+
101+
footer {
102+
margin-top: 25px;
103+
font-size: 0.9rem;
104+
color: #94a3b8;
105+
}
106+
</style>
107+
</head>
108+
<body>
109+
110+
<main class="card">
111+
<h1>
112+
Salve, <span class="destaque"><?php echo $nome; ?></span>
113+
</h1>
114+
115+
<p>
116+
Esse é um arquivo único em PHP com HTML, CSS e lógica básica funcionando junto.
117+
</p>
118+
119+
<div class="box">
120+
<p>Frase aleatória gerada pelo PHP:</p>
121+
<div class="frase">
122+
<?php echo $fraseAleatoria; ?>
123+
</div>
124+
</div>
125+
126+
<div class="box">
127+
<p>Informações do servidor:</p>
128+
<p>
129+
Ano atual: <strong><?php echo $ano; ?></strong>
130+
</p>
131+
<p>
132+
Versão do PHP: <strong><?php echo phpversion(); ?></strong>
133+
</p>
134+
</div>
135+
136+
<a class="btn" href="">
137+
Recarregar página
138+
</a>
139+
140+
<footer>
141+
Projeto PHP Pro Max em um único arquivo.
142+
</footer>
143+
</main>
144+
145+
</body>
146+
</html>

aula15/vetornatela.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
let enzom = [5, 13, 3, 4, 8, 6, 7, 14, 18, 19, 20, 21]
2+
3+
enzom.sort((a, b) => a - b)
4+
5+
console.log(enzom)
6+
console.log(`o enzom tem ${enzom.length} posições`)
7+
8+
// for (let pos = 0; pos < enzom.length; pos++) {
9+
// console.log(`a posição ${pos} tem o valor ${enzom[pos]}`)
10+
// }
11+
12+
for(let pos in enzom){
13+
console.log(`a posição ${pos} tem o valor ${enzom[pos]}`)
14+
}

0 commit comments

Comments
 (0)