-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
55 lines (45 loc) · 1.24 KB
/
main.py
File metadata and controls
55 lines (45 loc) · 1.24 KB
1
2
3
4
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
import pagess
import streamlit as st
from streamlit_navigation_bar import st_navbar
import os
st.set_page_config(page_title="MatX Manipulator", page_icon="💻", layout="wide")
def navbar():
pages = ["Home", "User Guide", "About Us", "GitHub", "Account"]
parent_dir = os.path.dirname(os.path.abspath(__file__))
logo_path = os.path.join(parent_dir, "assets/logo/logo.svg")
urls = {"GitHub": "https://github.com/MohamedAliJmal/Matrix_Manipulator"}
styles = {
"nav": {
"background-color": "#4169e1",
},
"img": {
"padding-right": "14px",
},
"span": {
"color": "white",
"padding": "14px",
},
"active": {
"background-color": "white",
"color": "black",
"font-weight": "normal",
"padding": "14px",
},
}
return st_navbar(
pages,
logo_path=logo_path,
logo_page="Account",
urls=urls,
styles=styles,
)
page = navbar()
functions = {
"Account": pagess.show_account,
"Home": pagess.show_home,
"User Guide": pagess.show_user_guide,
"About Us": pagess.show_examples,
}
go_to = functions.get(page)
if go_to:
go_to()