Update app.py
Browse files
app.py
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
import base64
|
3 |
-
st.set_page_config(page_title="Homepage")
|
4 |
-
|
5 |
-
|
6 |
-
file_ = open("
|
7 |
-
contents = file_.read()
|
8 |
-
data_url = base64.b64encode(contents).decode("utf-8")
|
9 |
-
css=f"""
|
10 |
-
<div style="display: flex; align-items: center;">
|
11 |
-
<img src="data:image/gif;base64,{data_url}" alt="Company Logo" style="height: 100px; width: auto; margin-right: 20px;">
|
12 |
-
<h1 style="margin: 0;">
|
13 |
-
<span style="color: orange;">Welcome to</span>
|
14 |
-
<span style="color: violet;">MO3ALIMI!</span>
|
15 |
-
</h1>
|
16 |
-
</div>
|
17 |
-
|
18 |
-
"""
|
19 |
-
st.markdown(css, unsafe_allow_html=True)
|
20 |
-
def add_logo():
|
21 |
-
st.markdown(
|
22 |
-
"""
|
23 |
-
<style>
|
24 |
-
[data-testid="stSidebarNav"] {
|
25 |
-
background-image: url(http://placekitten.com/200/200);
|
26 |
-
background-repeat: no-repeat;
|
27 |
-
#padding-top: 120px;
|
28 |
-
background-position: 20px 20px;
|
29 |
-
}
|
30 |
-
[data-testid="stSidebarNav"]::before {
|
31 |
-
content: "MO3ALIMI sidebar";
|
32 |
-
margin-left: 20px;
|
33 |
-
margin-top: 20px;
|
34 |
-
font-size: 29px;
|
35 |
-
position: relative;
|
36 |
-
top: 0px;
|
37 |
-
}
|
38 |
-
</style>
|
39 |
-
""",
|
40 |
-
unsafe_allow_html=True,
|
41 |
-
)
|
42 |
-
add_logo()
|
43 |
-
|
44 |
-
|
45 |
-
#st.sidebar.title("MO3ALIMI sidebar")
|
46 |
-
#st.sidebar.markdown("---")
|
47 |
-
|
48 |
-
st.warning('Please select a subject to start learning', icon="⚠️")
|
49 |
st.markdown("---")
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
st.set_page_config(page_title="Homepage")
|
4 |
+
|
5 |
+
|
6 |
+
file_ = open("logo.png", "rb")
|
7 |
+
contents = file_.read()
|
8 |
+
data_url = base64.b64encode(contents).decode("utf-8")
|
9 |
+
css=f"""
|
10 |
+
<div style="display: flex; align-items: center;">
|
11 |
+
<img src="data:image/gif;base64,{data_url}" alt="Company Logo" style="height: 100px; width: auto; margin-right: 20px;">
|
12 |
+
<h1 style="margin: 0;">
|
13 |
+
<span style="color: orange;">Welcome to</span>
|
14 |
+
<span style="color: violet;">MO3ALIMI!</span>
|
15 |
+
</h1>
|
16 |
+
</div>
|
17 |
+
|
18 |
+
"""
|
19 |
+
st.markdown(css, unsafe_allow_html=True)
|
20 |
+
def add_logo():
|
21 |
+
st.markdown(
|
22 |
+
"""
|
23 |
+
<style>
|
24 |
+
[data-testid="stSidebarNav"] {
|
25 |
+
background-image: url(http://placekitten.com/200/200);
|
26 |
+
background-repeat: no-repeat;
|
27 |
+
#padding-top: 120px;
|
28 |
+
background-position: 20px 20px;
|
29 |
+
}
|
30 |
+
[data-testid="stSidebarNav"]::before {
|
31 |
+
content: "MO3ALIMI sidebar";
|
32 |
+
margin-left: 20px;
|
33 |
+
margin-top: 20px;
|
34 |
+
font-size: 29px;
|
35 |
+
position: relative;
|
36 |
+
top: 0px;
|
37 |
+
}
|
38 |
+
</style>
|
39 |
+
""",
|
40 |
+
unsafe_allow_html=True,
|
41 |
+
)
|
42 |
+
add_logo()
|
43 |
+
|
44 |
+
|
45 |
+
#st.sidebar.title("MO3ALIMI sidebar")
|
46 |
+
#st.sidebar.markdown("---")
|
47 |
+
|
48 |
+
st.warning('Please select a subject to start learning', icon="⚠️")
|
49 |
st.markdown("---")
|