Spaces:
Runtime error
Runtime error
File size: 1,578 Bytes
c352470 |
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 streamlit as st
from screen_add_note import screen_add_main
from screen_scan import screen_scan_main
from screen_note import screen_note_main
from streamlit_option_menu import option_menu
def local_css(file_name):
with open(file_name) as f:
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
local_css("style.css")
def streamlit_menu(example=3):
if example == 3:
# 2. horizontal menu with custom style
selected = option_menu(
menu_title=None, # required
options=["Optik Okuma", "Yeni Not Girisi", "Not Goruntuleme"], # required
icons=["house", "book", "envelope"],
default_index=0, # optional
orientation="horizontal",
styles={
"container": {"padding": "0!important", "background-color": "#b2d8d8"},
"icon": {"color": "orange", "font-size": "0px"},
"nav-link": {
"font-size": "15px",
"text-align": "left",
"margin": "0px",
"--hover-color": "#eee",
},
"nav-link-selected": {"background-color": "#008080"},
},
)
return selected
def main():
selected = streamlit_menu(example=3)
if selected == "Optik Okuma":
screen_scan_main()
if selected == "Yeni Not Girisi":
screen_add_main()
if selected == "Not Goruntuleme":
screen_note_main()
if __name__ == "__main__":
main()
|