File size: 2,765 Bytes
9b11096
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
import base64

def set_bg_image_url(image_url):
    '''
    A function to set an image URL as a background with a reduced height and a blur effect.
    Parameters
    ----------
    image_url : str
        URL to the image file.
    Returns
    -------
    None
    '''
    st.markdown(
        f"""
        <style>
        .stApp {{
            position: relative;
            background: url({image_url});
            background-size: 20px 30px;
 /* Ensure the background covers the whole container */
            background-position: center;
            background-repeat: no-repeat;
            height: 20vh; /* Reduce the height of the background image */
            width: 20vw;
            overflow: hidden;
        }}
        
        .background-overlay {{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.6); /* Semi-transparent white overlay */
            filter: blur(15px); /* Adjust the blur radius to your preference */
            z-index: -1; /* Ensure it's behind the content */
        }}
        
        .main-content {{
            position: relative;
            z-index: 1;
            padding: 20px;
            background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background for content */
            border-radius: 8px; /* Rounded corners for better appearance */
            width: 20%; /* Adjust width to your preference */
            margin: auto; /* Center the content */
        }}
        </style>
        """,
        unsafe_allow_html=True
    )

    # Add background overlay
    st.markdown('<div class="background-overlay"></div>', unsafe_allow_html=True)

# Call the function with the provided image URL
set_bg_image_url("https://tallysolutions.com/wp-content/themes/tally/assets/images/resources-home-page/why-tally-prime-image.svg")

# Example Streamlit content
st.markdown('<div class="main-content">', unsafe_allow_html=True)

st.title("CSV to XML Converter")
st.write("A web application that is used for converting CSV to XML format.")
st.info("Currently supporting XML conversion for limited CSV files pertaining to TallyPrime")

# Add your Streamlit content here, e.g.:
# - Select box
# - Dataframe display
# - File uploader

st.markdown('</div>', unsafe_allow_html=True)

# Inject CSS with Streamlit (optional if needed)
st.markdown(
    f"""
    <style>
    .stApp {{
        background-size: cover; /* Ensure the background covers the container */
        background-position: center;
        background-attachment: fixed;
        z-index: -1; /* Ensure the background is behind the content */
    }}
    </style>
    """,
    unsafe_allow_html=True
)