forked from ELC/finance-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
57 lines (42 loc) · 1.79 KB
/
main.py
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
from pathlib import Path
import streamlit as st
from streamlit_multipage import MultiPage
from pages import pages
def landing_page(st):
st.markdown(Path("README.md").read_text())
def header(st):
snippet = """
<div style="display: flex; justify-content: space-between">
<div>🡠 Check the sidebar for more apps</div>
<div><a href="https://github.com/ELC/finance-tools" target="_blank" style="text-decoration: none; color: goldenrod">Give it a ★ on Github</a></div>
</div>
"""
st.markdown(snippet, unsafe_allow_html=True)
def footer(st):
snippet = """
<div style="text-align: center; line-height: 2.5em;">
Developed using
<a href="https://streamlit.io/" target="_blank" style="text-decoration: none">streamlit</a>
by <a href="https://elc.github.io" target="_blank" style="text-decoration: none">Ezequiel Leonardo Castaño</a>
- Python Code available at <a href="https://github.com/ELC/finance-tools" target="_blank" style="text-decoration: none">Github</a>.
<br>
If you like the app, consider <a href="https://elc.github.io/donate" target="_blank" style="text-decoration: none">donating</a>.
<br>
For contact information, reach out by <a href="https://www.linkedin.com/in/ezequielcastano/" target="_blank" style="text-decoration: none">LinkedIn</a>
</div>
"""
st.markdown(snippet, unsafe_allow_html=True)
st.set_page_config(layout="wide")
app = MultiPage()
app.st = st
app.navbar_name = "Other Apps"
app.start_button = "Start App"
app.navbar_style = "VerticalButton"
app.header = header
app.footer = footer
app.hide_navigation = True
app.hide_menu = True
app.add_app("Landing", landing_page, initial_page=True)
for name, function in pages.items():
app.add_app(name, function)
app.run()