Skip to content

Commit 6bffd10

Browse files
committed
Progetto ultimato! Aggiunto il fatto che se un utente non è loggato non può visitare le pagine oltre a login e registrati, inoltre ho sistemato alcune cose della struttura del progetto. FINE COMMIT
1 parent f807923 commit 6bffd10

21 files changed

+237
-148
lines changed

accessoNegato.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>L.I.F.E | Accesso Negato!</title>
8+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
9+
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Karantina:wght@400&display=swap">
11+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap">
12+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inder&display=swap">
13+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
14+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
15+
<link rel="stylesheet" href="styles/loginRegistrazione.css">
16+
<link rel="stylesheet" href="styles/general.css">
17+
<style>
18+
.error-icon {
19+
font-size: 80px !important;
20+
}
21+
22+
.error-message {
23+
font-size: 1.5rem;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
30+
<div class="container mt-5">
31+
<div class="row justify-content-center">
32+
<div class="col-8 text-center mt-3">
33+
<div class="logoContainer d-flex mb-3 text-center justify-content-center">
34+
<img src="res/imgs/logo/LIFElogo.png"
35+
alt="Main Logo" class="logo">
36+
<span class="logo-text mx-3">L.I.F.E.</span>
37+
</div>
38+
<div class="container text-center">
39+
<i class="fa-solid fa-face-sad-tear fs-1 error-icon mb-3 mt-3"></i>
40+
<div class="error-message mt-3">
41+
<strong>Accesso Negato!</strong> Non sei autorizzato a visualizzare questa pagina. Effettua il <a href="index.html" class="text-info">Login</a> per continuare.
42+
</div>
43+
</div>
44+
</div>
45+
</div>
46+
</div>
47+
48+
</body>
49+
50+
</html>

dashboardAttivitaFisica.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ <h5 class="card-title text-muted">Allenamenti Consigliati</h5>
221221
});
222222
/* SEZIONE PASSI */
223223
// Ottieni la data corrente
224-
const oggi = new Date();
224+
let oggi = new Date();
225225
// Formatta la data come stringa (YYYY-MM-DD)
226-
const dataOdierna = oggi.toISOString().slice(0, 10);
226+
let dataOdierna = oggi.toISOString().slice(0, 10);
227227

228228
// Percorso del file JSON esterno
229229
let pathToJson = 'data/passiUtenti.json';

dashboardUtente.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ <h3 class="mb-1 fw-bold" id="mediaSonno"></h3>
157157

158158
/* SEZIONE PASSI */
159159
// Ottieni la data corrente
160-
const oggi = new Date();
160+
let oggi = new Date();
161161
// Formatta la data come stringa (YYYY-MM-DD)
162-
const dataOdierna = oggi.toISOString().slice(0, 10);
162+
let dataOdierna = oggi.toISOString().slice(0, 10);
163163

164164
// Percorso del file JSON esterno
165165
pathToJson = 'data/passiUtenti.json';

data/alimentazioneGiornalieraUtenti.json

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,30 @@
33
"userId": 1,
44
"data": [
55
{
6-
"date": "2024-06-30",
6+
"date": "2024-07-08",
77
"pasti": {
88
"Colazione": [
99
{
1010
"pasto": "Cappuccino",
1111
"calories": 150
12-
}
13-
],
14-
"Pranzo": [
12+
},
1513
{
16-
"pasto": "Pizza margherita",
17-
"calories": 250
18-
}
19-
],
20-
"Cena": [
14+
"pasto": "Cappuccino",
15+
"calories": 150
16+
},
2117
{
22-
"pasto": "Risotto ai funghi",
23-
"calories": 380
18+
"pasto": "Cappuccino",
19+
"calories": 150
2420
}
2521
],
26-
"Spuntini": [
22+
"Pranzo": [
2723
{
28-
"pasto": "Frutta mista (mela, banana, uva)",
24+
"pasto": "Biscotti integrali",
2925
"calories": 150
3026
}
31-
]
27+
],
28+
"Cena": [],
29+
"Spuntini": []
3230
}
3331
},
3432
{
@@ -67,6 +65,35 @@
6765
}
6866
]
6967
}
68+
},
69+
{
70+
"date": "2024-06-30",
71+
"pasti": {
72+
"Colazione": [
73+
{
74+
"pasto": "Cappuccino",
75+
"calories": 150
76+
}
77+
],
78+
"Pranzo": [
79+
{
80+
"pasto": "Pizza margherita",
81+
"calories": 250
82+
}
83+
],
84+
"Cena": [
85+
{
86+
"pasto": "Risotto ai funghi",
87+
"calories": 380
88+
}
89+
],
90+
"Spuntini": [
91+
{
92+
"pasto": "Frutta mista (mela, banana, uva)",
93+
"calories": 150
94+
}
95+
]
96+
}
7097
}
7198
]
7299
},

data/diarioUtenti.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
{
44
"userId": 1,
55
"notes": [
6+
{
7+
"noteId": "RDd",
8+
"title": "Ciao sto bene",
9+
"text": "Quali sono le tue passioni e come le coltivi nella tua vita quotidiana?\n\nCalcio\nGiochi\nRoulette\nSport",
10+
"date": "2024-07-07"
11+
},
612
{
713
"noteId": 1,
814
"title": "Nota importante",
@@ -20,10 +26,16 @@
2026
{
2127
"userId": 2,
2228
"notes": [
29+
{
30+
"noteId": "7k3",
31+
"title": "sadsada",
32+
"text": "sdsad",
33+
"date": "2024-07-07"
34+
},
2335
{
2436
"noteId": "SUb",
2537
"title": "Domande giornaliere",
26-
"text": "Come è andata la tua giornata oggi? Quali sono stati i momenti più significativi? Cosa hai imparato di nuovo oggi? Hai avuto qualche difficoltà da superare? Qual è stato il tuo stato emotivo dominante oggi? Cosa ti ha dato più gioia oggi? Hai avuto modo di fare una pausa rilassante durante la giornata? Qual è stato il miglior aspetto della tua giornata? Qual è stata la tua più grande realizzazione oggi? Hai avuto delle interazioni significative con altre persone oggi?",
38+
"text": "Come \u00e8 andata la tua giornata oggi? Quali sono stati i momenti pi\u00f9 significativi? Cosa hai imparato di nuovo oggi? Hai avuto qualche difficolt\u00e0 da superare? Qual \u00e8 stato il tuo stato emotivo dominante oggi? Cosa ti ha dato pi\u00f9 gioia oggi? Hai avuto modo di fare una pausa rilassante durante la giornata? Qual \u00e8 stato il miglior aspetto della tua giornata? Qual \u00e8 stata la tua pi\u00f9 grande realizzazione oggi? Hai avuto delle interazioni significative con altre persone oggi?",
2739
"date": "2024-07-05"
2840
},
2941
{
@@ -82,4 +94,4 @@
8294
]
8395
}
8496
]
85-
}
97+
}

data/passiUtenti.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
{
44
"userId": 1,
55
"steps": [
6+
{
7+
"date": "2024-07-08",
8+
"steps": 3000
9+
},
10+
{
11+
"date": "2024-07-07",
12+
"steps": 3000
13+
},
614
{
715
"date": "2024-07-04",
816
"steps": 769
@@ -84,6 +92,10 @@
8492
{
8593
"userId": 2,
8694
"steps": [
95+
{
96+
"date": "2024-07-07",
97+
"steps": 3455
98+
},
8799
{
88100
"date": "2024-07-05",
89101
"steps": 340

data/pesoUtenti.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
{
3333
"userId": 2,
3434
"weights": [
35+
{
36+
"date": "2024-07-08",
37+
"weight": 59
38+
},
3539
{
3640
"date": "2024-07-04",
3741
"weight": 55

data/sonnoUtenti.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"userId": 1,
55
"sleepHours": [
6+
{
7+
"date": "2024-07-07",
8+
"hours": 8
9+
},
610
{
711
"date": "2024-07-03",
812
"hours": 6

data/utenti.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"userId": 1,
44
"nome": "Mario",
55
"cognome": "Rossi",
6-
"eta": 23,
6+
"eta": 24,
77
"sesso": "M",
8-
"altezza": 171,
8+
"altezza": 172,
99
"peso": 77,
10-
"obbiettivoPassi": 1000,
10+
"obbiettivoPassi": 20000,
1111
"email": "mario@example.com",
1212
"password": "nonteladico"
1313
},
@@ -17,9 +17,9 @@
1717
"cognome": "Rinaldi",
1818
"eta": 29,
1919
"sesso": "F",
20-
"altezza": 163,
21-
"peso": 55,
22-
"obbiettivoPassi": 8000,
20+
"altezza": 168,
21+
"peso": 59,
22+
"obbiettivoPassi": 809,
2323
"email": "greta@example.com",
2424
"password": "gretagolosa"
2525
},

index.html

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,63 @@
11
<!DOCTYPE html>
2-
<html lang="it">
2+
<html lang="en">
33

44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Dashboard</title>
8-
<!-- Bootstrap CSS -->
9-
<link href="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
10-
<!-- Bootstrap JS Bundle (with Popper) -->
11-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
12-
<!-- Chart.js -->
13-
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
14-
15-
<!-- Style nostri -->
7+
<title>L.I.F.E | Area Login</title>
8+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
9+
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Karantina:wght@400&display=swap">
11+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap">
12+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inder&display=swap">
13+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
14+
<link rel="stylesheet" href="styles/loginRegistrazione.css">
1615
<link rel="stylesheet" href="styles/general.css">
17-
<link rel="stylesheet" href="styles/navbar.css">
18-
<link rel="stylesheet" href="styles/dashboard.css">
19-
20-
<!-- import scripts -->
21-
<script src="scripts/importHeaderNavbar.js"></script>
22-
<script src="scripts/provaGrafico.js"></script>
2316
</head>
2417

2518
<body>
26-
<!--INIZIO HEADER-->
27-
<div id="header-placeholder"></div>
28-
<!--FINE HEADER-->
2919

30-
<h1>L.I.F.E.</h1>
31-
<div>
32-
<canvas id="myChart"></canvas>
20+
<div class="container mt-5">
21+
<div class="row justify-content-center">
22+
<div class="col-md-6 text-center login-container">
23+
<div class="logoContainer d-flex mb-3 text-center justify-content-center">
24+
<img src="res/imgs/logo/LIFElogo.png"
25+
alt="Main Logo" class="logo">
26+
<span class="logo-text mx-3">L.I.F.E.</span>
27+
</div>
28+
<p class="mb-4">
29+
<a href="index.html" class="login-text fs-3">LOGIN</a> / <a href="registrazione.html"
30+
class="registrazione-text fs-5">REGISTRATI</a>
31+
</p>
32+
<div class="container">
33+
<div class="alert alert-danger d-none" role="alert" id="errorMessage">
34+
<b>Errore!</b> E-mail o password errate.
35+
</div>
36+
<form id="loginForm">
37+
<div class="mb-3">
38+
<label for="emailInput" class="visually-hidden">Email</label>
39+
<input type="email" class="form-control formInput" id="emailInput" placeholder="Email"
40+
aria-label="Email">
41+
</div>
42+
<div class="mb-3">
43+
<label for="passInput" class="visually-hidden">Password</label>
44+
<input type="password" class="form-control formInput" id="pwdInput" placeholder="Password"
45+
aria-label="Password">
46+
</div>
47+
<div class="text-center">
48+
<button class="bottonePersonalizzato px-4 py-1 mb-1 text-center fw-bold fs-4 mt-3"
49+
tabindex="0">Accedi</button>
50+
</div>
51+
</form>
52+
<p class="forgot-password mt-4 text-center">Password Dimenticata?</p>
53+
</div>
54+
</div>
55+
</div>
3356
</div>
34-
35-
<!--INIZIO NAVBAR-->
36-
<div id="navbar-placeholder"></div>
37-
<!--FINE NAVBAR-->
3857
</body>
39-
58+
<!-- Scripts nostri -->
59+
<script src="scripts/utils.js"></script>
60+
<script src="scripts/gestioneUtente.js"></script>
61+
<script src="scripts/login.js"></script>
4062

4163
</html>

0 commit comments

Comments
 (0)