front
Browse files
app.py
CHANGED
|
@@ -1,67 +1,47 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from streamlit_option_menu import option_menu
|
| 3 |
-
import json
|
| 4 |
-
from Home import dashboard
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
def main():
|
| 56 |
-
if 'user' not in st.session_state:
|
| 57 |
-
st.session_state.user = None
|
| 58 |
-
|
| 59 |
-
if st.session_state.user is None:
|
| 60 |
-
with st.sidebar:
|
| 61 |
-
selected = option_menu(None, ['Login', 'Register'])
|
| 62 |
-
if selected == 'Login':
|
| 63 |
-
login()
|
| 64 |
-
elif selected == 'Register':
|
| 65 |
-
register()
|
| 66 |
-
else:
|
| 67 |
-
dashboard()
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# Add a custom CSS style for the background video and centered button
|
| 4 |
+
st.markdown(
|
| 5 |
+
"""
|
| 6 |
+
<style>
|
| 7 |
+
.fullscreen-bg {
|
| 8 |
+
position: fixed;
|
| 9 |
+
top: 0;
|
| 10 |
+
right: 0;
|
| 11 |
+
bottom: 0;
|
| 12 |
+
left: 0;
|
| 13 |
+
overflow: hidden;
|
| 14 |
+
z-index: -1;
|
| 15 |
+
}
|
| 16 |
+
.fullscreen-bg video,
|
| 17 |
+
.fullscreen-bg img {
|
| 18 |
+
width: 100%;
|
| 19 |
+
height: auto;
|
| 20 |
+
}
|
| 21 |
+
.centered-button {
|
| 22 |
+
position: absolute;
|
| 23 |
+
top: 50%;
|
| 24 |
+
left: 50%;
|
| 25 |
+
transform: translate(-50%, -50%);
|
| 26 |
+
z-index: 1;
|
| 27 |
+
}
|
| 28 |
+
</style>
|
| 29 |
+
""",
|
| 30 |
+
unsafe_allow_html=True
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
# Add the background video or GIF
|
| 34 |
+
st.markdown(
|
| 35 |
+
"""
|
| 36 |
+
<div class="fullscreen-bg">
|
| 37 |
+
<video loop muted autoplay playsinline>
|
| 38 |
+
<source src="universe.mp4" type="video/mp4">
|
| 39 |
+
Your browser does not support the video tag.
|
| 40 |
+
</video>
|
| 41 |
+
</div>
|
| 42 |
+
""",
|
| 43 |
+
unsafe_allow_html=True
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
# Add the centered button
|
| 47 |
+
st.button("Explore the Universe", key="explore_button", class_="centered-button")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|