File size: 2,334 Bytes
4098174
 
 
 
e72f176
4098174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import streamlit as st
from client.pages.user__info_perso import info_perso
from client.pages.user__mealplan import mealplan
from client.pages.user__course_list import course_list
# from client.pages.user__favoris import favoris


# Appliquer le style personnalisé aux headers
st.markdown(
    """
    <style>
        /* Style global pour les headers */
        h3 {
            font-size: 20px;
            font-family: New Icon;
            font-weight: 700;
        }
            
        h2 {
            font-size: 2rem;
            color: #2a4b47;
        }

        .welcome-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: #2a4b47;
            text-align: center;
            animation: fadeIn 2s ease-out;
        }

        @keyframes fadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }

        .user-name {
            color: #4e7a63;
            font-size: 3rem;
            font-weight: bold;
            animation: nameAnimation 2s ease-out;
            font-family: New Icon;
        }
    </style>
""",
    unsafe_allow_html=True,
)

# Affichage du message de bienvenue
st.markdown(
    f"""
    <h2 class="welcome-title">
        Bienvenue sur NutriGénie <span class="user-name">{st.session_state['user']}</span> 🍽️!
    </h2>
""",
    unsafe_allow_html=True,
)

# Définition des onglets horizontaux
tabs = st.tabs(
    [
        "🧑‍💼 Informations personnelles ",
        "🍽️ Meal Plan",
        "🛒 Liste des courses",
        # "⭐ Favoris",
    ]
)

# Onglet 1 : Informations personnelles
with tabs[0]:
    st.markdown(
        '<h3 class="stHeader">🧑‍💼 Informations personnelles</h3>',
        unsafe_allow_html=True,
    )
    info_perso()  # Charger la page `info_perso.py`

# Onglet 2 : Meal Plan
with tabs[1]:
    st.markdown('<h3 class="stHeader">🍽️ Meal Plan</h3>', unsafe_allow_html=True)
    mealplan()  # Charger la page `mealplan.py`

# Onglet 3 : Liste des courses
with tabs[2]:
    st.markdown('<h3 class="stHeader">🛒 Liste des courses</h3>', unsafe_allow_html=True)
    course_list()  # Charger la page `course_list.py`

# Onglet 4 : Favoris
# with tabs[3]:
#     st.markdown('<h3 class="stHeader">⭐ Favoris</h3>', unsafe_allow_html=True)
#     favoris()  # Charger la page `favoris.py`