Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,13 @@ 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
|
32 |
-
<div class="circle
|
33 |
-
<div class="circle
|
34 |
-
<div class="circle medium middle"></div>
|
35 |
-
<div class="circle small middle"></div>
|
36 |
<div class="rectangle">{label}</div>
|
37 |
-
<div class="circle
|
38 |
-
<div class="circle
|
|
|
39 |
</div>
|
40 |
<style>
|
41 |
.cloud {{
|
@@ -45,13 +44,14 @@ def cloud_button(label, key=None, color=None):
|
|
45 |
user-select: none;
|
46 |
font-size: 16px;
|
47 |
background-color: #f8f9fa;
|
|
|
48 |
}}
|
49 |
.rectangle {{
|
50 |
min-width: 120px;
|
51 |
height: auto;
|
52 |
border-radius: 30px;
|
53 |
position: relative;
|
54 |
-
display: flex;
|
55 |
align-items: center;
|
56 |
justify-content: center;
|
57 |
font-weight: bold;
|
@@ -64,57 +64,9 @@ def cloud_button(label, key=None, color=None):
|
|
64 |
background-color: #f8f9fa;
|
65 |
z-index: 1;
|
66 |
border-radius: 50%;
|
67 |
-
}}
|
68 |
-
.circle.small {{
|
69 |
-
width: 40px;
|
70 |
-
height: 40px;
|
71 |
-
}}
|
72 |
-
.circle.medium {{
|
73 |
-
width: 60px;
|
74 |
-
height: 60px;
|
75 |
-
}}
|
76 |
-
.circle.large {{
|
77 |
-
width: 80px;
|
78 |
-
height: 80px;
|
79 |
-
}}
|
80 |
-
.left {{
|
81 |
top: 50%;
|
82 |
transform: translateY(-50%);
|
83 |
}}
|
84 |
-
.right {{
|
85 |
-
top: 50%;
|
86 |
-
transform: translateY(-50%);
|
87 |
-
right: 0;
|
88 |
-
}}
|
89 |
-
.middle {{
|
90 |
-
top: 50%;
|
91 |
-
left: 50%;
|
92 |
-
transform: translate(-50%, -50%);
|
93 |
-
}}
|
94 |
-
.circle.left.small {{
|
95 |
-
left: -20px;
|
96 |
-
}}
|
97 |
-
.circle.left.medium {{
|
98 |
-
left: -30px;
|
99 |
-
}}
|
100 |
-
.circle.left.large {{
|
101 |
-
left: -40px;
|
102 |
-
}}
|
103 |
-
.circle.right.small {{
|
104 |
-
right: -20px;
|
105 |
-
}}
|
106 |
-
.circle.right.medium {{
|
107 |
-
right: -30px;
|
108 |
-
}}
|
109 |
-
.circle.right.large {{
|
110 |
-
right: -40px;
|
111 |
-
}}
|
112 |
-
.circle.middle.small {{
|
113 |
-
margin-left: -20px;
|
114 |
-
}}
|
115 |
-
.circle.middle.medium {{
|
116 |
-
margin-left: -30px;
|
117 |
-
}}
|
118 |
|
119 |
.cloud:hover .rectangle {{
|
120 |
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: -40px;"></div>
|
32 |
+
<div class="circle" style="width: 60px; height: 60px; left: -30px;"></div>
|
33 |
+
<div class="circle" style="width: 45px; height: 45px; left: -22.5px;"></div>
|
|
|
|
|
34 |
<div class="rectangle">{label}</div>
|
35 |
+
<div class="circle" style="width: 45px; height: 45px; right: -22.5px;"></div>
|
36 |
+
<div class="circle" style="width: 60px; height: 60px; right: -30px;"></div>
|
37 |
+
<div class="circle" style="width: 80px; height: 80px; right: -40px;"></div>
|
38 |
</div>
|
39 |
<style>
|
40 |
.cloud {{
|
|
|
44 |
user-select: none;
|
45 |
font-size: 16px;
|
46 |
background-color: #f8f9fa;
|
47 |
+
white-space: nowrap;
|
48 |
}}
|
49 |
.rectangle {{
|
50 |
min-width: 120px;
|
51 |
height: auto;
|
52 |
border-radius: 30px;
|
53 |
position: relative;
|
54 |
+
display: inline-flex;
|
55 |
align-items: center;
|
56 |
justify-content: center;
|
57 |
font-weight: bold;
|
|
|
64 |
background-color: #f8f9fa;
|
65 |
z-index: 1;
|
66 |
border-radius: 50%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
top: 50%;
|
68 |
transform: translateY(-50%);
|
69 |
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
.cloud:hover .rectangle {{
|
72 |
background-color: #008CBA;
|