Spaces:
Sleeping
Sleeping
Update page_files/Home.py
Browse files- page_files/Home.py +21 -26
page_files/Home.py
CHANGED
|
@@ -54,10 +54,13 @@ def img_to_b64(path):
|
|
| 54 |
return ""
|
| 55 |
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
st.markdown("""
|
| 63 |
<style>
|
|
@@ -674,32 +677,24 @@ with right_col:
|
|
| 674 |
</style>
|
| 675 |
""", unsafe_allow_html=True)
|
| 676 |
|
| 677 |
-
|
| 678 |
-
st.markdown(
|
| 679 |
-
|
| 680 |
-
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
|
| 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 |
-
|
| 693 |
-
st.markdown(
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 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 |
|
|
|
|
| 54 |
return ""
|
| 55 |
|
| 56 |
|
| 57 |
+
_HERE = Path(__file__).parent # page_files/
|
| 58 |
+
_ROOT = _HERE.parent # project root
|
| 59 |
+
|
| 60 |
+
home_img = img_to_b64(str(_HERE / "images" / "Home.png"))
|
| 61 |
+
logo_img = img_to_b64(str(_ROOT / "logo.png"))
|
| 62 |
+
extract_card_img = img_to_b64(str(_ROOT / "extract_card_img.png"))
|
| 63 |
+
search_card_img = img_to_b64(str(_ROOT / "search_card_img.png"))
|
| 64 |
|
| 65 |
st.markdown("""
|
| 66 |
<style>
|
|
|
|
| 677 |
</style>
|
| 678 |
""", unsafe_allow_html=True)
|
| 679 |
|
| 680 |
+
if extract_card_img:
|
| 681 |
+
st.markdown(
|
| 682 |
+
'<div class="aim-showcase-card-wrap"><img src="' + extract_card_img + '" style="width:100%;max-height:190px;object-fit:cover;display:block;"/>'
|
| 683 |
+
'<div class="aim-card-footer"><div class="aim-card-footer-title">Extract Data</div>'
|
| 684 |
+
'<div class="aim-card-footer-tag">Platform</div></div></div>',
|
| 685 |
+
unsafe_allow_html=True
|
| 686 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 687 |
if st.button("Go to Extract Data →", key="showcase_extract_btn"):
|
| 688 |
st.switch_page("page_files/Upload_Data.py")
|
| 689 |
|
| 690 |
# ── Search card ──
|
| 691 |
+
if search_card_img:
|
| 692 |
+
st.markdown(
|
| 693 |
+
'<div class="aim-showcase-card-wrap"><img src="' + search_card_img + '" style="width:100%;max-height:190px;object-fit:cover;display:block;"/>'
|
| 694 |
+
'<div class="aim-card-footer"><div class="aim-card-footer-title">Search</div>'
|
| 695 |
+
'<div class="aim-card-footer-tag">Data Page</div></div></div>',
|
| 696 |
+
unsafe_allow_html=True
|
| 697 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 698 |
if st.button("Go to Search →", key="showcase_search_btn"):
|
| 699 |
st.switch_page("page_files/Categorized_Search.py")
|
| 700 |
|