first elements
This commit is contained in:
parent
884c9a89af
commit
6de2d6bc24
20
app/index.html
Normal file
20
app/index.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Pangloss</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<label for="nom">Nom de la tâche</label>
|
||||
<input type="text" id="nom" name ="nom"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="duree">Durée de la tâche (en h)</label>
|
||||
<input type="number" id="duree" name ="duree"/>
|
||||
</div>
|
||||
<button type="button" onclick="createtask()">Créer</button>
|
||||
</body>
|
||||
</html>
|
21
app/script.js
Normal file
21
app/script.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
//définition de l'objet tâche
|
||||
const Tache = {
|
||||
//Nom de la tâche - chaîne de caractères
|
||||
nom: "default",
|
||||
//Durée en heures - float
|
||||
duree : 0.0,
|
||||
//Date de début
|
||||
date_debut: Date.now(),
|
||||
//Date de fin
|
||||
date_fin : Date.now().dateAddDAys(1),
|
||||
//Tache à faire avant la tâche courante
|
||||
est_bloque_par: {},
|
||||
//Priorité - integer
|
||||
priorite: 0,
|
||||
}
|
||||
|
||||
function createtask(){
|
||||
let tache = Object.create(Tache);
|
||||
alert("la tâche s'appelle");
|
||||
alert(tache.nom);
|
||||
}
|
4
app/style.css
Normal file
4
app/style.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
body{
|
||||
background-image: url(https://t3.ftcdn.net/jpg/09/18/51/88/360_F_918518811_e0Wh732g7nIS9hsyi7ox9wWhguruEEgx.jpg);
|
||||
background-size: 500px;
|
||||
}
|
Loading…
Reference in a new issue