Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,53 +28,47 @@ def cloud_button(label, key=None, color=None):
|
|
28 |
color_class = f"color-{color}" if color else ""
|
29 |
cloud_button_html = f"""
|
30 |
<div class="cloud {color_class}" id="{button_id}" style="margin-bottom: 20px;">
|
31 |
-
<div class="circle" style="width:
|
|
|
|
|
|
|
32 |
<div class="rectangle">{label}</div>
|
33 |
-
<div class="circle" style="width:
|
|
|
|
|
|
|
34 |
</div>
|
35 |
<style>
|
36 |
.cloud {{
|
37 |
position: relative;
|
38 |
-
display: inline-
|
39 |
-
align-items: center;
|
40 |
cursor: pointer;
|
41 |
user-select: none;
|
42 |
font-size: 16px;
|
43 |
background-color: #f8f9fa;
|
44 |
white-space: nowrap;
|
45 |
-
border-radius: 30px;
|
46 |
-
overflow: hidden;
|
47 |
-
padding: 0 30px; // Adjust as needed
|
48 |
}}
|
49 |
.rectangle {{
|
|
|
50 |
height: auto;
|
51 |
border-radius: 30px;
|
|
|
52 |
display: inline-flex;
|
53 |
align-items: center;
|
54 |
justify-content: center;
|
55 |
font-weight: bold;
|
56 |
padding: 10px 20px;
|
57 |
-
transition: background-color 0.4s;
|
58 |
-
background-color: #f8f9fa;
|
59 |
z-index: 2;
|
|
|
60 |
}}
|
61 |
.circle {{
|
62 |
-
|
63 |
-
height: 60px;
|
64 |
background-color: #f8f9fa;
|
|
|
65 |
border-radius: 50%;
|
66 |
-
position: absolute;
|
67 |
top: 50%;
|
68 |
transform: translateY(-50%);
|
69 |
}}
|
70 |
-
.circle:first-child {{
|
71 |
-
left: 0;
|
72 |
-
margin-left: -30px;
|
73 |
-
}}
|
74 |
-
.circle:last-child {{
|
75 |
-
right: 0;
|
76 |
-
margin-right: -30px;
|
77 |
-
}}
|
78 |
|
79 |
.cloud:hover .rectangle {{
|
80 |
background-color: #008CBA;
|
|
|
28 |
color_class = f"color-{color}" if color else ""
|
29 |
cloud_button_html = f"""
|
30 |
<div class="cloud {color_class}" id="{button_id}" style="margin-bottom: 20px;">
|
31 |
+
<div class="circle" style="width: 80px; height: 80px; left: -60px;"></div>
|
32 |
+
<div class="circle" style="width: 70px; height: 70px; left: -45px;"></div>
|
33 |
+
<div class="circle" style="width: 60px; height: 60px; left: -30px;"></div>
|
34 |
+
<div class="circle" style="width: 50px; height: 50px; left: -15px;"></div>
|
35 |
<div class="rectangle">{label}</div>
|
36 |
+
<div class="circle" style="width: 50px; height: 50px; right: -15px;"></div>
|
37 |
+
<div class="circle" style="width: 60px; height: 60px; right: -30px;"></div>
|
38 |
+
<div class="circle" style="width: 70px; height: 70px; right: -45px;"></div>
|
39 |
+
<div class="circle" style="width: 80px; height: 80px; right: -60px;"></div>
|
40 |
</div>
|
41 |
<style>
|
42 |
.cloud {{
|
43 |
position: relative;
|
44 |
+
display: inline-block;
|
|
|
45 |
cursor: pointer;
|
46 |
user-select: none;
|
47 |
font-size: 16px;
|
48 |
background-color: #f8f9fa;
|
49 |
white-space: nowrap;
|
|
|
|
|
|
|
50 |
}}
|
51 |
.rectangle {{
|
52 |
+
min-width: 120px;
|
53 |
height: auto;
|
54 |
border-radius: 30px;
|
55 |
+
position: relative;
|
56 |
display: inline-flex;
|
57 |
align-items: center;
|
58 |
justify-content: center;
|
59 |
font-weight: bold;
|
60 |
padding: 10px 20px;
|
|
|
|
|
61 |
z-index: 2;
|
62 |
+
transition: background-color 0.4s;
|
63 |
}}
|
64 |
.circle {{
|
65 |
+
position: absolute;
|
|
|
66 |
background-color: #f8f9fa;
|
67 |
+
z-index: 1;
|
68 |
border-radius: 50%;
|
|
|
69 |
top: 50%;
|
70 |
transform: translateY(-50%);
|
71 |
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
.cloud:hover .rectangle {{
|
74 |
background-color: #008CBA;
|