Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the menu has not been hidden #18

Open
johnnyb1509 opened this issue May 5, 2023 · 2 comments
Open

the menu has not been hidden #18

johnnyb1509 opened this issue May 5, 2023 · 2 comments

Comments

@johnnyb1509
Copy link

I'm creating auth page using the code below

import streamlit as st
from streamlit_login_auth_ui.widgets import __login__

__login__obj = __login__(auth_token = "courier_auth_token", 
                        company_name = "BSomename",
                        width = 200, height = 250, 
                        logout_button_name = 'Logout', 
                        hide_menu_bool = True, 
                        hide_footer_bool = False,
                        lottie_url = "https://assets6.lottiefiles.com/packages/lf20_5XEJb3YBIg.json")

LOGGED_IN = __login__obj.build_login_ui()

if LOGGED_IN == True:
    st.markdown("Your Streamlit Application Begins here!")

However, the menu on the side bar has not been hidden, it still shows all the page inside the folder /pages/.... AS the pic below:

Screenshot 2023-05-05 at 12 02 52 PM

The app is running on:

  • MacOS: M1 (Ventura)
  • Python 3.10
  • Streamlit 1.22
@macthev
Copy link

macthev commented May 13, 2023

I too see the same, the debugger shows hide_menu() is being called so the following is not working

st.markdown(""" <style>
#MainMenu {visibility: hidden;}
</style> """, unsafe_allow_html=True)

Tried chrome,firefix,safari

@karmataco
Copy link

karmataco commented May 29, 2023

Thanks!
This edit worked for me. Using 'display' allows the bottom login menu to slide up and take the spot of the main navigation. I also had to put it under 'LOGGED_IN = __login__obj.build_login_ui()' due to how Streamlit renders the page

LOGGED_IN = __login__obj.build_login_ui()
st.markdown(""" <style>
.css-1oe5cao {display: none;}
</style> """, unsafe_allow_html=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants