Sahm269 commited on
Commit
4098174
·
verified ·
1 Parent(s): e50d8bb

Update client/pages/user.py

Browse files
Files changed (1) hide show
  1. client/pages/user.py +90 -90
client/pages/user.py CHANGED
@@ -1,90 +1,90 @@
1
- import streamlit as st
2
- from client.pages.user__info_perso import info_perso
3
- from client.pages.user__mealplan import mealplan
4
- from client.pages.user__course_list import course_list
5
- from client.pages.user__favoris import favoris
6
-
7
-
8
- # Appliquer le style personnalisé aux headers
9
- st.markdown(
10
- """
11
- <style>
12
- /* Style global pour les headers */
13
- h3 {
14
- font-size: 20px;
15
- font-family: New Icon;
16
- font-weight: 700;
17
- }
18
-
19
- h2 {
20
- font-size: 2rem;
21
- color: #2a4b47;
22
- }
23
-
24
- .welcome-title {
25
- font-size: 2.5rem;
26
- font-weight: 700;
27
- color: #2a4b47;
28
- text-align: center;
29
- animation: fadeIn 2s ease-out;
30
- }
31
-
32
- @keyframes fadeIn {
33
- 0% { opacity: 0; }
34
- 100% { opacity: 1; }
35
- }
36
-
37
- .user-name {
38
- color: #4e7a63;
39
- font-size: 3rem;
40
- font-weight: bold;
41
- animation: nameAnimation 2s ease-out;
42
- font-family: New Icon;
43
- }
44
- </style>
45
- """,
46
- unsafe_allow_html=True,
47
- )
48
-
49
- # Affichage du message de bienvenue
50
- st.markdown(
51
- f"""
52
- <h2 class="welcome-title">
53
- Bienvenue sur NutriGénie <span class="user-name">{st.session_state['user']}</span> 🍽️!
54
- </h2>
55
- """,
56
- unsafe_allow_html=True,
57
- )
58
-
59
- # Définition des onglets horizontaux
60
- tabs = st.tabs(
61
- [
62
- "🧑‍💼 Informations personnelles ",
63
- "🍽️ Meal Plan",
64
- "🛒 Liste des courses",
65
- "⭐ Favoris",
66
- ]
67
- )
68
-
69
- # Onglet 1 : Informations personnelles
70
- with tabs[0]:
71
- st.markdown(
72
- '<h3 class="stHeader">🧑‍💼 Informations personnelles</h3>',
73
- unsafe_allow_html=True,
74
- )
75
- info_perso() # Charger la page `info_perso.py`
76
-
77
- # Onglet 2 : Meal Plan
78
- with tabs[1]:
79
- st.markdown('<h3 class="stHeader">🍽️ Meal Plan</h3>', unsafe_allow_html=True)
80
- mealplan() # Charger la page `mealplan.py`
81
-
82
- # Onglet 3 : Liste des courses
83
- with tabs[2]:
84
- st.markdown('<h3 class="stHeader">🛒 Liste des courses</h3>', unsafe_allow_html=True)
85
- course_list() # Charger la page `course_list.py`
86
-
87
- # Onglet 4 : Favoris
88
- with tabs[3]:
89
- st.markdown('<h3 class="stHeader">⭐ Favoris</h3>', unsafe_allow_html=True)
90
- favoris() # Charger la page `favoris.py`
 
1
+ import streamlit as st
2
+ from client.pages.user__info_perso import info_perso
3
+ from client.pages.user__mealplan import mealplan
4
+ from client.pages.user__course_list import course_list
5
+ from client.pages.user__favoris import favoris
6
+
7
+
8
+ # Appliquer le style personnalisé aux headers
9
+ st.markdown(
10
+ """
11
+ <style>
12
+ /* Style global pour les headers */
13
+ h3 {
14
+ font-size: 20px;
15
+ font-family: New Icon;
16
+ font-weight: 700;
17
+ }
18
+
19
+ h2 {
20
+ font-size: 2rem;
21
+ color: #2a4b47;
22
+ }
23
+
24
+ .welcome-title {
25
+ font-size: 2.5rem;
26
+ font-weight: 700;
27
+ color: #2a4b47;
28
+ text-align: center;
29
+ animation: fadeIn 2s ease-out;
30
+ }
31
+
32
+ @keyframes fadeIn {
33
+ 0% { opacity: 0; }
34
+ 100% { opacity: 1; }
35
+ }
36
+
37
+ .user-name {
38
+ color: #4e7a63;
39
+ font-size: 3rem;
40
+ font-weight: bold;
41
+ animation: nameAnimation 2s ease-out;
42
+ font-family: New Icon;
43
+ }
44
+ </style>
45
+ """,
46
+ unsafe_allow_html=True,
47
+ )
48
+
49
+ # Affichage du message de bienvenue
50
+ st.markdown(
51
+ f"""
52
+ <h2 class="welcome-title">
53
+ Bienvenue sur NutriGénie <span class="user-name">{st.session_state['user']}</span> 🍽️!
54
+ </h2>
55
+ """,
56
+ unsafe_allow_html=True,
57
+ )
58
+
59
+ # Définition des onglets horizontaux
60
+ tabs = st.tabs(
61
+ [
62
+ "🧑‍💼 Informations personnelles ",
63
+ "🍽️ Meal Plan",
64
+ "🛒 Liste des courses",
65
+ # "⭐ Favoris",
66
+ ]
67
+ )
68
+
69
+ # Onglet 1 : Informations personnelles
70
+ with tabs[0]:
71
+ st.markdown(
72
+ '<h3 class="stHeader">🧑‍💼 Informations personnelles</h3>',
73
+ unsafe_allow_html=True,
74
+ )
75
+ info_perso() # Charger la page `info_perso.py`
76
+
77
+ # Onglet 2 : Meal Plan
78
+ with tabs[1]:
79
+ st.markdown('<h3 class="stHeader">🍽️ Meal Plan</h3>', unsafe_allow_html=True)
80
+ mealplan() # Charger la page `mealplan.py`
81
+
82
+ # Onglet 3 : Liste des courses
83
+ with tabs[2]:
84
+ st.markdown('<h3 class="stHeader">🛒 Liste des courses</h3>', unsafe_allow_html=True)
85
+ course_list() # Charger la page `course_list.py`
86
+
87
+ # Onglet 4 : Favoris
88
+ # with tabs[3]:
89
+ # st.markdown('<h3 class="stHeader">⭐ Favoris</h3>', unsafe_allow_html=True)
90
+ # favoris() # Charger la page `favoris.py`