Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from datetime import datetime | |
| net_value = 0 | |
| def find_quantity_range(quantity, quantity_labels): | |
| for label in quantity_labels: | |
| if '+' in label: | |
| lower = int(label.replace('+', '').strip()) | |
| if quantity >= lower: | |
| return label | |
| elif '-' in label: | |
| parts = label.split('-') | |
| low = int(parts[0].strip()) | |
| high = int(parts[1].strip()) | |
| if low <= quantity <= high: | |
| return label | |
| return quantity_labels[-1] | |
| def footer(): | |
| theme_bg = st.get_option("theme.backgroundColor") | |
| theme_text = st.get_option("theme.textColor") | |
| theme_primary = st.get_option("theme.primaryColor") | |
| current_year = datetime.now().year | |
| footer_html = f""" | |
| <style> | |
| @media (max-width: 768px) {{ | |
| .footer {{ display: none; }} | |
| }} | |
| .footer {{ | |
| bottom: 0; | |
| width: 100%; | |
| background-color: {theme_bg}; | |
| color: {theme_text}; | |
| text-align: center; | |
| padding: 10px; | |
| font-size: 14px; | |
| border-top: 1px solid rgba(255, 255, 255, 0.2); | |
| }} | |
| .footer a {{ | |
| color: {theme_primary}; | |
| text-decoration: none; | |
| margin: 0 10px; | |
| }} | |
| </style> | |
| <div class="footer"> | |
| © {current_year} Key Innovations Inc. All rights reserved. | |
| <br> | |
| Follow us on: | |
| <a href="https://www.linkedin.com/company/keyinnovations" target="_blank">LinkedIn</a> | | |
| <a href="https://twitter.com/keyinnovations" target="_blank">Twitter</a> | | |
| <a href="https://www.instagram.com/key.innovations/" target="_blank">Instagram</a> | | |
| <a href="https://www.facebook.com/KeyInnovations/" target="_blank">Facebook</a> | |
| </div> | |
| """ | |
| st.markdown(footer_html, unsafe_allow_html=True) | |