Skip to content

Commit

Permalink
feat: add localstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaromx committed Sep 3, 2023
1 parent 92c3ceb commit 01dc636
Show file tree
Hide file tree
Showing 11 changed files with 346 additions and 203 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 140
end_of_line = lf

[*.{js,ts,html}]
indent_size = 4

[*.{js,ts}]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ dist

# TernJS port file
.tern-port
dist
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": false,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 140,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleAttributePerLine": false,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": true
}
28 changes: 14 additions & 14 deletions adiciona.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<!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">
<title>Adicionar Jogador</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adicionar Jogador</title>

</head>
<body>
<h1>Adicionar Jogador</h1>
<form id="form-adiciona" action="index.html" method="get">
<input type="text" name="nome" id="form-nome" placeholder="Insira o nome" required>
<input type="number" step="0.01" name="altura" id="form-altura" placeholder="Insira a altura" required>
<input type="number" name="peso" id="form-peso" placeholder="Insira o peso" required>
<input type="number" name="idade" id="form-idade" placeholder="Insira a idade" required>
<button type="submit" id="button-add">adiciona</button>
<h1>Adicionar Jogador</h1>
<form id="form-adiciona" action="index.html" method="get">
<input type="text" name="nome" id="form-nome" placeholder="Insira o nome" required>
<input type="number" step="0.01" name="altura" id="form-altura" placeholder="Insira a altura" required>
<input type="number" name="peso" id="form-peso" placeholder="Insira o peso" required>
<input type="number" name="idade" id="form-idade" placeholder="Insira a idade" required>

<button type="submit" id="button-add">adiciona</button>
</form>


</body>
</html>
91 changes: 0 additions & 91 deletions code/app.ts

This file was deleted.

21 changes: 5 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,13 @@ <h1>Tabela Jogadores </h1>
</tbody>
</table>

<button class="botao-add"><a href="adiciona.html">Adicionar Jogador</a></button>
<button class="botao-add">
<a href="adiciona.html">Adicionar Jogador</a>
</button>

<script src="prod/app.js"></script>
<script src="dist/app.js"></script>
<script>


function exibirDados() {
var params = getURLParameters();
if(params){
const player = obtemPlayer(params);
addPLayerTabela(player)
}
}

window.onload = exibirDados;

// Chama a função quando a página é carregada

// CarregarDados()
</script>
</body>
</html>
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "player_ts",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"start":"tsc -w"
"start": "tsc -w"
},
"author": "",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"typescript": "^5.2.2"
}
}
67 changes: 0 additions & 67 deletions prod/app.js

This file was deleted.

Loading

0 comments on commit 01dc636

Please sign in to comment.