Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,12 +36,13 @@ def cloud_button(label, key=None, color=None):
|
|
36 |
f'<div class="circle {color_class}" style="left: {i * overlap}px; top: {i * overlap}px;"></div>'
|
37 |
for i in range(num_circles)
|
38 |
])
|
39 |
-
|
40 |
|
41 |
cloud_button_html = f"""
|
42 |
<div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
|
43 |
<div class="wrapper {color_class}">
|
44 |
{circles_html}
|
|
|
45 |
</div>
|
46 |
</div>
|
47 |
<style>
|
@@ -67,9 +68,6 @@ def cloud_button(label, key=None, color=None):
|
|
67 |
}}
|
68 |
.circle-text {{
|
69 |
position: absolute;
|
70 |
-
top: 50%;
|
71 |
-
left: 50%;
|
72 |
-
transform: translate(-50%, -50%);
|
73 |
font-weight: bold;
|
74 |
z-index: 2;
|
75 |
}}
|
|
|
36 |
f'<div class="circle {color_class}" style="left: {i * overlap}px; top: {i * overlap}px;"></div>'
|
37 |
for i in range(num_circles)
|
38 |
])
|
39 |
+
circle_text_style = f'font-size: {circle_size}px; top: {circle_size/2}px; left: {circle_size/2}px; transform: translate(-50%, -50%);'
|
40 |
|
41 |
cloud_button_html = f"""
|
42 |
<div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
|
43 |
<div class="wrapper {color_class}">
|
44 |
{circles_html}
|
45 |
+
<div class="circle-text" style="{circle_text_style}">{label}</div>
|
46 |
</div>
|
47 |
</div>
|
48 |
<style>
|
|
|
68 |
}}
|
69 |
.circle-text {{
|
70 |
position: absolute;
|
|
|
|
|
|
|
71 |
font-weight: bold;
|
72 |
z-index: 2;
|
73 |
}}
|