File size: 3,546 Bytes
62e3918
ba25241
dd55e78
d3f1d3a
62e3918
d3f1d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46c903f
d3f1d3a
 
 
 
42ba962
 
 
 
 
 
 
 
 
d54e602
42ba962
d3f1d3a
 
 
d1e098e
 
d3f1d3a
5c54ef7
4e58999
 
5c54ef7
b1221c9
d3f1d3a
4e58999
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62e3918
 
4e58999
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import streamlit as st
import influencer_ui 
import influencer_onboarding
import base64

def get_base64_of_bin_file(bin_file):
    """
    Converts a binary file to base64 encoding.
    """
    with open(bin_file, 'rb') as file:
        data = file.read()
    return base64.b64encode(data).decode()

def set_bg_from_local_image(local_img_path):
    """
    Sets a local image as the background of the Streamlit app.
    """
    bin_str = get_base64_of_bin_file(local_img_path)
    page_bg_img = f"""
    <style>
    .stApp {{
        background-image: url("data:image/png;base64,{bin_str}");
        background-size: cover;
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: center center;
    }}
    .stApp:before {{
        content: '';
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.2);  /* Adjust the color and opacity here */
        z-index: -1;
    }}
    </style>
    """
    st.markdown(page_bg_img, unsafe_allow_html=True)


def main():        
    # Page Configuration
    st.set_page_config(page_title="InstaImpact", layout="wide")

    set_bg_from_local_image('images/influencer_edited.png') 
    
    # Sidebar for Navigation
    st.sidebar.title("Navigation")
    st.sidebar.markdown("Select the feature you want to explore:")
    
    # Define navigation options with a flag to indicate if they are enabled or disabled
    nav_options = ["Homepage", "Influencer Search", "Onboard Influencers", "Campaign Analytics", "Market Trends"]
    selection = st.sidebar.radio("Go to", nav_options)
    
    # Homepage
    if selection == "Homepage":
        st.markdown("<h1 style='text-align: center; color: white;'>Welcome to InstaImpact</h1>", unsafe_allow_html=True)
        st.markdown("""
            <div style="font-size: 20px; color: white;">
                <p><strong>InstaImpact is your comprehensive tool for influencer marketing.</strong></p>
                <ul>
                    <li>Discover and analyze influencers</li>
                    <li>Plan and manage your campaigns</li>
                    <li>Get insights on the latest market trends</li>
                </ul>
            </div>
            """, unsafe_allow_html=True)
    
        st.markdown("<h2 style='color: white;'>Platform Capabilities</h2>", unsafe_allow_html=True)
        st.markdown("""
            <div style="font-size: 18px; color: white;">
                <ul>
                    <li><strong>Influencer Search</strong>: Find the perfect influencer match for your brand.</li>
                    <li><strong>Campaign Analytics</strong>: Measure the success of your campaigns.</li>
                    <li><strong>Market Trends</strong>: Stay ahead with the latest in influencer marketing.</li>
                </ul>
            </div>
            """, unsafe_allow_html=True)
    # Influencer Search
    elif selection == "Influencer Search":
        influencer_ui.show_influencer_search_page()
    # Add a navigation option for Onboarding
    elif selection == "Onboard Influencers":
        influencer_onboarding.show_onboarding_page()
    elif selection == "Campaign Analytics":
        st.header("Campaign Analytics")
        st.write("View and analyze your campaign performance - Coming Soon")
    elif selection == "Market Trends":
        st.header("Market Trends")
        st.write("Explore the latest trends in influencer marketing - Coming Soon")


main()