File size: 1,214 Bytes
f057e19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

def main():
    # Set page configuration
    st.set_page_config(
        page_title="Flashlight App",
        page_icon="๐Ÿ”ฆ",
        layout="centered",
        initial_sidebar_state="collapsed"
    )
    
    # Add some styling to simulate a flashlight effect
    st.markdown(
        """
        <style>
        .light-mode {
            background-color: white;
            color: black;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .dark-mode {
            background-color: black;
            color: white;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        </style>
        """,
        unsafe_allow_html=True
    )

    # Sidebar toggle
    mode = st.sidebar.radio("Toggle Mode", ["Light", "Dark"])

    if mode == "Light":
        st.markdown('<div class="light-mode"><h1>๐Ÿ”ฆ Flashlight is ON</h1></div>', unsafe_allow_html=True)
    else:
        st.markdown('<div class="dark-mode"><h1>๐ŸŒ™ Flashlight is OFF</h1></div>', unsafe_allow_html=True)

if __name__ == "__main__":
    main()