Spaces:
Sleeping
Sleeping
Update page_files/Home.py
Browse files- page_files/Home.py +146 -52
page_files/Home.py
CHANGED
|
@@ -56,6 +56,8 @@ def img_to_b64(path):
|
|
| 56 |
|
| 57 |
home_img = img_to_b64("images/Home.png")
|
| 58 |
logo_img = img_to_b64("logo.png")
|
|
|
|
|
|
|
| 59 |
|
| 60 |
st.markdown("""
|
| 61 |
<style>
|
|
@@ -168,6 +170,20 @@ st.markdown("""
|
|
| 168 |
text-decoration: underline !important;
|
| 169 |
background: transparent !important;
|
| 170 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
.footer-nav-head {
|
| 172 |
font-size: 0.68rem;
|
| 173 |
font-weight: 700;
|
|
@@ -429,6 +445,34 @@ st.markdown("""
|
|
| 429 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 430 |
# 4. STATS (static HTML)
|
| 431 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
|
| 433 |
|
| 434 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -481,7 +525,6 @@ st.markdown("""
|
|
| 481 |
text-transform: uppercase !important;
|
| 482 |
}
|
| 483 |
.cards-section-wrap h2 {
|
| 484 |
-
text-align: center;
|
| 485 |
font-family: 'DM Sans', sans-serif !important;
|
| 486 |
font-size: 1.4rem !important;
|
| 487 |
font-weight: 700 !important;
|
|
@@ -489,7 +532,6 @@ st.markdown("""
|
|
| 489 |
margin-bottom: 6px !important;
|
| 490 |
}
|
| 491 |
.cards-section-wrap p {
|
| 492 |
-
text-align: center;
|
| 493 |
color: #5a6b65 !important;
|
| 494 |
font-size: 0.9rem !important;
|
| 495 |
line-height: 1.6 !important;
|
|
@@ -502,61 +544,116 @@ st.markdown("""
|
|
| 502 |
|
| 503 |
st.markdown("<div style='padding: 64px 0 0 0;'></div>", unsafe_allow_html=True)
|
| 504 |
|
|
|
|
| 505 |
st.markdown("""
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 509 |
</div>
|
| 510 |
""", unsafe_allow_html=True)
|
| 511 |
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 527 |
|
| 528 |
-
st.markdown("<div style='background:#fff; padding:
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
-
st.markdown(f"""
|
| 533 |
-
<style>
|
| 534 |
-
.aim-stats {{
|
| 535 |
-
background: #f7f7f5; border-bottom: 1px solid #e4e8e5;
|
| 536 |
-
display: flex; justify-content: center;
|
| 537 |
-
}}
|
| 538 |
-
.aim-stat {{
|
| 539 |
-
text-align: center; padding: 34px 56px;
|
| 540 |
-
border-right: 1px solid #e4e8e5;
|
| 541 |
-
}}
|
| 542 |
-
.aim-stat:last-child {{ border-right: none; }}
|
| 543 |
-
.aim-stat-num {{
|
| 544 |
-
font-family: 'DM Sans', sans-serif;
|
| 545 |
-
font-size: 2.1rem; font-weight: 800;
|
| 546 |
-
color: #8ACAFF; line-height: 1; margin-bottom: 6px;
|
| 547 |
-
}}
|
| 548 |
-
.aim-stat-label {{
|
| 549 |
-
font-size: 0.68rem; font-weight: 600;
|
| 550 |
-
letter-spacing: 1.4px; color: #7a8e87; text-transform: uppercase;
|
| 551 |
-
}}
|
| 552 |
-
</style>
|
| 553 |
-
<div class="aim-stats">
|
| 554 |
-
<div class="aim-stat"><div class="aim-stat-num">3</div><div class="aim-stat-label">Material Classes</div></div>
|
| 555 |
-
<div class="aim-stat"><div class="aim-stat-num">{prop_count}</div><div class="aim-stat-label">Properties Tracked</div></div>
|
| 556 |
-
<div class="aim-stat"><div class="aim-stat-num">8</div><div class="aim-stat-label">Research Teams</div></div>
|
| 557 |
-
<div class="aim-stat"><div class="aim-stat-num">2</div><div class="aim-stat-label">Universities</div></div>
|
| 558 |
-
</div>
|
| 559 |
-
""", unsafe_allow_html=True)
|
| 560 |
|
| 561 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 562 |
# 6. ABOUT + FOOTER (static HTML)
|
|
@@ -718,7 +815,4 @@ with _:
|
|
| 718 |
st.page_link(
|
| 719 |
"page_files/Contact_Team.py",
|
| 720 |
label="Contact Team",
|
| 721 |
-
)
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
|
|
|
|
| 56 |
|
| 57 |
home_img = img_to_b64("images/Home.png")
|
| 58 |
logo_img = img_to_b64("logo.png")
|
| 59 |
+
extract_card_img = img_to_b64("extract_card_img.png")
|
| 60 |
+
search_card_img = img_to_b64("search_card_img.png")
|
| 61 |
|
| 62 |
st.markdown("""
|
| 63 |
<style>
|
|
|
|
| 170 |
text-decoration: underline !important;
|
| 171 |
background: transparent !important;
|
| 172 |
}
|
| 173 |
+
/* Showcase nav buttons */
|
| 174 |
+
.st-key-showcase_extract_btn button,
|
| 175 |
+
.st-key-showcase_search_btn button {
|
| 176 |
+
background: transparent !important;
|
| 177 |
+
border: none !important;
|
| 178 |
+
color: #8ACAFF !important;
|
| 179 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 180 |
+
font-size: 0.82rem !important;
|
| 181 |
+
font-weight: 600 !important;
|
| 182 |
+
padding: 2px 0 12px !important;
|
| 183 |
+
height: auto !important;
|
| 184 |
+
box-shadow: none !important;
|
| 185 |
+
text-align: left !important;
|
| 186 |
+
}
|
| 187 |
.footer-nav-head {
|
| 188 |
font-size: 0.68rem;
|
| 189 |
font-weight: 700;
|
|
|
|
| 445 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 446 |
# 4. STATS (static HTML)
|
| 447 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 448 |
+
st.markdown(f"""
|
| 449 |
+
<style>
|
| 450 |
+
.aim-stats {{
|
| 451 |
+
background: #f7f7f5; border-bottom: 1px solid #e4e8e5;
|
| 452 |
+
display: flex; justify-content: center;
|
| 453 |
+
}}
|
| 454 |
+
.aim-stat {{
|
| 455 |
+
text-align: center; padding: 34px 56px;
|
| 456 |
+
border-right: 1px solid #e4e8e5;
|
| 457 |
+
}}
|
| 458 |
+
.aim-stat:last-child {{ border-right: none; }}
|
| 459 |
+
.aim-stat-num {{
|
| 460 |
+
font-family: 'DM Sans', sans-serif;
|
| 461 |
+
font-size: 2.1rem; font-weight: 800;
|
| 462 |
+
color: #8ACAFF; line-height: 1; margin-bottom: 6px;
|
| 463 |
+
}}
|
| 464 |
+
.aim-stat-label {{
|
| 465 |
+
font-size: 0.68rem; font-weight: 600;
|
| 466 |
+
letter-spacing: 1.4px; color: #7a8e87; text-transform: uppercase;
|
| 467 |
+
}}
|
| 468 |
+
</style>
|
| 469 |
+
<div class="aim-stats">
|
| 470 |
+
<div class="aim-stat"><div class="aim-stat-num">3</div><div class="aim-stat-label">Material Classes</div></div>
|
| 471 |
+
<div class="aim-stat"><div class="aim-stat-num">{prop_count}</div><div class="aim-stat-label">Properties Tracked</div></div>
|
| 472 |
+
<div class="aim-stat"><div class="aim-stat-num">8</div><div class="aim-stat-label">Research Teams</div></div>
|
| 473 |
+
<div class="aim-stat"><div class="aim-stat-num">2</div><div class="aim-stat-label">Universities</div></div>
|
| 474 |
+
</div>
|
| 475 |
+
""", unsafe_allow_html=True)
|
| 476 |
|
| 477 |
|
| 478 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 525 |
text-transform: uppercase !important;
|
| 526 |
}
|
| 527 |
.cards-section-wrap h2 {
|
|
|
|
| 528 |
font-family: 'DM Sans', sans-serif !important;
|
| 529 |
font-size: 1.4rem !important;
|
| 530 |
font-weight: 700 !important;
|
|
|
|
| 532 |
margin-bottom: 6px !important;
|
| 533 |
}
|
| 534 |
.cards-section-wrap p {
|
|
|
|
| 535 |
color: #5a6b65 !important;
|
| 536 |
font-size: 0.9rem !important;
|
| 537 |
line-height: 1.6 !important;
|
|
|
|
| 544 |
|
| 545 |
st.markdown("<div style='padding: 64px 0 0 0;'></div>", unsafe_allow_html=True)
|
| 546 |
|
| 547 |
+
# ββ Databricks-style: left text + right stacked cards ββββββββββββββββββββββ
|
| 548 |
st.markdown("""
|
| 549 |
+
<style>
|
| 550 |
+
/* wrapper for the showcase section */
|
| 551 |
+
.showcase-section {
|
| 552 |
+
background: #fff;
|
| 553 |
+
padding: 0 40px 48px;
|
| 554 |
+
}
|
| 555 |
+
/* Left heading text */
|
| 556 |
+
.showcase-heading {
|
| 557 |
+
font-family: 'DM Sans', sans-serif;
|
| 558 |
+
font-size: clamp(1.6rem, 3vw, 2.3rem);
|
| 559 |
+
font-weight: 800;
|
| 560 |
+
color: #0f1f1a;
|
| 561 |
+
letter-spacing: -1px;
|
| 562 |
+
line-height: 1.2;
|
| 563 |
+
margin-bottom: 14px;
|
| 564 |
+
}
|
| 565 |
+
.showcase-sub {
|
| 566 |
+
font-family: 'DM Sans', sans-serif;
|
| 567 |
+
color: #5a6b65;
|
| 568 |
+
font-size: 0.95rem;
|
| 569 |
+
line-height: 1.65;
|
| 570 |
+
}
|
| 571 |
+
/* Image cards on the right */
|
| 572 |
+
.aim-showcase-card {
|
| 573 |
+
border-radius: 14px;
|
| 574 |
+
overflow: hidden;
|
| 575 |
+
border: 1.5px solid #e4e8e5;
|
| 576 |
+
margin-bottom: 18px;
|
| 577 |
+
background: #f7f8f9;
|
| 578 |
+
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
|
| 579 |
+
cursor: pointer;
|
| 580 |
+
transition: box-shadow 0.2s, border-color 0.2s;
|
| 581 |
+
}
|
| 582 |
+
.aim-showcase-card:hover {
|
| 583 |
+
box-shadow: 0 6px 24px rgba(0,0,0,0.11);
|
| 584 |
+
border-color: #8ACAFF;
|
| 585 |
+
}
|
| 586 |
+
.aim-showcase-card img {
|
| 587 |
+
width: 100%;
|
| 588 |
+
display: block;
|
| 589 |
+
object-fit: cover;
|
| 590 |
+
max-height: 200px;
|
| 591 |
+
}
|
| 592 |
+
.aim-showcase-card-body {
|
| 593 |
+
padding: 16px 20px;
|
| 594 |
+
}
|
| 595 |
+
.aim-showcase-card-title {
|
| 596 |
+
font-family: 'DM Sans', sans-serif;
|
| 597 |
+
font-size: 1rem;
|
| 598 |
+
font-weight: 700;
|
| 599 |
+
color: #0f1f1a;
|
| 600 |
+
margin-bottom: 4px;
|
| 601 |
+
}
|
| 602 |
+
.aim-showcase-card-tag {
|
| 603 |
+
font-family: 'DM Sans', sans-serif;
|
| 604 |
+
font-size: 0.7rem;
|
| 605 |
+
font-weight: 700;
|
| 606 |
+
letter-spacing: 1.2px;
|
| 607 |
+
color: #8ACAFF;
|
| 608 |
+
text-transform: uppercase;
|
| 609 |
+
}
|
| 610 |
+
</style>
|
| 611 |
+
""", unsafe_allow_html=True)
|
| 612 |
+
|
| 613 |
+
left_col, right_col = st.columns([1, 1.2], gap="large")
|
| 614 |
+
|
| 615 |
+
with left_col:
|
| 616 |
+
st.markdown("""
|
| 617 |
+
<div class="showcase-section" style="padding-top: 32px;">
|
| 618 |
+
<div class="showcase-heading">Accelerate Your<br>Composites Research</div>
|
| 619 |
+
<p class="showcase-sub">Access a centralized, open-source database for experimental composite
|
| 620 |
+
material properties. Polymer, fiber, and composite datasets, all in one place.</p>
|
| 621 |
</div>
|
| 622 |
""", unsafe_allow_html=True)
|
| 623 |
|
| 624 |
+
with right_col:
|
| 625 |
+
# Extract Data card
|
| 626 |
+
extract_img_tag = f"<img src='{extract_card_img}' alt='Extract Data'/>" if extract_card_img else ""
|
| 627 |
+
st.markdown(f"""
|
| 628 |
+
<div class="aim-showcase-card">
|
| 629 |
+
{extract_img_tag}
|
| 630 |
+
<div class="aim-showcase-card-body">
|
| 631 |
+
<div class="aim-showcase-card-title">Extract Data</div>
|
| 632 |
+
<div class="aim-showcase-card-tag">Platform</div>
|
| 633 |
+
</div>
|
| 634 |
+
</div>
|
| 635 |
+
""", unsafe_allow_html=True)
|
| 636 |
+
if st.button("Go to Extract Data β", key="showcase_extract_btn", use_container_width=True):
|
| 637 |
+
st.switch_page("page_files/Upload_Data.py")
|
| 638 |
|
| 639 |
+
# Search card
|
| 640 |
+
search_img_tag = f"<img src='{search_card_img}' alt='Search'/>" if search_card_img else ""
|
| 641 |
+
st.markdown(f"""
|
| 642 |
+
<div class="aim-showcase-card">
|
| 643 |
+
{search_img_tag}
|
| 644 |
+
<div class="aim-showcase-card-body">
|
| 645 |
+
<div class="aim-showcase-card-title">Search</div>
|
| 646 |
+
<div class="aim-showcase-card-tag">Data Page</div>
|
| 647 |
+
</div>
|
| 648 |
+
</div>
|
| 649 |
+
""", unsafe_allow_html=True)
|
| 650 |
+
if st.button("Go to Search β", key="showcase_search_btn", use_container_width=True):
|
| 651 |
+
st.switch_page("page_files/Categorized_Search.py")
|
| 652 |
|
| 653 |
+
st.markdown("<div style='background:#fff; padding: 12px 0; border-bottom: 1px solid #e8e8e4;'></div>", unsafe_allow_html=True)
|
| 654 |
|
| 655 |
|
| 656 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 657 |
|
| 658 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 659 |
# 6. ABOUT + FOOTER (static HTML)
|
|
|
|
| 815 |
st.page_link(
|
| 816 |
"page_files/Contact_Team.py",
|
| 817 |
label="Contact Team",
|
| 818 |
+
)
|
|
|
|
|
|
|
|
|