Skip to content

Commit 01dc636

Browse files
committed
feat: add localstorage
1 parent 92c3ceb commit 01dc636

File tree

11 files changed

+346
-203
lines changed

11 files changed

+346
-203
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = tab
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
max_line_length = 140
11+
end_of_line = lf
12+
13+
[*.{js,ts,html}]
14+
indent_size = 4
15+
16+
[*.{js,ts}]
17+
quote_type = single
18+
19+
[*.md]
20+
max_line_length = off
21+
trim_trailing_whitespace = false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
dist

.prettierrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSameLine": false,
4+
"bracketSpacing": false,
5+
"embeddedLanguageFormatting": "auto",
6+
"htmlWhitespaceSensitivity": "css",
7+
"insertPragma": false,
8+
"jsxSingleQuote": false,
9+
"printWidth": 140,
10+
"proseWrap": "preserve",
11+
"quoteProps": "as-needed",
12+
"requirePragma": false,
13+
"semi": true,
14+
"singleAttributePerLine": false,
15+
"singleQuote": false,
16+
"tabWidth": 4,
17+
"trailingComma": "es5",
18+
"useTabs": true
19+
}

adiciona.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<!DOCTYPE html>
22
<html lang="pt-Br">
33
<head>
4-
<meta charset="UTF-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Adicionar Jogador</title>
8-
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Adicionar Jogador</title>
8+
99
</head>
1010
<body>
11-
<h1>Adicionar Jogador</h1>
12-
<form id="form-adiciona" action="index.html" method="get">
13-
<input type="text" name="nome" id="form-nome" placeholder="Insira o nome" required>
14-
<input type="number" step="0.01" name="altura" id="form-altura" placeholder="Insira a altura" required>
15-
<input type="number" name="peso" id="form-peso" placeholder="Insira o peso" required>
16-
<input type="number" name="idade" id="form-idade" placeholder="Insira a idade" required>
17-
18-
<button type="submit" id="button-add">adiciona</button>
11+
<h1>Adicionar Jogador</h1>
12+
<form id="form-adiciona" action="index.html" method="get">
13+
<input type="text" name="nome" id="form-nome" placeholder="Insira o nome" required>
14+
<input type="number" step="0.01" name="altura" id="form-altura" placeholder="Insira a altura" required>
15+
<input type="number" name="peso" id="form-peso" placeholder="Insira o peso" required>
16+
<input type="number" name="idade" id="form-idade" placeholder="Insira a idade" required>
17+
18+
<button type="submit" id="button-add">adiciona</button>
1919
</form>
2020

21-
21+
2222
</body>
2323
</html>

code/app.ts

Lines changed: 0 additions & 91 deletions
This file was deleted.

index.html

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,13 @@ <h1>Tabela Jogadores </h1>
2828
</tbody>
2929
</table>
3030

31-
<button class="botao-add"><a href="adiciona.html">Adicionar Jogador</a></button>
31+
<button class="botao-add">
32+
<a href="adiciona.html">Adicionar Jogador</a>
33+
</button>
3234

33-
<script src="prod/app.js"></script>
35+
<script src="dist/app.js"></script>
3436
<script>
35-
36-
37-
function exibirDados() {
38-
var params = getURLParameters();
39-
if(params){
40-
const player = obtemPlayer(params);
41-
addPLayerTabela(player)
42-
}
43-
}
44-
45-
window.onload = exibirDados;
46-
47-
// Chama a função quando a página é carregada
48-
37+
// CarregarDados()
4938
</script>
5039
</body>
5140
</html>

package-lock.json

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"name": "player_ts",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "",
5-
"main": "index.js",
5+
"type": "module",
66
"scripts": {
7-
"start":"tsc -w"
7+
"start": "tsc -w"
88
},
99
"author": "",
10-
"license": "ISC"
10+
"license": "ISC",
11+
"devDependencies": {
12+
"typescript": "^5.2.2"
13+
}
1114
}

prod/app.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)