Anne31415 commited on
Commit
f4d7a71
·
1 Parent(s): 3d69dee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -23,12 +23,11 @@ repo.git_pull() # Pull the latest changes (if any)
23
  # Step 2: Load the PDF File
24
  pdf_file_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
25
 
26
-
27
  def cloud_button(label, key=None, color=None):
28
  button_id = f"cloud-button-{key or label}"
29
  color_class = f"color-{color}" if color else ""
30
- num_circles = max(3, min(12, len(label) // 2)) # Adjust the number of circles based on text length
31
- circle_size = 30 # Size of the circles
32
 
33
  # Generate circles
34
  circles_html = ''.join([
@@ -51,27 +50,26 @@ def cloud_button(label, key=None, color=None):
51
  .wrapper {{
52
  display: flex;
53
  align-items: center;
54
- position: relative;
 
 
55
  }}
56
  .text {{
57
  position: relative;
58
  font-weight: bold;
59
  z-index: 2;
60
- background-color: #9BBEFF;
61
- border-radius: 15px;
62
- padding: 5px 10px;
63
  }}
64
  .circle {{
65
  background-color: #9BBEFF;
66
  border-radius: 50%;
67
  width: {circle_size}px;
68
  height: {circle_size}px;
69
- margin: 0 -{circle_size // 3}px;
70
  z-index: 1;
71
  }}
72
- .color-1 .text, .color-1 .circle {{ background-color: #FFA07A; }}
73
- .color-2 .text, .color-2 .circle {{ background-color: #FF7F50; }}
74
- .color-3 .text, .color-3 .circle {{ background-color: #FF6347; }}
75
  </style>
76
  <script>
77
  document.getElementById("{button_id}").onclick = function() {{
 
23
  # Step 2: Load the PDF File
24
  pdf_file_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
25
 
 
26
  def cloud_button(label, key=None, color=None):
27
  button_id = f"cloud-button-{key or label}"
28
  color_class = f"color-{color}" if color else ""
29
+ num_circles = max(3, min(12, len(label) // 4)) # Adjust the number of circles based on text length
30
+ circle_size = 60
31
 
32
  # Generate circles
33
  circles_html = ''.join([
 
50
  .wrapper {{
51
  display: flex;
52
  align-items: center;
53
+ background-color: #9BBEFF;
54
+ border-radius: 30px; # Adjust as needed
55
+ padding: 10px 20px;
56
  }}
57
  .text {{
58
  position: relative;
59
  font-weight: bold;
60
  z-index: 2;
 
 
 
61
  }}
62
  .circle {{
63
  background-color: #9BBEFF;
64
  border-radius: 50%;
65
  width: {circle_size}px;
66
  height: {circle_size}px;
67
+ margin: 0 -{circle_size // 4}px; # Adjust negative margin for overlap
68
  z-index: 1;
69
  }}
70
+ .color-1 .wrapper, .color-1 .circle {{ background-color: #FFA07A; }}
71
+ .color-2 .wrapper, .color-2 .circle {{ background-color: #FF7F50; }}
72
+ .color-3 .wrapper, .color-3 .circle {{ background-color: #FF6347; }}
73
  </style>
74
  <script>
75
  document.getElementById("{button_id}").onclick = function() {{