Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,6 +34,7 @@ def cloud_button(label, key=None, color=None, overlap=30):
|
|
34 |
f'<div class="circle {color_class}"></div>'
|
35 |
for _ in range(num_circles)
|
36 |
])
|
|
|
37 |
|
38 |
cloud_button_html = f"""
|
39 |
<div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
|
@@ -41,7 +42,6 @@ def cloud_button(label, key=None, color=None, overlap=30):
|
|
41 |
<div class="circle-container">
|
42 |
{circles_html}
|
43 |
</div>
|
44 |
-
<div class="circle-text">{label}</div> <!-- Text goes here -->
|
45 |
</div>
|
46 |
</div>
|
47 |
<style>
|
@@ -60,40 +60,24 @@ def cloud_button(label, key=None, color=None, overlap=30):
|
|
60 |
}}
|
61 |
.circle-container {{
|
62 |
position: relative;
|
63 |
-
z-index: 1;
|
64 |
}}
|
65 |
.circle {{
|
66 |
background-color: #FF6347;
|
67 |
border-radius: 50%;
|
68 |
width: {circle_size}px;
|
69 |
height: {circle_size}px;
|
70 |
-
position:
|
71 |
margin-right: -{overlap}px; /* Adjust the margin for overlapping effect */
|
72 |
}}
|
73 |
.circle-text {{
|
74 |
-
position:
|
|
|
|
|
|
|
|
|
75 |
z-index: 2;
|
76 |
white-space: nowrap; /* Prevent line breaks */
|
77 |
text-align: center; /* Center the text horizontally and vertically */
|
78 |
-
font-weight: bold;
|
79 |
-
}}
|
80 |
-
.cloud::before,
|
81 |
-
.cloud::after {{
|
82 |
-
content: '';
|
83 |
-
background-color: #FF6347;
|
84 |
-
border-radius: 50%;
|
85 |
-
width: {circle_size * 2}px;
|
86 |
-
height: {circle_size * 2}px;
|
87 |
-
position: absolute;
|
88 |
-
z-index: 0;
|
89 |
-
}}
|
90 |
-
.cloud::before {{
|
91 |
-
left: -{circle_size}px;
|
92 |
-
top: -{circle_size}px;
|
93 |
-
}}
|
94 |
-
.cloud::after {{
|
95 |
-
right: -{circle_size}px;
|
96 |
-
top: -{circle_size}px;
|
97 |
}}
|
98 |
/* Add this CSS for the hover effect and shadow */
|
99 |
.cloud:hover .circle-container {{
|
|
|
34 |
f'<div class="circle {color_class}"></div>'
|
35 |
for _ in range(num_circles)
|
36 |
])
|
37 |
+
circles_html += f'<div class="circle-text">{label}</div>' # Add the text after the circles
|
38 |
|
39 |
cloud_button_html = f"""
|
40 |
<div class="cloud" id="{button_id}" style="margin-bottom: 20px;">
|
|
|
42 |
<div class="circle-container">
|
43 |
{circles_html}
|
44 |
</div>
|
|
|
45 |
</div>
|
46 |
</div>
|
47 |
<style>
|
|
|
60 |
}}
|
61 |
.circle-container {{
|
62 |
position: relative;
|
|
|
63 |
}}
|
64 |
.circle {{
|
65 |
background-color: #FF6347;
|
66 |
border-radius: 50%;
|
67 |
width: {circle_size}px;
|
68 |
height: {circle_size}px;
|
69 |
+
position: relative;
|
70 |
margin-right: -{overlap}px; /* Adjust the margin for overlapping effect */
|
71 |
}}
|
72 |
.circle-text {{
|
73 |
+
position: absolute;
|
74 |
+
top: 50%;
|
75 |
+
left: 50%;
|
76 |
+
transform: translate(-50%, -50%);
|
77 |
+
font-weight: bold;
|
78 |
z-index: 2;
|
79 |
white-space: nowrap; /* Prevent line breaks */
|
80 |
text-align: center; /* Center the text horizontally and vertically */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}}
|
82 |
/* Add this CSS for the hover effect and shadow */
|
83 |
.cloud:hover .circle-container {{
|