IPF commited on
Commit
10794de
·
verified ·
1 Parent(s): 047dcdd

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -175,7 +175,7 @@ class SimpleBrowser:
175
  def get_citation_index(self, cursor: int) -> int:
176
  if cursor not in self.used_citations:
177
  self.used_citations.append(cursor)
178
- return self.used_citations.index(cursor)
179
 
180
  def get_page_info(self, cursor: int) -> Optional[Dict[str, str]]:
181
  # Prioritize link_map as it stores search result metadata
@@ -1550,7 +1550,7 @@ def create_interface():
1550
  bottom: 125%;
1551
  left: 50%;
1552
  transform: translateX(-50%);
1553
- z-index: 1000;
1554
  width: 280px;
1555
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
1556
  border: 2px solid #10a37f;
@@ -1558,7 +1558,7 @@ def create_interface():
1558
  padding: 12px 14px;
1559
  box-shadow: 0 8px 24px rgba(16, 163, 127, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
1560
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1561
- pointer-events: none;
1562
  }
1563
 
1564
  .citation-tooltip::after {
@@ -1571,7 +1571,19 @@ def create_interface():
1571
  border-top-color: #10a37f;
1572
  }
1573
 
1574
- .citation-wrapper:hover .citation-tooltip {
 
 
 
 
 
 
 
 
 
 
 
 
1575
  visibility: visible;
1576
  opacity: 1;
1577
  bottom: 130%;
 
175
  def get_citation_index(self, cursor: int) -> int:
176
  if cursor not in self.used_citations:
177
  self.used_citations.append(cursor)
178
+ return self.used_citations.index(cursor) + 1 # Start from 1 instead of 0
179
 
180
  def get_page_info(self, cursor: int) -> Optional[Dict[str, str]]:
181
  # Prioritize link_map as it stores search result metadata
 
1550
  bottom: 125%;
1551
  left: 50%;
1552
  transform: translateX(-50%);
1553
+ z-index: 9999;
1554
  width: 280px;
1555
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
1556
  border: 2px solid #10a37f;
 
1558
  padding: 12px 14px;
1559
  box-shadow: 0 8px 24px rgba(16, 163, 127, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
1560
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1561
+ pointer-events: auto;
1562
  }
1563
 
1564
  .citation-tooltip::after {
 
1571
  border-top-color: #10a37f;
1572
  }
1573
 
1574
+ /* Create an invisible bridge between link and tooltip */
1575
+ .citation-tooltip::before {
1576
+ content: "";
1577
+ position: absolute;
1578
+ top: 100%;
1579
+ left: 0;
1580
+ right: 0;
1581
+ height: 20px;
1582
+ background: transparent;
1583
+ }
1584
+
1585
+ .citation-wrapper:hover .citation-tooltip,
1586
+ .citation-tooltip:hover {
1587
  visibility: visible;
1588
  opacity: 1;
1589
  bottom: 130%;