davidepanza commited on
Commit
7056d59
·
verified ·
1 Parent(s): 5b19e4d

Update src/utils.py

Browse files
Files changed (1) hide show
  1. src/utils.py +16 -11
src/utils.py CHANGED
@@ -101,20 +101,23 @@ def load_background_image():
101
  st.markdown(
102
  f"""
103
  <style>
 
 
 
104
  /* Background container with image */
105
  .bg-container {{
106
  position: relative;
107
  background-image: url("data:image/png;base64,{base64_image}");
108
- background-size: cover;
109
  background-position: center;
110
- background-repeat: no-repeat;
111
- height: 150px;
112
  width: 100%;
113
  margin: 0 auto;
114
- filter: contrast(110%) brightness(210%);
115
- border-radius: 100px;
116
  overflow: hidden;
117
  }}
 
118
  /* Overlay for dimming effect */
119
  .bg-container::after {{
120
  content: '';
@@ -123,21 +126,23 @@ def load_background_image():
123
  left: 0;
124
  width: 100%;
125
  height: 100%;
126
- background-color: rgba(20, 10, 20, 0.44);
127
- z-index: 1;
128
  }}
129
- /* Overlay title styling */
 
130
  .overlay-title {{
131
  position: absolute;
132
  top: 50%;
133
  left: 50%;
134
  transform: translate(-50%, -50%);
135
- color: black;
 
136
  font-size: 50px;
137
  font-weight: bold;
138
- text-shadow: 1px 1px 3px rgba(255, 255, 255, .0);
139
  text-align: center;
140
- z-index: 2;
141
  }}
142
  </style>
143
  """,
 
101
  st.markdown(
102
  f"""
103
  <style>
104
+ /* Import Bitcount Grid Double font */
105
+ @import url('https://fonts.cdnfonts.com/css/bitcount-grid-double');
106
+
107
  /* Background container with image */
108
  .bg-container {{
109
  position: relative;
110
  background-image: url("data:image/png;base64,{base64_image}");
111
+ background-size: container;
112
  background-position: center;
113
+ height: 150px; /* Adjust the height of the background */
 
114
  width: 100%;
115
  margin: 0 auto;
116
+ filter: contrast(110%) brightness(210%); /* Dim the brightness of the image */
117
+ border-radius: 100px; /* Makes the container's corners rounded */
118
  overflow: hidden;
119
  }}
120
+
121
  /* Overlay for dimming effect */
122
  .bg-container::after {{
123
  content: '';
 
126
  left: 0;
127
  width: 100%;
128
  height: 100%;
129
+ background-color: rgba(20, 10, 20, 0.44); /* Semi-transparent black overlay */
130
+ z-index: 1; /* Ensure the overlay is above the image */
131
  }}
132
+
133
+ /* Overlay title styling with Bitcount Grid Double font */
134
  .overlay-title {{
135
  position: absolute;
136
  top: 50%;
137
  left: 50%;
138
  transform: translate(-50%, -50%);
139
+ color: black; /* Title color */
140
+ font-family: 'Bitcount Grid Double', 'Courier New', monospace !important;
141
  font-size: 50px;
142
  font-weight: bold;
143
+ text-shadow: 1px 1px 3px rgba(255, 255, 255, .0); /* Shadow for better visibility */
144
  text-align: center;
145
+ z-index: 2; /* Ensure the title is above the overlay */
146
  }}
147
  </style>
148
  """,