Anne31415 commited on
Commit
d3ef2bd
·
1 Parent(s): dbd52c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -28,10 +28,9 @@ 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: 60px; height: 60px; left: -30px;"></div>
32
  <div class="rectangle">{label}</div>
33
- <div class="circle" style="width: 60px; height: 60px; right: -30px;"></div>
34
- <div class="circle middle" style="width: 60px; height: 60px;"></div>
35
  </div>
36
  <style>
37
  .cloud {{
@@ -45,36 +44,36 @@ def cloud_button(label, key=None, color=None):
45
  white-space: nowrap;
46
  border-radius: 30px;
47
  overflow: hidden;
 
48
  }}
49
  .rectangle {{
50
  height: auto;
51
  border-radius: 30px;
52
- position: relative;
53
  display: inline-flex;
54
  align-items: center;
55
  justify-content: center;
56
  font-weight: bold;
57
  padding: 10px 20px;
58
- z-index: 2;
59
  transition: background-color 0.4s;
60
  background-color: #f8f9fa;
 
61
  }}
62
  .circle {{
63
- position: absolute;
 
64
  background-color: #f8f9fa;
65
- z-index: 1;
66
  border-radius: 50%;
 
67
  top: 50%;
68
  transform: translateY(-50%);
69
  }}
70
- .circle.middle {{
71
- position: absolute;
72
- background-color: #f8f9fa;
73
- z-index: 0;
74
- border-radius: 50%;
75
- top: 50%;
76
- left: 50%;
77
- transform: translate(-50%, -50%);
78
  }}
79
 
80
  .cloud:hover .rectangle {{
 
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: 60px; height: 60px;"></div>
32
  <div class="rectangle">{label}</div>
33
+ <div class="circle" style="width: 60px; height: 60px;"></div>
 
34
  </div>
35
  <style>
36
  .cloud {{
 
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
+ width: 60px;
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 {{