Theflame47 commited on
Commit
fb632ec
·
verified ·
1 Parent(s): 50b9204

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +3 -8
ui.py CHANGED
@@ -70,7 +70,6 @@ def _render_pagination(current_page: int) -> str:
70
  state = get_state()
71
  if state["more"]:
72
  links.append(f"<a class='page next' href='/page/{pages + 1}'>Load {pages + 1}</a>")
73
- # Wrap in a horizontally scrollable rail
74
  return "<div class='pagination-rail'><div class='pagination'>" + " ".join(links) + "</div></div>"
75
 
76
  def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str:
@@ -119,7 +118,6 @@ def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str
119
  .src {{ font-size: 13px; }}
120
  .tags .tag {{ display: inline-block; padding: 2px 8px; margin: 2px; background: var(--chip-bg); border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--fg); }}
121
 
122
- /* Pagination: single row, horizontal scroll, no wrap */
123
  .pagination-rail {{ overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; }}
124
  .pagination {{ white-space: nowrap; }}
125
  .page {{ display: inline-block; white-space: nowrap; padding: 6px 10px; margin-right: 6px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--fg); }}
@@ -132,12 +130,11 @@ def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str
132
  .searchbar button {{ padding:8px 12px; border:1px solid var(--fg); background: var(--fg); color: var(--bg); border-radius:8px; opacity:{search_opacity}; cursor:pointer; }}
133
  .pill {{ display:inline-block; padding:2px 8px; border:1px solid var(--border); border-radius:999px; font-size:12px; color: var(--fg); }}
134
 
135
- /* Dark mode toggle */
136
  #darkToggle {{ margin-left:auto; padding:6px 10px; border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:8px; cursor:pointer; }}
137
 
138
- /* Floating log button + panel */
139
- #logBtn {{ position:fixed; right:20px; bottom:20px; padding:10px 14px; border:none; border-radius:999px; background:var(--fg); color:var(--bg); cursor:pointer; }}
140
- #logPanel {{ position:fixed; right:20px; bottom:70px; width:320px; max-height:50vh; overflow:auto; background:var(--bg); border:1px solid var(--border); border-radius:12px; box-shadow:0 10px 24px rgba(0,0,0,0.12); padding:12px; display:none; }}
141
  #logPanel h3 {{ margin:0 0 8px 0; font-size:14px; }}
142
  #logPanel .row {{ display:flex; justify-content:space-between; font-size:13px; padding:2px 0; }}
143
  #byLabel {{ margin-top:8px; font-size:12px; max-height:28vh; overflow:auto; }}
@@ -171,7 +168,6 @@ def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str
171
  </div>
172
 
173
  <script>
174
- // Initial build trigger + status polling
175
  document.addEventListener("DOMContentLoaded", function() {{
176
  fetch("/build_all", {{ method: "POST" }}).catch(()=>{{}});
177
  const poll = () => {{
@@ -191,7 +187,6 @@ def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str
191
  }}).catch(()=>setTimeout(poll, 2000));
192
  }};
193
  poll();
194
- // Restore dark mode setting
195
  try {{
196
  if (localStorage.getItem('dark') === '1') document.body.classList.add('dark');
197
  }} catch(e) {{}}
 
70
  state = get_state()
71
  if state["more"]:
72
  links.append(f"<a class='page next' href='/page/{pages + 1}'>Load {pages + 1}</a>")
 
73
  return "<div class='pagination-rail'><div class='pagination'>" + " ".join(links) + "</div></div>"
74
 
75
  def _shell(page_index_0: int, html_table: str, *, search_query: str = "") -> str:
 
118
  .src {{ font-size: 13px; }}
119
  .tags .tag {{ display: inline-block; padding: 2px 8px; margin: 2px; background: var(--chip-bg); border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--fg); }}
120
 
 
121
  .pagination-rail {{ overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; }}
122
  .pagination {{ white-space: nowrap; }}
123
  .page {{ display: inline-block; white-space: nowrap; padding: 6px 10px; margin-right: 6px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--fg); }}
 
130
  .searchbar button {{ padding:8px 12px; border:1px solid var(--fg); background: var(--fg); color: var(--bg); border-radius:8px; opacity:{search_opacity}; cursor:pointer; }}
131
  .pill {{ display:inline-block; padding:2px 8px; border:1px solid var(--border); border-radius:999px; font-size:12px; color: var(--fg); }}
132
 
 
133
  #darkToggle {{ margin-left:auto; padding:6px 10px; border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:8px; cursor:pointer; }}
134
 
135
+ /* Floating log button + panel — moved up */
136
+ #logBtn {{ position:fixed; right:20px; bottom:100px; padding:10px 14px; border:none; border-radius:999px; background:var(--fg); color:var(--bg); cursor:pointer; }}
137
+ #logPanel {{ position:fixed; right:20px; bottom:150px; width:320px; max-height:50vh; overflow:auto; background:var(--bg); border:1px solid var(--border); border-radius:12px; box-shadow:0 10px 24px rgba(0,0,0,0.12); padding:12px; display:none; }}
138
  #logPanel h3 {{ margin:0 0 8px 0; font-size:14px; }}
139
  #logPanel .row {{ display:flex; justify-content:space-between; font-size:13px; padding:2px 0; }}
140
  #byLabel {{ margin-top:8px; font-size:12px; max-height:28vh; overflow:auto; }}
 
168
  </div>
169
 
170
  <script>
 
171
  document.addEventListener("DOMContentLoaded", function() {{
172
  fetch("/build_all", {{ method: "POST" }}).catch(()=>{{}});
173
  const poll = () => {{
 
187
  }}).catch(()=>setTimeout(poll, 2000));
188
  }};
189
  poll();
 
190
  try {{
191
  if (localStorage.getItem('dark') === '1') document.body.classList.add('dark');
192
  }} catch(e) {{}}