Repository navigation
Expand file tree
/
Copy pathmainCode.py
More file actions
60 lines (55 loc) · 1.6 KB
/
Copy pathmainCode.py
File metadata and controls
60 lines (55 loc) · 1.6 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
56
57
58
59
60
import os
import streamlit as st
import pages as pg
from streamlit_navigation_bar import st_navbar
st.set_page_config(initial_sidebar_state="collapsed")
from pages.createKey import *
from pages.validate import *
from pages.defaultCertificate import *
from pages.customCertificate import *
from pages.welcomPage import *
def mainSection():
pages1 = ["Default Certificate", "Custom Certificate", "Validate Certificate", "Create Key", "About Us"]
parent_dir = os.path.dirname(os.path.abspath(__file__))
#logo_path = os.path.join(parent_dir, "cubes.svg")
urls = {"GitHub": "https://github.com/gabrieltempass/streamlit-navigation-bar"}
styles = {
"nav": {
"background-color": "royalblue",
"justify-content": "center",
},
"img": {
"padding-right": "14px",
},
"span": {
"color": "white",
"padding": "14px",
},
"active": {
"background-color": "white",
"color": "var(--text-color)",
"font-weight": "normal",
"padding": "14px",
}
}
options = {
"show_menu": False,
"show_sidebar": False,
}
page = st_navbar(
pages1,
#logo_path=logo_path,
styles=styles,
options=options,
)
functions = {
"Default Certificate": defaultCertificate,
"Custom Certificate": customCertificate,
"Validate Certificate": validateVal,
"Create Key": createKeyValue,
"About Us": welcome,
}
go_to = functions.get(page)
if go_to:
go_to()
mainSection()