Spaces:
Sleeping
Sleeping
Update page_files/Home.py
Browse files- page_files/Home.py +88 -35
page_files/Home.py
CHANGED
|
@@ -171,19 +171,6 @@ st.markdown("""
|
|
| 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;
|
|
@@ -622,32 +609,98 @@ with left_col:
|
|
| 622 |
""", unsafe_allow_html=True)
|
| 623 |
|
| 624 |
with right_col:
|
| 625 |
-
# Extract Data card
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
""", unsafe_allow_html=True)
|
| 636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 637 |
st.switch_page("page_files/Upload_Data.py")
|
| 638 |
|
| 639 |
-
# Search card
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
<div class="aim-
|
|
|
|
| 647 |
</div>
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
if st.button("Go to Search →", key="showcase_search_btn"
|
| 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)
|
|
|
|
| 171 |
background: transparent !important;
|
| 172 |
}
|
| 173 |
/* Showcase nav buttons */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
.footer-nav-head {
|
| 175 |
font-size: 0.68rem;
|
| 176 |
font-weight: 700;
|
|
|
|
| 609 |
""", unsafe_allow_html=True)
|
| 610 |
|
| 611 |
with right_col:
|
| 612 |
+
# ── Extract Data card ──
|
| 613 |
+
st.markdown("""
|
| 614 |
+
<style>
|
| 615 |
+
/* card wrapper used by both showcase cards */
|
| 616 |
+
.aim-showcase-card-wrap {
|
| 617 |
+
border-radius: 14px;
|
| 618 |
+
overflow: hidden;
|
| 619 |
+
border: 1.5px solid #e4e8e5;
|
| 620 |
+
margin-bottom: 4px;
|
| 621 |
+
background: #f7f8f9;
|
| 622 |
+
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
|
| 623 |
+
}
|
| 624 |
+
.aim-showcase-card-wrap:hover {
|
| 625 |
+
box-shadow: 0 6px 24px rgba(0,0,0,0.11);
|
| 626 |
+
border-color: #8ACAFF;
|
| 627 |
+
}
|
| 628 |
+
/* Make st.image inside card flush */
|
| 629 |
+
.aim-showcase-card-wrap [data-testid="stImage"] img {
|
| 630 |
+
border-radius: 0 !important;
|
| 631 |
+
width: 100% !important;
|
| 632 |
+
object-fit: cover !important;
|
| 633 |
+
max-height: 190px !important;
|
| 634 |
+
display: block !important;
|
| 635 |
+
}
|
| 636 |
+
.aim-showcase-card-wrap [data-testid="stImage"] {
|
| 637 |
+
margin: 0 !important;
|
| 638 |
+
padding: 0 !important;
|
| 639 |
+
line-height: 0 !important;
|
| 640 |
+
}
|
| 641 |
+
.aim-card-footer {
|
| 642 |
+
padding: 14px 18px 16px;
|
| 643 |
+
background: #f7f8f9;
|
| 644 |
+
}
|
| 645 |
+
.aim-card-footer-title {
|
| 646 |
+
font-family: 'DM Sans', sans-serif;
|
| 647 |
+
font-size: 1rem;
|
| 648 |
+
font-weight: 700;
|
| 649 |
+
color: #0f1f1a;
|
| 650 |
+
margin-bottom: 3px;
|
| 651 |
+
}
|
| 652 |
+
.aim-card-footer-tag {
|
| 653 |
+
font-family: 'DM Sans', sans-serif;
|
| 654 |
+
font-size: 0.7rem;
|
| 655 |
+
font-weight: 700;
|
| 656 |
+
letter-spacing: 1.2px;
|
| 657 |
+
color: #8ACAFF;
|
| 658 |
+
text-transform: uppercase;
|
| 659 |
+
}
|
| 660 |
+
/* Nav buttons */
|
| 661 |
+
.st-key-showcase_extract_btn button,
|
| 662 |
+
.st-key-showcase_search_btn button {
|
| 663 |
+
background: transparent !important;
|
| 664 |
+
border: none !important;
|
| 665 |
+
color: #8ACAFF !important;
|
| 666 |
+
font-family: 'DM Sans', sans-serif !important;
|
| 667 |
+
font-size: 0.82rem !important;
|
| 668 |
+
font-weight: 600 !important;
|
| 669 |
+
padding: 0 0 18px 0 !important;
|
| 670 |
+
height: auto !important;
|
| 671 |
+
box-shadow: none !important;
|
| 672 |
+
text-align: left !important;
|
| 673 |
+
}
|
| 674 |
+
</style>
|
| 675 |
""", unsafe_allow_html=True)
|
| 676 |
+
|
| 677 |
+
with st.container():
|
| 678 |
+
st.markdown('<div class="aim-showcase-card-wrap">', unsafe_allow_html=True)
|
| 679 |
+
if extract_card_img:
|
| 680 |
+
st.image("extract_card_img.png", use_container_width=True)
|
| 681 |
+
st.markdown("""
|
| 682 |
+
<div class="aim-card-footer">
|
| 683 |
+
<div class="aim-card-footer-title">Extract Data</div>
|
| 684 |
+
<div class="aim-card-footer-tag">Platform</div>
|
| 685 |
+
</div>
|
| 686 |
+
</div>
|
| 687 |
+
""", unsafe_allow_html=True)
|
| 688 |
+
if st.button("Go to Extract Data →", key="showcase_extract_btn"):
|
| 689 |
st.switch_page("page_files/Upload_Data.py")
|
| 690 |
|
| 691 |
+
# ── Search card ──
|
| 692 |
+
with st.container():
|
| 693 |
+
st.markdown('<div class="aim-showcase-card-wrap">', unsafe_allow_html=True)
|
| 694 |
+
if search_card_img:
|
| 695 |
+
st.image("search_card_img.png", use_container_width=True)
|
| 696 |
+
st.markdown("""
|
| 697 |
+
<div class="aim-card-footer">
|
| 698 |
+
<div class="aim-card-footer-title">Search</div>
|
| 699 |
+
<div class="aim-card-footer-tag">Data Page</div>
|
| 700 |
</div>
|
| 701 |
+
</div>
|
| 702 |
+
""", unsafe_allow_html=True)
|
| 703 |
+
if st.button("Go to Search →", key="showcase_search_btn"):
|
| 704 |
st.switch_page("page_files/Categorized_Search.py")
|
| 705 |
|
| 706 |
st.markdown("<div style='background:#fff; padding: 12px 0; border-bottom: 1px solid #e8e8e4;'></div>", unsafe_allow_html=True)
|