Commit ·
a665180
1
Parent(s): a23c44c
Fix: restore link buttons + make sidebar fixed
Browse files- pages/2_Projects.py +5 -5
- styles.css +15 -0
pages/2_Projects.py
CHANGED
|
@@ -51,15 +51,15 @@ for idx, proj in enumerate(PROJECTS):
|
|
| 51 |
except:
|
| 52 |
pass
|
| 53 |
|
| 54 |
-
# Liens
|
| 55 |
st.markdown('<h3 style="color: #00D9FF; margin: 2rem 0 1rem 0;">🔗 Liens du projet</h3>', unsafe_allow_html=True)
|
| 56 |
|
|
|
|
| 57 |
label_map = {"github": "💻 GitHub", "demo": "🌐 Démo en direct", "notebook": "📓 Carnet"}
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
st.markdown(f'<a href="{url}" target="_blank" class="stLinkButton"><span>{label}</span></a>', unsafe_allow_html=True)
|
| 63 |
|
| 64 |
if idx < len(PROJECTS) - 1:
|
| 65 |
st.markdown("---")
|
|
|
|
| 51 |
except:
|
| 52 |
pass
|
| 53 |
|
| 54 |
+
# Liens avec VRAIS BOUTONS
|
| 55 |
st.markdown('<h3 style="color: #00D9FF; margin: 2rem 0 1rem 0;">🔗 Liens du projet</h3>', unsafe_allow_html=True)
|
| 56 |
|
| 57 |
+
cols = st.columns(len(proj['liens']))
|
| 58 |
label_map = {"github": "💻 GitHub", "demo": "🌐 Démo en direct", "notebook": "📓 Carnet"}
|
| 59 |
|
| 60 |
+
for i, (key, url) in enumerate(proj['liens'].items()):
|
| 61 |
+
with cols[i]:
|
| 62 |
+
st.link_button(label_map.get(key, key.title()), url, use_container_width=True)
|
|
|
|
| 63 |
|
| 64 |
if idx < len(PROJECTS) - 1:
|
| 65 |
st.markdown("---")
|
styles.css
CHANGED
|
@@ -346,3 +346,18 @@ header[data-testid="stHeader"] {
|
|
| 346 |
|
| 347 |
|
| 348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
/* ============ SIDEBAR FIXE ============ */
|
| 352 |
+
[data-testid="stSidebar"] {
|
| 353 |
+
position: fixed !important;
|
| 354 |
+
top: 0 !important;
|
| 355 |
+
left: 0 !important;
|
| 356 |
+
height: 100vh !important;
|
| 357 |
+
overflow-y: auto !important;
|
| 358 |
+
z-index: 999 !important;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
[data-testid="stSidebar"] > div:first-child {
|
| 362 |
+
height: 100vh !important;
|
| 363 |
+
}
|