Update page_files/Home.py
Browse files- page_files/Home.py +36 -187
page_files/Home.py
CHANGED
|
@@ -513,38 +513,14 @@ st.markdown("""
|
|
| 513 |
|
| 514 |
|
| 515 |
# Showcase section - Databricks style
|
| 516 |
-
_left, _card1, _card2 = st.columns([0.85, 1, 1])
|
| 517 |
-
|
| 518 |
-
with _left:
|
| 519 |
-
st.markdown("""
|
| 520 |
-
<div style="padding-top:32px;">
|
| 521 |
-
<div style="font-size:.68rem;font-weight:700;letter-spacing:1.8px;text-transform:uppercase;color:#8ACAFF;margin-bottom:14px;font-family:'DM Sans',sans-serif;">Platform Features</div>
|
| 522 |
-
<div style="font-size:2rem;font-weight:800;color:#0f1f1a;letter-spacing:-1px;line-height:1.15;margin-bottom:16px;font-family:'DM Sans',sans-serif;">Accelerate Your Composites Research</div>
|
| 523 |
-
<p style="color:#5a6b65;font-size:.93rem;line-height:1.7;font-family:'DM Sans',sans-serif;">Access a centralized, open-source database for experimental composite material properties. Polymer, fiber, and composite datasets, all in one place.</p>
|
| 524 |
-
</div>
|
| 525 |
-
""", unsafe_allow_html=True)
|
| 526 |
-
|
| 527 |
-
with _card1:
|
| 528 |
-
st.image(str(_ROOT / "extract_card_img.png"), use_container_width=True)
|
| 529 |
-
st.markdown("""
|
| 530 |
-
<div style="background:#0f1f1a;padding:16px 20px 8px;border:1.5px solid #1e3a30;border-top:none;border-bottom:none;">
|
| 531 |
-
<div style="font-size:1.05rem;font-weight:700;color:#fff;font-family:'DM Sans',sans-serif;">Extract Data</div>
|
| 532 |
-
<p style="font-size:.82rem;color:#7a9e8f;margin:6px 0 0;font-family:'DM Sans',sans-serif;">Upload experimental datasets and extract structured material property data into the AIM database.</p>
|
| 533 |
-
</div>
|
| 534 |
-
""", unsafe_allow_html=True)
|
| 535 |
-
if st.button("Open Extract Data", key="btn_extract", use_container_width=True):
|
| 536 |
-
st.switch_page("page_files/Upload_Data.py")
|
| 537 |
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
st.
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
""", unsafe_allow_html=True)
|
| 546 |
-
if st.button("Open Search", key="btn_search", use_container_width=True):
|
| 547 |
-
st.switch_page("page_files/Categorized_Search.py")
|
| 548 |
|
| 549 |
st.markdown("""
|
| 550 |
<style>
|
|
@@ -569,164 +545,37 @@ st.markdown("""
|
|
| 569 |
</style>
|
| 570 |
""", unsafe_allow_html=True)
|
| 571 |
|
| 572 |
-
|
| 573 |
-
# 6. ABOUT + FOOTER (static HTML)
|
| 574 |
-
# ══════════════════════════════════════════════════════════════════════════════
|
| 575 |
-
components.html(f"""
|
| 576 |
-
<!DOCTYPE html><html lang="en"><head>
|
| 577 |
-
<meta charset="UTF-8"/>
|
| 578 |
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
| 579 |
-
<style>
|
| 580 |
-
*, *::before, *::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
| 581 |
-
body {{ font-family: 'DM Sans', sans-serif; color: #1a2e26; }}
|
| 582 |
-
|
| 583 |
-
.aim-about {{ background: #fff; padding: 60px; border-bottom: 1px solid #e8e8e4; }}
|
| 584 |
-
.aim-about h2 {{ font-size: 1.65rem; font-weight: 700; color: #0f1f1a; letter-spacing: -0.5px; margin-bottom: 8px; }}
|
| 585 |
-
.aim-about-sub {{ color: #6a7e77; font-size: 0.9rem; margin-bottom: 30px; }}
|
| 586 |
-
.aim-about-grid {{ display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }}
|
| 587 |
-
.aim-about-text p {{ color: #3a4e47; font-size: 0.91rem; line-height: 1.75; margin-bottom: 14px; }}
|
| 588 |
-
.aim-about-img {{ border-radius: 10px; overflow: hidden; border: 1px solid #e4e8e5; }}
|
| 589 |
-
.aim-about-img img {{ width: 100%; display: block; }}
|
| 590 |
-
.aim-about-img-placeholder {{
|
| 591 |
-
background: #f0f5f3; border-radius: 10px; height: 280px;
|
| 592 |
-
display: flex; align-items: center; justify-content: center;
|
| 593 |
-
color: #7a9e8f; font-size: 0.85rem; border: 1.5px dashed #c8d6d0;
|
| 594 |
-
}}
|
| 595 |
-
|
| 596 |
-
.aim-footer {{ background: #fff; border-top: 1px solid #e8e8e4; padding: 50px 60px 28px; }}
|
| 597 |
-
.aim-footer-brand {{ display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f1f1a; font-size: 0.95rem; margin-bottom: 10px; }}
|
| 598 |
-
.aim-footer-desc {{ font-size: 0.82rem; color: #7a8e87; line-height: 1.6; }}
|
| 599 |
-
</style>
|
| 600 |
-
</head><body>
|
| 601 |
|
| 602 |
-
|
| 603 |
-
|
| 604 |
-
<
|
| 605 |
-
|
| 606 |
-
<div
|
| 607 |
-
|
| 608 |
-
collaboration and information exchange within the composite materials research community.
|
| 609 |
-
The platform enables researchers to contribute to a shared knowledge base by uploading
|
| 610 |
-
experimental datasets through secure terminals.</p>
|
| 611 |
-
<p>Users can submit specific measurements regarding mechanical properties, thermal behavior,
|
| 612 |
-
and rheology, alongside their published journal papers , ensuring that both raw data and
|
| 613 |
-
peer-reviewed findings are integrated into one cohesive system.</p>
|
| 614 |
-
<p>All contributed information is securely aggregated within a central cloud architecture,
|
| 615 |
-
allowing for efficient storage, organization, and retrieval across polymer, fiber, and
|
| 616 |
-
composite categories.</p>
|
| 617 |
-
</div>
|
| 618 |
-
<div>{about_img_html}</div>
|
| 619 |
</div>
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
</body></html>
|
| 625 |
-
""", height=550, scrolling=False)
|
| 626 |
-
|
| 627 |
-
st.markdown("""
|
| 628 |
-
<style>
|
| 629 |
-
|
| 630 |
-
/* Footer nav wrapper */
|
| 631 |
-
div[data-testid="stHorizontalBlock"]:has(.footer-nav-head) {
|
| 632 |
-
background: #fff !important;
|
| 633 |
-
border-bottom: 1px solid #e8e8e4 !important;
|
| 634 |
-
padding: 0 60px 28px !important;
|
| 635 |
-
margin-top: -16px !important;
|
| 636 |
-
|
| 637 |
-
}
|
| 638 |
-
.aim-footer-brand {
|
| 639 |
-
display: flex;
|
| 640 |
-
align-items: center;
|
| 641 |
-
gap: 8px;
|
| 642 |
-
font-weight: 700;
|
| 643 |
-
color: #0f1f1a;
|
| 644 |
-
font-size: 0.95rem;
|
| 645 |
-
margin-bottom: 10px;
|
| 646 |
-
font-family: 'DM Sans', sans-serif;
|
| 647 |
-
}
|
| 648 |
-
.aim-footer-desc {
|
| 649 |
-
font-size: 0.82rem;
|
| 650 |
-
color: #7a8e87;
|
| 651 |
-
line-height: 1.6;
|
| 652 |
-
font-family: 'DM Sans', sans-serif;
|
| 653 |
-
}
|
| 654 |
-
.footer-nav-head {
|
| 655 |
-
font-size: 0.68rem;
|
| 656 |
-
font-weight: 700;
|
| 657 |
-
letter-spacing: 1.4px;
|
| 658 |
-
text-transform: uppercase;
|
| 659 |
-
color: #0f1f1a;
|
| 660 |
-
margin-bottom: 14px;
|
| 661 |
-
font-family: 'DM Sans', sans-serif;
|
| 662 |
-
}
|
| 663 |
-
.st-emotion-cache-1ofqig9 {
|
| 664 |
-
background: transparent !important;
|
| 665 |
-
border: none !important;
|
| 666 |
-
padding: 0 !important;
|
| 667 |
-
}
|
| 668 |
-
.st-emotion-cache-1qeq59m {
|
| 669 |
-
background: transparent !important;
|
| 670 |
-
border: none !important;
|
| 671 |
-
text-decoration: none !important;
|
| 672 |
-
padding: 0 0 9px 0 !important;
|
| 673 |
-
display: block !important;
|
| 674 |
-
}
|
| 675 |
-
.st-emotion-cache-1qeq59m:hover {
|
| 676 |
-
background: transparent !important;
|
| 677 |
-
border: none !important;
|
| 678 |
-
}
|
| 679 |
-
.st-emotion-cache-1qeq59m p {
|
| 680 |
-
color: #6a7e77 !important;
|
| 681 |
-
font-family: 'DM Sans', sans-serif !important;
|
| 682 |
-
font-size: 0.83rem !important;
|
| 683 |
-
font-weight: 400 !important;
|
| 684 |
-
margin: 0 !important;
|
| 685 |
-
}
|
| 686 |
-
.st-emotion-cache-1qeq59m:hover p {
|
| 687 |
-
color: #8ACAFF !important;
|
| 688 |
-
}
|
| 689 |
-
|
| 690 |
-
/* copyright bar */
|
| 691 |
-
.aim-footer-bottom {
|
| 692 |
-
background: #fff;
|
| 693 |
-
border-top: 1px solid #e8e8e4;
|
| 694 |
-
padding: 22px 60px;
|
| 695 |
-
font-size: 0.76rem;
|
| 696 |
-
color: #a0b0aa;
|
| 697 |
-
font-family: 'DM Sans', sans-serif;
|
| 698 |
-
}
|
| 699 |
-
|
| 700 |
-
</style>
|
| 701 |
-
""", unsafe_allow_html=True)
|
| 702 |
-
|
| 703 |
-
brand_col, db_col, sup_col, _ = st.columns([4, 2, 2, 2], vertical_alignment="top", width="stretch")
|
| 704 |
|
| 705 |
-
with
|
| 706 |
-
st.
|
| 707 |
-
|
| 708 |
-
<
|
| 709 |
-
|
|
|
|
|
|
|
| 710 |
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
| 711 |
|
| 712 |
-
with
|
| 713 |
-
st.
|
| 714 |
-
st.
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
|
| 723 |
-
"page_files/Upload_Data.py",
|
| 724 |
-
label="Upload Data",
|
| 725 |
-
)
|
| 726 |
-
|
| 727 |
-
with _:
|
| 728 |
-
st.markdown('<p class="footer-nav-head">SUPPORT</p>', unsafe_allow_html=True)
|
| 729 |
-
st.page_link(
|
| 730 |
-
"page_files/Contact_Team.py",
|
| 731 |
-
label="Contact Team",
|
| 732 |
-
)
|
|
|
|
| 513 |
|
| 514 |
|
| 515 |
# Showcase section - Databricks style
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 516 |
|
| 517 |
+
# Handle navigation via session state — avoids toggle on re-render
|
| 518 |
+
if st.session_state.get("_go_extract"):
|
| 519 |
+
st.session_state["_go_extract"] = False
|
| 520 |
+
st.switch_page("page_files/Upload_Data.py")
|
| 521 |
+
if st.session_state.get("_go_search"):
|
| 522 |
+
st.session_state["_go_search"] = False
|
| 523 |
+
st.switch_page("page_files/Categorized_Search.py")
|
|
|
|
|
|
|
|
|
|
| 524 |
|
| 525 |
st.markdown("""
|
| 526 |
<style>
|
|
|
|
| 545 |
</style>
|
| 546 |
""", unsafe_allow_html=True)
|
| 547 |
|
| 548 |
+
_left, _card1, _card2 = st.columns([0.85, 1, 1])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 549 |
|
| 550 |
+
with _left:
|
| 551 |
+
st.markdown("""
|
| 552 |
+
<div style="padding-top:32px;">
|
| 553 |
+
<div style="font-size:.68rem;font-weight:700;letter-spacing:1.8px;text-transform:uppercase;color:#8ACAFF;margin-bottom:14px;font-family:'DM Sans',sans-serif;">Platform Features</div>
|
| 554 |
+
<div style="font-size:2rem;font-weight:800;color:#0f1f1a;letter-spacing:-1px;line-height:1.15;margin-bottom:16px;font-family:'DM Sans',sans-serif;">Accelerate Your Composites Research</div>
|
| 555 |
+
<p style="color:#5a6b65;font-size:.93rem;line-height:1.7;font-family:'DM Sans',sans-serif;">Access a centralized, open-source database for experimental composite material properties. Polymer, fiber, and composite datasets, all in one place.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 556 |
</div>
|
| 557 |
+
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
|
| 559 |
+
with _card1:
|
| 560 |
+
st.image(str(_ROOT / "extract_card_img.png"), use_container_width=True)
|
| 561 |
+
st.markdown("""
|
| 562 |
+
<div style="background:#0f1f1a;padding:16px 20px 8px;border:1.5px solid #1e3a30;border-top:none;border-bottom:none;">
|
| 563 |
+
<div style="font-size:1.05rem;font-weight:700;color:#fff;font-family:'DM Sans',sans-serif;">Extract Data</div>
|
| 564 |
+
<p style="font-size:.82rem;color:#7a9e8f;margin:6px 0 0;font-family:'DM Sans',sans-serif;">Upload experimental datasets and extract structured material property data into the AIM database.</p>
|
| 565 |
+
</div>
|
| 566 |
""", unsafe_allow_html=True)
|
| 567 |
+
if st.button("Open Extract Data →", key="btn_extract", use_container_width=True):
|
| 568 |
+
st.session_state["_go_extract"] = True
|
| 569 |
+
st.rerun()
|
| 570 |
|
| 571 |
+
with _card2:
|
| 572 |
+
st.image(str(_ROOT / "search_card_img.png"), use_container_width=True)
|
| 573 |
+
st.markdown("""
|
| 574 |
+
<div style="background:#0f1f1a;padding:16px 20px 8px;border:1.5px solid #1e3a30;border-top:none;border-bottom:none;">
|
| 575 |
+
<div style="font-size:1.05rem;font-weight:700;color:#fff;font-family:'DM Sans',sans-serif;">Search</div>
|
| 576 |
+
<p style="font-size:.82rem;color:#7a9e8f;margin:6px 0 0;font-family:'DM Sans',sans-serif;">Browse and filter polymer, fiber, and composite material properties across the full database.</p>
|
| 577 |
+
</div>
|
| 578 |
+
""", unsafe_allow_html=True)
|
| 579 |
+
if st.button("Open Search →", key="btn_search", use_container_width=True):
|
| 580 |
+
st.session_state["_go_search"] = True
|
| 581 |
+
st.rerun()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|