Update page_files/Home.py
Browse files- page_files/Home.py +201 -122
page_files/Home.py
CHANGED
|
@@ -79,17 +79,24 @@ st.markdown("""
|
|
| 79 |
st.markdown("""
|
| 80 |
<style>
|
| 81 |
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');
|
|
|
|
| 82 |
/* Hide default Streamlit chrome */
|
| 83 |
.block-container { padding: 0 !important; max-width: 100% !important; background: #fff !important;}
|
| 84 |
[data-testid="stToolbar"],
|
| 85 |
[data-testid="stDecoration"],
|
| 86 |
[data-testid="stHeader"] { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
/* ── Search row ── */
|
| 88 |
/* Only target the search bar's horizontal block, not all columns */
|
| 89 |
.st-emotion-cache-y1l7l5 .st-emotion-cache-1permvm {
|
| 90 |
gap: 0 !important;
|
| 91 |
align-items: stretch !important;
|
| 92 |
}
|
|
|
|
| 93 |
.st-emotion-cache-16s2yzk button {
|
| 94 |
background: #f2f6f4 !important;
|
| 95 |
border: 1.5px solid #d0d8d4 !important;
|
|
@@ -104,6 +111,7 @@ st.markdown("""
|
|
| 104 |
white-space: nowrap !important;
|
| 105 |
box-shadow: none !important;
|
| 106 |
}
|
|
|
|
| 107 |
.st-emotion-cache-4dubyl [data-baseweb="input"] {
|
| 108 |
background: #000 !important;
|
| 109 |
height: 46px !important;
|
|
@@ -125,7 +133,9 @@ st.markdown("""
|
|
| 125 |
box-shadow: none !important;
|
| 126 |
padding-left: 18px !important;
|
| 127 |
}
|
|
|
|
| 128 |
.st-emotion-cache-4dubyl > div {
|
|
|
|
| 129 |
height: 46px !important;
|
| 130 |
}
|
| 131 |
.st-emotion-cache-4dubyl input::placeholder {
|
|
@@ -145,6 +155,7 @@ st.markdown("""
|
|
| 145 |
padding: 0 28px !important;
|
| 146 |
box-shadow: none !important;
|
| 147 |
}
|
|
|
|
| 148 |
.st-key-view_all_btn button {
|
| 149 |
background: transparent !important;
|
| 150 |
border: none !important;
|
|
@@ -172,47 +183,11 @@ st.markdown("""
|
|
| 172 |
margin-bottom: 14px;
|
| 173 |
font-family: 'DM Sans', sans-serif;
|
| 174 |
}
|
|
|
|
| 175 |
</style>
|
| 176 |
""", unsafe_allow_html=True)
|
| 177 |
|
| 178 |
|
| 179 |
-
|
| 180 |
-
# Card click navigation handler
|
| 181 |
-
_nav = st.query_params.get("nav", None)
|
| 182 |
-
if _nav == "upload":
|
| 183 |
-
st.query_params.clear()
|
| 184 |
-
st.switch_page("page_files/Upload_Data.py")
|
| 185 |
-
elif _nav == "search":
|
| 186 |
-
st.query_params.clear()
|
| 187 |
-
st.switch_page("page_files/Categorized_Search.py")
|
| 188 |
-
|
| 189 |
-
# PostMessage listener for iframe card clicks
|
| 190 |
-
components.html("""
|
| 191 |
-
<script>
|
| 192 |
-
window.addEventListener('message', function(e) {
|
| 193 |
-
if (e.data && e.data.type === 'streamlit:setComponentValue') {
|
| 194 |
-
// Write to a hidden input Streamlit can read via query params
|
| 195 |
-
const val = e.data.value;
|
| 196 |
-
window.parent.location.href = window.parent.location.href.split('?')[0] + '?card=' + val;
|
| 197 |
-
}
|
| 198 |
-
});
|
| 199 |
-
</script>
|
| 200 |
-
""", height=0)
|
| 201 |
-
|
| 202 |
-
# Check query param for card navigation
|
| 203 |
-
import urllib.parse
|
| 204 |
-
try:
|
| 205 |
-
_qp = st.query_params
|
| 206 |
-
if "card" in _qp:
|
| 207 |
-
_card_val = _qp["card"]
|
| 208 |
-
st.query_params.clear()
|
| 209 |
-
if _card_val == "upload":
|
| 210 |
-
st.switch_page("page_files/Upload_Data.py")
|
| 211 |
-
elif _card_val == "search":
|
| 212 |
-
st.switch_page("page_files/Categorized_Search.py")
|
| 213 |
-
except Exception:
|
| 214 |
-
pass
|
| 215 |
-
|
| 216 |
# Helper
|
| 217 |
def go_categorized(material=None, search=None):
|
| 218 |
if material:
|
|
@@ -248,6 +223,7 @@ components.html(f"""
|
|
| 248 |
<style>
|
| 249 |
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 250 |
body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26; overflow-x: hidden; }}
|
|
|
|
| 251 |
/* ANIMATION SECTION */
|
| 252 |
.anim-section {{
|
| 253 |
background: #000;
|
|
@@ -263,6 +239,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 263 |
display: flex; align-items: center;
|
| 264 |
justify-content: space-between; padding: 0 40px;
|
| 265 |
}}
|
|
|
|
| 266 |
/* MAG GLASS */
|
| 267 |
.mag-wrap {{ position: relative; width: 100px; display: flex; flex-direction: column; align-items: center; }}
|
| 268 |
.mag-label {{ font-size: 0.65rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #4a7a6a; margin-bottom: 10px; }}
|
|
@@ -273,6 +250,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 273 |
.mag-scan {{ opacity: 0; transition: opacity 0.3s ease 0.8s; }}
|
| 274 |
.mag-wrap.active .mag-scan {{ opacity: 1; animation: scanMove 1.2s ease-in-out infinite 0.8s; }}
|
| 275 |
@keyframes scanMove {{ 0% {{ transform:translateY(-14px);opacity:.8; }} 50% {{ transform:translateY(0);opacity:1; }} 100% {{ transform:translateY(14px);opacity:.8; }} }}
|
|
|
|
| 276 |
/* BUBBLES */
|
| 277 |
.bubble {{ position:absolute; border-radius:50%; background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.6),rgba(80,160,255,.25)); border:1px solid rgba(100,180,255,.4); opacity:0; pointer-events:none; backdrop-filter:blur(2px); }}
|
| 278 |
.b1 {{ width:18px;height:18px;left:108px;bottom:155px; }}
|
|
@@ -293,6 +271,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 293 |
@keyframes floatBubble4 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.3); }} 20% {{ opacity:1;transform:translate(-8px,-35px) scale(1); }} 65% {{ opacity:.8;transform:translate(105px,-80px) scale(.8); }} 88% {{ opacity:.3;transform:translate(255px,-50px) scale(.4); }} 100% {{ opacity:0;transform:translate(320px,-20px) scale(.1); }} }}
|
| 294 |
@keyframes floatBubble5 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.4); }} 15% {{ opacity:1;transform:translate(3px,-22px) scale(1); }} 58% {{ opacity:.9;transform:translate(115px,-60px) scale(.88); }} 83% {{ opacity:.45;transform:translate(270px,-35px) scale(.55); }} 100% {{ opacity:0;transform:translate(335px,-12px) scale(.2); }} }}
|
| 295 |
@keyframes floatBubble6 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.25); }} 20% {{ opacity:1;transform:translate(-3px,-40px) scale(1); }} 62% {{ opacity:.7;transform:translate(100px,-85px) scale(.75); }} 85% {{ opacity:.25;transform:translate(250px,-55px) scale(.35); }} 100% {{ opacity:0;transform:translate(318px,-22px) scale(.1); }} }}
|
|
|
|
| 296 |
/* DATABASE */
|
| 297 |
.db-wrap {{ position:relative;width:130px;display:flex;flex-direction:column;align-items:center; }}
|
| 298 |
.db-label {{ font-size:.65rem;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:#4a7a6a;margin-bottom:10px; }}
|
|
@@ -301,6 +280,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 301 |
.anim-stage.active .cyl-right {{ opacity:1;transition-delay:2.2s; }}
|
| 302 |
.anim-stage.active .cyl-front {{ opacity:1;transition-delay:2.4s;animation:frontPulse 2.4s ease-in-out infinite 2.8s; }}
|
| 303 |
@keyframes frontPulse {{ 0%,100% {{ filter:brightness(1); }} 50% {{ filter:brightness(1.2); }} }}
|
|
|
|
| 304 |
/* CAPTION */
|
| 305 |
.anim-caption {{ margin-top:48px;display:flex;gap:40px;align-items:center; }}
|
| 306 |
.anim-step {{ display:flex;align-items:center;gap:10px;opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease; }}
|
|
@@ -310,6 +290,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 310 |
.step-text {{ font-size:.78rem;color:#5a8a7a;font-weight:500; }}
|
| 311 |
</style>
|
| 312 |
</head><body>
|
|
|
|
| 313 |
<section class="anim-section">
|
| 314 |
<h2 class="anim-title">From Experiment to Database</h2>
|
| 315 |
<div class="anim-stage" id="animStage">
|
|
@@ -401,6 +382,7 @@ body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26;
|
|
| 401 |
<div class="anim-step"><span class="step-text">Stored in AIM</span></div>
|
| 402 |
</div>
|
| 403 |
</section>
|
|
|
|
| 404 |
<script>
|
| 405 |
const stage = document.getElementById('animStage');
|
| 406 |
const magWrap = document.getElementById('magWrap');
|
|
@@ -418,7 +400,39 @@ observer.observe(document.querySelector('.anim-section'));
|
|
| 418 |
</body></html>
|
| 419 |
""", height=700, scrolling=False)
|
| 420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
|
|
|
|
|
|
| 422 |
# 4. STATS (static HTML)
|
| 423 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 424 |
st.markdown(f"""
|
|
@@ -519,92 +533,153 @@ st.markdown("""
|
|
| 519 |
|
| 520 |
|
| 521 |
# Showcase section - Databricks style
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
"<p class=\"showcase-sub\">Access a centralized, open-source database for experimental "
|
| 528 |
-
"composite material properties. Polymer, fiber, and composite datasets, all in one place.</p>"
|
| 529 |
-
"</div>"
|
| 530 |
-
)
|
| 531 |
-
extract_card = (
|
| 532 |
-
"<div class=\"s-card\" onclick=\"window.parent.location.href='?nav=upload'\">"
|
| 533 |
-
"<img class=\"s-card-img\" src=\"" + extract_b64 + "\" alt=\"Extract Data\"/>"
|
| 534 |
-
"<div class=\"s-card-body\">"
|
| 535 |
-
"<div class=\"s-card-title\">Extract Data</div>"
|
| 536 |
-
"<p class=\"s-card-desc\">Upload experimental datasets and extract structured material property data into the AIM database.</p>"
|
| 537 |
-
"<span class=\"s-card-link\">Open platform →</span>"
|
| 538 |
-
"</div></div>"
|
| 539 |
-
)
|
| 540 |
-
search_card = (
|
| 541 |
-
"<div class=\"s-card\" onclick=\"window.parent.location.href='?nav=search'\">"
|
| 542 |
-
"<img class=\"s-card-img\" src=\"" + search_b64 + "\" alt=\"Search\"/>"
|
| 543 |
-
"<div class=\"s-card-body\">"
|
| 544 |
-
"<div class=\"s-card-title\">Search</div>"
|
| 545 |
-
"<p class=\"s-card-desc\">Browse and filter polymer, fiber, and composite material properties across the full database.</p>"
|
| 546 |
-
"<span class=\"s-card-link\">Open search →</span>"
|
| 547 |
-
"</div></div>"
|
| 548 |
-
)
|
| 549 |
-
css = (
|
| 550 |
-
"<style>"
|
| 551 |
-
"*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}"
|
| 552 |
-
"body{font-family:'DM Sans',sans-serif;background:#fff;}"
|
| 553 |
-
".showcase-wrap{display:flex;align-items:flex-start;gap:48px;padding:64px 60px;background:#fff;}"
|
| 554 |
-
".showcase-left{flex:0 0 280px;padding-top:16px;}"
|
| 555 |
-
".showcase-label{font-size:.68rem;font-weight:700;letter-spacing:1.8px;text-transform:uppercase;color:#8ACAFF;margin-bottom:14px;}"
|
| 556 |
-
".showcase-heading{font-size:2rem;font-weight:800;color:#0f1f1a;letter-spacing:-1px;line-height:1.15;margin-bottom:16px;}"
|
| 557 |
-
".showcase-sub{color:#5a6b65;font-size:.93rem;line-height:1.7;}"
|
| 558 |
-
".showcase-cards{flex:1;display:flex;gap:20px;}"
|
| 559 |
-
".s-card{flex:1;border-radius:16px;overflow:hidden;background:#0f1f1a;border:1.5px solid #1e3a30;"
|
| 560 |
-
"box-shadow:0 4px 20px rgba(0,0,0,.10);display:flex;flex-direction:column;"
|
| 561 |
-
"cursor:pointer;transition:box-shadow .2s,border-color .2s,transform .2s;}"
|
| 562 |
-
".s-card:hover{box-shadow:0 8px 32px rgba(138,202,255,.18);border-color:#8ACAFF;transform:translateY(-3px);}"
|
| 563 |
-
".s-card-img{width:100%;height:220px;object-fit:contain;object-position:top center;"
|
| 564 |
-
"display:block;background:#fff;border-bottom:1px solid #1e3a30;}"
|
| 565 |
-
".s-card-body{padding:20px 22px 24px;flex:1;display:flex;flex-direction:column;}"
|
| 566 |
-
".s-card-title{font-size:1.1rem;font-weight:700;color:#fff;margin-bottom:8px;}"
|
| 567 |
-
".s-card-desc{font-size:.83rem;color:#7a9e8f;line-height:1.6;flex:1;margin-bottom:16px;}"
|
| 568 |
-
".s-card-link{font-size:.83rem;font-weight:600;color:#8ACAFF;}"
|
| 569 |
-
"</style>"
|
| 570 |
-
)
|
| 571 |
-
return (
|
| 572 |
-
"<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"/>"
|
| 573 |
-
"<link href=\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap\" rel=\"stylesheet\">"
|
| 574 |
-
+ css +
|
| 575 |
-
"</head><body>"
|
| 576 |
-
"<div class=\"showcase-wrap\">"
|
| 577 |
-
+ left +
|
| 578 |
-
"<div class=\"showcase-cards\">"
|
| 579 |
-
+ extract_card + search_card +
|
| 580 |
-
"</div></div>"
|
| 581 |
-
"</body></html>"
|
| 582 |
-
)
|
| 583 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 584 |
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
st.switch_page("page_files/Categorized_Search.py")
|
| 593 |
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 604 |
</style>
|
| 605 |
-
|
| 606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 607 |
|
|
|
|
|
|
|
| 608 |
|
| 609 |
|
| 610 |
|
|
@@ -620,6 +695,7 @@ components.html(f"""
|
|
| 620 |
<style>
|
| 621 |
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 622 |
body {{ font-family: 'DM Sans', sans-serif; color: #1a2e26; }}
|
|
|
|
| 623 |
.aim-about {{ background: #fff; padding: 60px; border-bottom: 1px solid #e8e8e4; }}
|
| 624 |
.aim-about h2 {{ font-size: 1.65rem; font-weight: 700; color: #0f1f1a; letter-spacing: -0.5px; margin-bottom: 8px; }}
|
| 625 |
.aim-about-sub {{ color: #6a7e77; font-size: 0.9rem; margin-bottom: 30px; }}
|
|
@@ -632,11 +708,13 @@ body {{ font-family: 'DM Sans', sans-serif; color: #1a2e26; }}
|
|
| 632 |
display: flex; align-items: center; justify-content: center;
|
| 633 |
color: #7a9e8f; font-size: 0.85rem; border: 1.5px dashed #c8d6d0;
|
| 634 |
}}
|
|
|
|
| 635 |
.aim-footer {{ background: #fff; border-top: 1px solid #e8e8e4; padding: 50px 60px 28px; }}
|
| 636 |
.aim-footer-brand {{ display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f1f1a; font-size: 0.95rem; margin-bottom: 10px; }}
|
| 637 |
.aim-footer-desc {{ font-size: 0.82rem; color: #7a8e87; line-height: 1.6; }}
|
| 638 |
</style>
|
| 639 |
</head><body>
|
|
|
|
| 640 |
<section class="aim-about">
|
| 641 |
<h2>About the Platform</h2>
|
| 642 |
<p class="aim-about-sub">Artificially Intelligent Manufacturing Paradigm (AIM) for Composites</p>
|
|
@@ -656,6 +734,9 @@ body {{ font-family: 'DM Sans', sans-serif; color: #1a2e26; }}
|
|
| 656 |
<div>{about_img_html}</div>
|
| 657 |
</div>
|
| 658 |
</section>
|
|
|
|
|
|
|
|
|
|
| 659 |
</body></html>
|
| 660 |
""", height=550, scrolling=False)
|
| 661 |
|
|
@@ -721,6 +802,7 @@ div[data-testid="stHorizontalBlock"]:has(.footer-nav-head) {
|
|
| 721 |
.st-emotion-cache-1qeq59m:hover p {
|
| 722 |
color: #8ACAFF !important;
|
| 723 |
}
|
|
|
|
| 724 |
/* copyright bar */
|
| 725 |
.aim-footer-bottom {
|
| 726 |
background: #fff;
|
|
@@ -730,6 +812,7 @@ div[data-testid="stHorizontalBlock"]:has(.footer-nav-head) {
|
|
| 730 |
color: #a0b0aa;
|
| 731 |
font-family: 'DM Sans', sans-serif;
|
| 732 |
}
|
|
|
|
| 733 |
</style>
|
| 734 |
""", unsafe_allow_html=True)
|
| 735 |
|
|
@@ -762,8 +845,4 @@ with _:
|
|
| 762 |
st.page_link(
|
| 763 |
"page_files/Contact_Team.py",
|
| 764 |
label="Contact Team",
|
| 765 |
-
)
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
|
|
|
| 79 |
st.markdown("""
|
| 80 |
<style>
|
| 81 |
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');
|
| 82 |
+
|
| 83 |
/* Hide default Streamlit chrome */
|
| 84 |
.block-container { padding: 0 !important; max-width: 100% !important; background: #fff !important;}
|
| 85 |
[data-testid="stToolbar"],
|
| 86 |
[data-testid="stDecoration"],
|
| 87 |
[data-testid="stHeader"] { display: none !important; }
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
|
| 93 |
/* ── Search row ── */
|
| 94 |
/* Only target the search bar's horizontal block, not all columns */
|
| 95 |
.st-emotion-cache-y1l7l5 .st-emotion-cache-1permvm {
|
| 96 |
gap: 0 !important;
|
| 97 |
align-items: stretch !important;
|
| 98 |
}
|
| 99 |
+
|
| 100 |
.st-emotion-cache-16s2yzk button {
|
| 101 |
background: #f2f6f4 !important;
|
| 102 |
border: 1.5px solid #d0d8d4 !important;
|
|
|
|
| 111 |
white-space: nowrap !important;
|
| 112 |
box-shadow: none !important;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
.st-emotion-cache-4dubyl [data-baseweb="input"] {
|
| 116 |
background: #000 !important;
|
| 117 |
height: 46px !important;
|
|
|
|
| 133 |
box-shadow: none !important;
|
| 134 |
padding-left: 18px !important;
|
| 135 |
}
|
| 136 |
+
|
| 137 |
.st-emotion-cache-4dubyl > div {
|
| 138 |
+
|
| 139 |
height: 46px !important;
|
| 140 |
}
|
| 141 |
.st-emotion-cache-4dubyl input::placeholder {
|
|
|
|
| 155 |
padding: 0 28px !important;
|
| 156 |
box-shadow: none !important;
|
| 157 |
}
|
| 158 |
+
|
| 159 |
.st-key-view_all_btn button {
|
| 160 |
background: transparent !important;
|
| 161 |
border: none !important;
|
|
|
|
| 183 |
margin-bottom: 14px;
|
| 184 |
font-family: 'DM Sans', sans-serif;
|
| 185 |
}
|
| 186 |
+
|
| 187 |
</style>
|
| 188 |
""", unsafe_allow_html=True)
|
| 189 |
|
| 190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
# Helper
|
| 192 |
def go_categorized(material=None, search=None):
|
| 193 |
if material:
|
|
|
|
| 223 |
<style>
|
| 224 |
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 225 |
body {{ font-family: 'DM Sans', sans-serif; background: #f7f7f5; color: #1a2e26; overflow-x: hidden; }}
|
| 226 |
+
|
| 227 |
/* ANIMATION SECTION */
|
| 228 |
.anim-section {{
|
| 229 |
background: #000;
|
|
|
|
| 239 |
display: flex; align-items: center;
|
| 240 |
justify-content: space-between; padding: 0 40px;
|
| 241 |
}}
|
| 242 |
+
|
| 243 |
/* MAG GLASS */
|
| 244 |
.mag-wrap {{ position: relative; width: 100px; display: flex; flex-direction: column; align-items: center; }}
|
| 245 |
.mag-label {{ font-size: 0.65rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #4a7a6a; margin-bottom: 10px; }}
|
|
|
|
| 250 |
.mag-scan {{ opacity: 0; transition: opacity 0.3s ease 0.8s; }}
|
| 251 |
.mag-wrap.active .mag-scan {{ opacity: 1; animation: scanMove 1.2s ease-in-out infinite 0.8s; }}
|
| 252 |
@keyframes scanMove {{ 0% {{ transform:translateY(-14px);opacity:.8; }} 50% {{ transform:translateY(0);opacity:1; }} 100% {{ transform:translateY(14px);opacity:.8; }} }}
|
| 253 |
+
|
| 254 |
/* BUBBLES */
|
| 255 |
.bubble {{ position:absolute; border-radius:50%; background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.6),rgba(80,160,255,.25)); border:1px solid rgba(100,180,255,.4); opacity:0; pointer-events:none; backdrop-filter:blur(2px); }}
|
| 256 |
.b1 {{ width:18px;height:18px;left:108px;bottom:155px; }}
|
|
|
|
| 271 |
@keyframes floatBubble4 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.3); }} 20% {{ opacity:1;transform:translate(-8px,-35px) scale(1); }} 65% {{ opacity:.8;transform:translate(105px,-80px) scale(.8); }} 88% {{ opacity:.3;transform:translate(255px,-50px) scale(.4); }} 100% {{ opacity:0;transform:translate(320px,-20px) scale(.1); }} }}
|
| 272 |
@keyframes floatBubble5 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.4); }} 15% {{ opacity:1;transform:translate(3px,-22px) scale(1); }} 58% {{ opacity:.9;transform:translate(115px,-60px) scale(.88); }} 83% {{ opacity:.45;transform:translate(270px,-35px) scale(.55); }} 100% {{ opacity:0;transform:translate(335px,-12px) scale(.2); }} }}
|
| 273 |
@keyframes floatBubble6 {{ 0% {{ opacity:0;transform:translate(0,0) scale(.25); }} 20% {{ opacity:1;transform:translate(-3px,-40px) scale(1); }} 62% {{ opacity:.7;transform:translate(100px,-85px) scale(.75); }} 85% {{ opacity:.25;transform:translate(250px,-55px) scale(.35); }} 100% {{ opacity:0;transform:translate(318px,-22px) scale(.1); }} }}
|
| 274 |
+
|
| 275 |
/* DATABASE */
|
| 276 |
.db-wrap {{ position:relative;width:130px;display:flex;flex-direction:column;align-items:center; }}
|
| 277 |
.db-label {{ font-size:.65rem;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:#4a7a6a;margin-bottom:10px; }}
|
|
|
|
| 280 |
.anim-stage.active .cyl-right {{ opacity:1;transition-delay:2.2s; }}
|
| 281 |
.anim-stage.active .cyl-front {{ opacity:1;transition-delay:2.4s;animation:frontPulse 2.4s ease-in-out infinite 2.8s; }}
|
| 282 |
@keyframes frontPulse {{ 0%,100% {{ filter:brightness(1); }} 50% {{ filter:brightness(1.2); }} }}
|
| 283 |
+
|
| 284 |
/* CAPTION */
|
| 285 |
.anim-caption {{ margin-top:48px;display:flex;gap:40px;align-items:center; }}
|
| 286 |
.anim-step {{ display:flex;align-items:center;gap:10px;opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease; }}
|
|
|
|
| 290 |
.step-text {{ font-size:.78rem;color:#5a8a7a;font-weight:500; }}
|
| 291 |
</style>
|
| 292 |
</head><body>
|
| 293 |
+
|
| 294 |
<section class="anim-section">
|
| 295 |
<h2 class="anim-title">From Experiment to Database</h2>
|
| 296 |
<div class="anim-stage" id="animStage">
|
|
|
|
| 382 |
<div class="anim-step"><span class="step-text">Stored in AIM</span></div>
|
| 383 |
</div>
|
| 384 |
</section>
|
| 385 |
+
|
| 386 |
<script>
|
| 387 |
const stage = document.getElementById('animStage');
|
| 388 |
const magWrap = document.getElementById('magWrap');
|
|
|
|
| 400 |
</body></html>
|
| 401 |
""", height=700, scrolling=False)
|
| 402 |
|
| 403 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 404 |
+
# 2. HERO , heading + description (static HTML)
|
| 405 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 406 |
+
st.markdown("""
|
| 407 |
+
<style>
|
| 408 |
+
.aim-hero-text {
|
| 409 |
+
background: #fff;
|
| 410 |
+
text-align: center;
|
| 411 |
+
padding: 64px 40px 24px;
|
| 412 |
+
border-bottom: none;
|
| 413 |
+
}
|
| 414 |
+
.aim-hero-text h1 {
|
| 415 |
+
font-family: 'DM Sans', sans-serif;
|
| 416 |
+
font-size: clamp(2rem, 4.5vw, 3.2rem);
|
| 417 |
+
font-weight: 800; color: #0f1f1a;
|
| 418 |
+
line-height: 1.1; letter-spacing: -1.5px;
|
| 419 |
+
margin-bottom: 18px;
|
| 420 |
+
}
|
| 421 |
+
.aim-hero-text p {
|
| 422 |
+
color: #5a6b65; font-size: 1rem; line-height: 1.65;
|
| 423 |
+
max-width: 500px; margin: 0 auto 28px;
|
| 424 |
+
}
|
| 425 |
+
</style>
|
| 426 |
+
<div class="aim-hero-text">
|
| 427 |
+
<h1>Accelerate Your Composites Research</h1>
|
| 428 |
+
<p>Access a centralized, open-source database for experimental composite material properties.
|
| 429 |
+
Polymer, fiber, and composite datasets , all in one place.</p>
|
| 430 |
+
</div>
|
| 431 |
+
""", unsafe_allow_html=True)
|
| 432 |
+
|
| 433 |
|
| 434 |
+
|
| 435 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 436 |
# 4. STATS (static HTML)
|
| 437 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 438 |
st.markdown(f"""
|
|
|
|
| 533 |
|
| 534 |
|
| 535 |
# Showcase section - Databricks style
|
| 536 |
+
# Cards rendered in components.html so image+text+click all live inside one card
|
| 537 |
+
_extract_img = extract_card_img
|
| 538 |
+
_search_img = search_card_img
|
| 539 |
+
extract_page_link = st.page_link("page_files/Upload_Data.py")
|
| 540 |
+
search_page_link = st.page_link("page_files/Categorized_Search.py")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
|
| 542 |
+
components.html(f"""
|
| 543 |
+
<!DOCTYPE html><html lang="en"><head>
|
| 544 |
+
<meta charset="UTF-8"/>
|
| 545 |
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
| 546 |
+
<style>
|
| 547 |
+
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 548 |
+
body {{ font-family: 'DM Sans', sans-serif; background: #fff; }}
|
| 549 |
|
| 550 |
+
.showcase-wrap {{
|
| 551 |
+
display: flex;
|
| 552 |
+
align-items: flex-start;
|
| 553 |
+
gap: 48px;
|
| 554 |
+
padding: 64px 60px 64px;
|
| 555 |
+
background: #fff;
|
| 556 |
+
}}
|
|
|
|
| 557 |
|
| 558 |
+
/* LEFT TEXT */
|
| 559 |
+
.showcase-left {{
|
| 560 |
+
flex: 0 0 320px;
|
| 561 |
+
padding-top: 16px;
|
| 562 |
+
}}
|
| 563 |
+
.showcase-label {{
|
| 564 |
+
font-size: 0.68rem;
|
| 565 |
+
font-weight: 700;
|
| 566 |
+
letter-spacing: 1.8px;
|
| 567 |
+
text-transform: uppercase;
|
| 568 |
+
color: #8ACAFF;
|
| 569 |
+
margin-bottom: 14px;
|
| 570 |
+
}}
|
| 571 |
+
.showcase-heading {{
|
| 572 |
+
font-size: clamp(1.8rem, 3vw, 2.4rem);
|
| 573 |
+
font-weight: 800;
|
| 574 |
+
color: #0f1f1a;
|
| 575 |
+
letter-spacing: -1px;
|
| 576 |
+
line-height: 1.15;
|
| 577 |
+
margin-bottom: 16px;
|
| 578 |
+
}}
|
| 579 |
+
.showcase-sub {{
|
| 580 |
+
color: #5a6b65;
|
| 581 |
+
font-size: 0.93rem;
|
| 582 |
+
line-height: 1.7;
|
| 583 |
+
}}
|
| 584 |
+
|
| 585 |
+
/* RIGHT CARDS */
|
| 586 |
+
.showcase-cards {{
|
| 587 |
+
flex: 1;
|
| 588 |
+
display: flex;
|
| 589 |
+
gap: 20px;
|
| 590 |
+
}}
|
| 591 |
+
.s-card {{
|
| 592 |
+
flex: 1;
|
| 593 |
+
border-radius: 16px;
|
| 594 |
+
overflow: hidden;
|
| 595 |
+
background: #0f1f1a;
|
| 596 |
+
border: 1.5px solid #1e3a30;
|
| 597 |
+
box-shadow: 0 4px 20px rgba(0,0,0,0.10);
|
| 598 |
+
text-decoration: none;
|
| 599 |
+
display: flex;
|
| 600 |
+
flex-direction: column;
|
| 601 |
+
transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
|
| 602 |
+
cursor: pointer;
|
| 603 |
+
}}
|
| 604 |
+
.s-card:hover {{
|
| 605 |
+
box-shadow: 0 8px 32px rgba(138,202,255,0.18);
|
| 606 |
+
border-color: #8ACAFF;
|
| 607 |
+
transform: translateY(-3px);
|
| 608 |
+
}}
|
| 609 |
+
.s-card-img {{
|
| 610 |
+
width: 100%;
|
| 611 |
+
height: 200px;
|
| 612 |
+
object-fit: cover;
|
| 613 |
+
object-position: top left;
|
| 614 |
+
display: block;
|
| 615 |
+
border-bottom: 1px solid #1e3a30;
|
| 616 |
+
}}
|
| 617 |
+
.s-card-body {{
|
| 618 |
+
padding: 22px 22px 26px;
|
| 619 |
+
flex: 1;
|
| 620 |
+
display: flex;
|
| 621 |
+
flex-direction: column;
|
| 622 |
+
}}
|
| 623 |
+
.s-card-title {{
|
| 624 |
+
font-size: 1.15rem;
|
| 625 |
+
font-weight: 700;
|
| 626 |
+
color: #fff;
|
| 627 |
+
margin-bottom: 8px;
|
| 628 |
+
letter-spacing: -0.3px;
|
| 629 |
+
}}
|
| 630 |
+
.s-card-desc {{
|
| 631 |
+
font-size: 0.85rem;
|
| 632 |
+
color: #7a9e8f;
|
| 633 |
+
line-height: 1.6;
|
| 634 |
+
flex: 1;
|
| 635 |
+
margin-bottom: 18px;
|
| 636 |
+
}}
|
| 637 |
+
.s-card-link {{
|
| 638 |
+
font-size: 0.85rem;
|
| 639 |
+
font-weight: 600;
|
| 640 |
+
color: #8ACAFF;
|
| 641 |
+
text-decoration: none;
|
| 642 |
+
display: inline-flex;
|
| 643 |
+
align-items: center;
|
| 644 |
+
gap: 6px;
|
| 645 |
+
}}
|
| 646 |
+
.s-card-link::after {{
|
| 647 |
+
content: "\2192";
|
| 648 |
+
}}
|
| 649 |
</style>
|
| 650 |
+
</head><body>
|
| 651 |
|
| 652 |
+
<div class="showcase-wrap">
|
| 653 |
+
<div class="showcase-left">
|
| 654 |
+
<div class="showcase-label">Platform Features</div>
|
| 655 |
+
<div class="showcase-heading">Accelerate Your Composites Research</div>
|
| 656 |
+
<p class="showcase-sub">Access a centralized, open-source database for experimental composite
|
| 657 |
+
material properties. Polymer, fiber, and composite datasets, all in one place.</p>
|
| 658 |
+
</div>
|
| 659 |
+
|
| 660 |
+
<div class="showcase-cards">
|
| 661 |
+
<a class="s-card" href="{extract_page_link}" target="_self">
|
| 662 |
+
<img class="s-card-img" src="{_extract_img}" alt="Extract Data"/>
|
| 663 |
+
<div class="s-card-body">
|
| 664 |
+
<div class="s-card-title">Extract Data</div>
|
| 665 |
+
<p class="s-card-desc">Upload experimental datasets and extract structured material property data into the AIM database.</p>
|
| 666 |
+
<span class="s-card-link">Open platform</span>
|
| 667 |
+
</div>
|
| 668 |
+
</a>
|
| 669 |
+
|
| 670 |
+
<a class="s-card" href="{search_page_link}" target="_self">
|
| 671 |
+
<img class="s-card-img" src="{_search_img}" alt="Search"/>
|
| 672 |
+
<div class="s-card-body">
|
| 673 |
+
<div class="s-card-title">Search</div>
|
| 674 |
+
<p class="s-card-desc">Browse and filter polymer, fiber, and composite material properties across the full database.</p>
|
| 675 |
+
<span class="s-card-link">Open search</span>
|
| 676 |
+
</div>
|
| 677 |
+
</a>
|
| 678 |
+
</div>
|
| 679 |
+
</div>
|
| 680 |
|
| 681 |
+
</body></html>
|
| 682 |
+
""", height=420, scrolling=False)
|
| 683 |
|
| 684 |
|
| 685 |
|
|
|
|
| 695 |
<style>
|
| 696 |
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 697 |
body {{ font-family: 'DM Sans', sans-serif; color: #1a2e26; }}
|
| 698 |
+
|
| 699 |
.aim-about {{ background: #fff; padding: 60px; border-bottom: 1px solid #e8e8e4; }}
|
| 700 |
.aim-about h2 {{ font-size: 1.65rem; font-weight: 700; color: #0f1f1a; letter-spacing: -0.5px; margin-bottom: 8px; }}
|
| 701 |
.aim-about-sub {{ color: #6a7e77; font-size: 0.9rem; margin-bottom: 30px; }}
|
|
|
|
| 708 |
display: flex; align-items: center; justify-content: center;
|
| 709 |
color: #7a9e8f; font-size: 0.85rem; border: 1.5px dashed #c8d6d0;
|
| 710 |
}}
|
| 711 |
+
|
| 712 |
.aim-footer {{ background: #fff; border-top: 1px solid #e8e8e4; padding: 50px 60px 28px; }}
|
| 713 |
.aim-footer-brand {{ display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f1f1a; font-size: 0.95rem; margin-bottom: 10px; }}
|
| 714 |
.aim-footer-desc {{ font-size: 0.82rem; color: #7a8e87; line-height: 1.6; }}
|
| 715 |
</style>
|
| 716 |
</head><body>
|
| 717 |
+
|
| 718 |
<section class="aim-about">
|
| 719 |
<h2>About the Platform</h2>
|
| 720 |
<p class="aim-about-sub">Artificially Intelligent Manufacturing Paradigm (AIM) for Composites</p>
|
|
|
|
| 734 |
<div>{about_img_html}</div>
|
| 735 |
</div>
|
| 736 |
</section>
|
| 737 |
+
|
| 738 |
+
|
| 739 |
+
|
| 740 |
</body></html>
|
| 741 |
""", height=550, scrolling=False)
|
| 742 |
|
|
|
|
| 802 |
.st-emotion-cache-1qeq59m:hover p {
|
| 803 |
color: #8ACAFF !important;
|
| 804 |
}
|
| 805 |
+
|
| 806 |
/* copyright bar */
|
| 807 |
.aim-footer-bottom {
|
| 808 |
background: #fff;
|
|
|
|
| 812 |
color: #a0b0aa;
|
| 813 |
font-family: 'DM Sans', sans-serif;
|
| 814 |
}
|
| 815 |
+
|
| 816 |
</style>
|
| 817 |
""", unsafe_allow_html=True)
|
| 818 |
|
|
|
|
| 845 |
st.page_link(
|
| 846 |
"page_files/Contact_Team.py",
|
| 847 |
label="Contact Team",
|
| 848 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|