staticdash 2025.14__py3-none-any.whl → 2025.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- staticdash/dashboard.py +8 -2
- {staticdash-2025.14.dist-info → staticdash-2025.16.dist-info}/METADATA +1 -1
- staticdash-2025.16.dist-info/RECORD +8 -0
- staticdash-2025.14.dist-info/RECORD +0 -8
- {staticdash-2025.14.dist-info → staticdash-2025.16.dist-info}/WHEEL +0 -0
- {staticdash-2025.14.dist-info → staticdash-2025.16.dist-info}/top_level.txt +0 -0
staticdash/dashboard.py
CHANGED
|
@@ -201,6 +201,7 @@ class Dashboard:
|
|
|
201
201
|
|
|
202
202
|
def write_page(page):
|
|
203
203
|
doc = document(title=page.title)
|
|
204
|
+
effective_width = page.page_width or self.page_width or 900
|
|
204
205
|
with doc.head:
|
|
205
206
|
doc.head.add(link(rel="stylesheet", href="../assets/css/style.css"))
|
|
206
207
|
doc.head.add(script(type="text/javascript", src="../assets/js/script.js"))
|
|
@@ -209,6 +210,8 @@ class Dashboard:
|
|
|
209
210
|
doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"))
|
|
210
211
|
doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-python.min.js"))
|
|
211
212
|
doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-javascript.min.js"))
|
|
213
|
+
# Inject dynamic page width
|
|
214
|
+
doc.head.add(raw_util(f"<style>.content-inner {{ max-width: {effective_width}px !important; }}</style>"))
|
|
212
215
|
with doc:
|
|
213
216
|
with div(id="sidebar"):
|
|
214
217
|
a(self.title, href="../index.html", cls="sidebar-title")
|
|
@@ -227,7 +230,9 @@ class Dashboard:
|
|
|
227
230
|
for page in self.pages:
|
|
228
231
|
write_page(page)
|
|
229
232
|
|
|
233
|
+
# Index page
|
|
230
234
|
index_doc = document(title=self.title)
|
|
235
|
+
effective_width = self.pages[0].page_width or self.page_width or 900
|
|
231
236
|
with index_doc.head:
|
|
232
237
|
index_doc.head.add(link(rel="stylesheet", href="assets/css/style.css"))
|
|
233
238
|
index_doc.head.add(script(type="text/javascript", src="assets/js/script.js"))
|
|
@@ -241,7 +246,8 @@ class Dashboard:
|
|
|
241
246
|
index_doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-bash.min.js"))
|
|
242
247
|
index_doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-json.min.js"))
|
|
243
248
|
index_doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-c.min.js"))
|
|
244
|
-
|
|
249
|
+
# Inject dynamic page width
|
|
250
|
+
index_doc.head.add(raw_util(f"<style>.content-inner {{ max-width: {effective_width}px !important; }}</style>"))
|
|
245
251
|
with index_doc:
|
|
246
252
|
with div(id="sidebar"):
|
|
247
253
|
a(self.title, href="index.html", cls="sidebar-title")
|
|
@@ -383,7 +389,7 @@ class Dashboard:
|
|
|
383
389
|
|
|
384
390
|
render_elements(page.elements)
|
|
385
391
|
|
|
386
|
-
for i, child in enumerate(getattr(page, "children", []), start=
|
|
392
|
+
for i, child in enumerate(getattr(page, "children", []), start=0):
|
|
387
393
|
story.append(PageBreak())
|
|
388
394
|
child_sec_prefix = sec_prefix.copy() + [i]
|
|
389
395
|
render_page(child, level=level+1, sec_prefix=child_sec_prefix)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
staticdash/__init__.py,sha256=UN_-h8wFGfTPHYjnEb7N9CsxqXo-DQVo0cmREOtvRXE,244
|
|
2
|
+
staticdash/dashboard.py,sha256=798Itq6FgsU3OY4sq7PQIttLdkX0Au2ls0iyp5Pkxtc,21395
|
|
3
|
+
staticdash/assets/css/style.css,sha256=RVqNdwBsaDv8izdOQjGmUZ4NROWF8uZhiq8DTNvUB1M,5962
|
|
4
|
+
staticdash/assets/js/script.js,sha256=vBFL98da30_zHUKVqhLDBL2HzrI9huSHsea-e8A2qUk,4818
|
|
5
|
+
staticdash-2025.16.dist-info/METADATA,sha256=Nwms4u35b4I231PGM0KFL2MUQwUeUlZAb3xA1yEyTJE,1934
|
|
6
|
+
staticdash-2025.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
staticdash-2025.16.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
|
|
8
|
+
staticdash-2025.16.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
staticdash/__init__.py,sha256=UN_-h8wFGfTPHYjnEb7N9CsxqXo-DQVo0cmREOtvRXE,244
|
|
2
|
-
staticdash/dashboard.py,sha256=aGKCKdKl7CZJf8PLPvjIJGVmawaAFuaddlmLa_w9V5k,20896
|
|
3
|
-
staticdash/assets/css/style.css,sha256=RVqNdwBsaDv8izdOQjGmUZ4NROWF8uZhiq8DTNvUB1M,5962
|
|
4
|
-
staticdash/assets/js/script.js,sha256=vBFL98da30_zHUKVqhLDBL2HzrI9huSHsea-e8A2qUk,4818
|
|
5
|
-
staticdash-2025.14.dist-info/METADATA,sha256=dF0daZvP0ciuKZKMKZvbRdn5Ac1zbJ-SVvMyyOGfyxo,1934
|
|
6
|
-
staticdash-2025.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
staticdash-2025.14.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
|
|
8
|
-
staticdash-2025.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|