Spaces:
Sleeping
Sleeping
File size: 7,137 Bytes
7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 7bd7bef 5b2d4e7 |
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
import streamlit as st
import os
# def home_page():
st.markdown(
"""
<style>
/*
body, .stApp {
background: linear-gradient(to right, #cae7d4, #a8d8b9);
}*/
@keyframes gradientAnimation {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.presentation {
background-color: #ffffff;
border-radius: 10px;
padding: 2rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.left-col, .right-col {
border-radius: 12px;
overflow: hidden;
}
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;
}
.presentation-text {
font-size: 1.3rem;
color: #4e7a63;
text-align: center;
font-style: italic;
animation: fadeIn 3s ease-out;
}
.feature-icon {
font-size: 2rem;
margin-right: 1rem;
}
.features {
background: linear-gradient(to right, #cae7d4, #a8d8b9);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
animation: fadeIn 1s ease-out;
transition: transform 0.3s ease;
margin-bottom: 1rem;
height:250px;
}
.features:hover {
transform: translateY(-5px);
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}
.team-name-role {
color: #2a4b47;
font-size: 1.1rem;
margin-top: 0.5rem;
font-weight: 500;
font-style: italic;
text-align: center;
}
.team-name {
color: #2a4b47;
font-size: 1.3rem;
font-weight: 700;
text-align: center;
}
</style>
""",
unsafe_allow_html=True,
)
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,
)
st.markdown(
"""
<br>
<div class="presentation-text">
" Laissez-nous vous guider à travers une expérience culinaire sur-mesure. Découvrez des recettes adaptées à vos préférences et suivez vos habitudes alimentaires en toute simplicité. "
</div>
<br>
""",
unsafe_allow_html=True,
)
logo_path = os.path.join("client", "assets", "logo.png")
# centrer le logo
cola, colb, colc = st.columns(3)
with cola:
pass
with colb:
st.image(logo_path, use_container_width=True, caption=None)
with colc:
pass
st.markdown(
"""
<br>
<h3 style="color:#2a4b47; text-align:center;">🔧 Fonctionnalités principales de l'application :</h3>
<br>
""",
unsafe_allow_html=True,
)
# Fonctionnalités disposées horizontalement par paires
col1, col2 = st.columns(2)
with col1:
# Fonctionnalités 1 et 2
st.markdown(
"""
<div class="features">
<div style="display: flex; align-items: center;">
<span class="feature-icon">🍽️</span>
<h3><strong>Génération de recettes personnalisées</strong></h3>
</div>
<p>Créez des recettes adaptées à vos préférences et vos besoins alimentaires. Nous générons des suggestions personnalisées pour chaque utilisateur.</p>
</div>
<div class="features">
<div style="display: flex; align-items: center;">
<span class="feature-icon">📝</span>
<h3><strong>Suivi des repas</strong></h3>
</div>
<p>Consultez l'historique de vos repas consommés et suivez vos habitudes alimentaires au fil du temps.</p>
</div>
""",
unsafe_allow_html=True,
)
with col2:
# Fonctionnalités 3 et 4
st.markdown(
"""
<div class="features">
<div style="display: flex; align-items: center;">
<span class="feature-icon">🛒</span>
<h3><strong>Liste de courses</strong></h3>
</div>
<p>Générez automatiquement des listes de courses basées sur les recettes que vous avez choisies. Ne manquez plus d'ingrédients !</p>
</div>
<div class="features">
<div style="display: flex; align-items: center;">
<span class="feature-icon">🍴</span>
<h3><strong>Suggestions de repas</strong></h3>
</div>
<p>Obtenez des suggestions de repas en fonction de vos goûts et de vos besoins nutritionnels.</p>
</div>
""",
unsafe_allow_html=True,
)
# Présentation des membres de l'équipe
st.markdown("<hr>", unsafe_allow_html=True) # Ajoute une ligne de séparation
st.subheader("Rencontrez notre équipe 👩🍳👨🍳")
# Définition des 5 membres
base_path = os.path.join("client", "assets")
membres = [
{
"nom": "Souraya",
"role": "M2 SISE",
"photo": f"{os.path.join(base_path,'membre1.jpg')}",
"emoji_role": "👩💻",
},
{
"nom": "Bertrand",
"role": "M2 SISE",
"photo": f"{os.path.join(base_path,'membre2.jpg')}",
"emoji_role": "👩💻",
},
{
"nom": "Cyril",
"role": "M2 SISE",
"photo": f"{os.path.join(base_path,'membre3.jpg')}",
"emoji_role": "👩💻",
},
{
"nom": "Linh Nhi",
"role": "M2 SISE",
"photo": f"{os.path.join(base_path,'membre4.jpg')}",
"emoji_role": "👩💻",
},
{
"nom": "Daniella",
"role": "M2 SISE",
"photo": f"{os.path.join(base_path,'membre5.jpg')}",
"emoji_role": "👩💻",
},
]
# Création des colonnes pour chaque membre
cols = st.columns(5)
for i, membre in enumerate(membres):
with cols[i]:
st.image(membre["photo"], use_container_width=True, caption=None)
st.markdown(
f"""
<div class="team-member">
<div class="team-name">{membre['nom']}</div>
<div class="team-name-role">{membre['emoji_role']} {membre['role']}</div>
</div>
""",
unsafe_allow_html=True,
)
|