staticdash 0.3.3__py3-none-any.whl → 0.4.0__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.
@@ -1,22 +1,28 @@
1
1
  body {
2
2
  margin: 0;
3
3
  font-family: sans-serif;
4
- background-color: #f9f9f9;
4
+ background-color: #ffffff;
5
5
  color: #333;
6
6
  }
7
7
 
8
+ /* Fixed sidebar on the left */
8
9
  #sidebar {
9
10
  position: fixed;
10
11
  top: 0;
11
12
  left: 0;
12
13
  width: 240px;
13
14
  height: 100vh;
14
- background-color: #2c3e50;
15
- padding: 20px 20px 60px 20px;
15
+ background-color: #ffffff;
16
+ padding: 20px;
16
17
  box-sizing: border-box;
17
18
  overflow-y: auto;
18
19
  scrollbar-width: thin;
19
- scrollbar-color: #888 #2c3e50;
20
+ scrollbar-color: #888 #ffffff;
21
+ display: flex;
22
+ flex-direction: column;
23
+ justify-content: space-between;
24
+ border-right: 1px solid #ccc;
25
+ z-index: 1000;
20
26
  }
21
27
 
22
28
  #sidebar::-webkit-scrollbar {
@@ -24,7 +30,7 @@ body {
24
30
  }
25
31
 
26
32
  #sidebar::-webkit-scrollbar-track {
27
- background: #2c3e50;
33
+ background: #ffffff;
28
34
  }
29
35
 
30
36
  #sidebar::-webkit-scrollbar-thumb {
@@ -33,14 +39,15 @@ body {
33
39
  }
34
40
 
35
41
  #sidebar h1 {
36
- color: #ecf0f1;
42
+ color: #2c3e50;
37
43
  font-size: 20px;
38
44
  margin-bottom: 20px;
39
45
  }
40
46
 
47
+ /* Nav links */
41
48
  .nav-link {
42
49
  display: block;
43
- color: #bdc3c7;
50
+ color: #2c3e50;
44
51
  text-decoration: none;
45
52
  margin: 10px 0;
46
53
  font-weight: bold;
@@ -50,8 +57,7 @@ body {
50
57
  }
51
58
 
52
59
  .nav-link:hover {
53
- color: #ffffff;
54
- background-color: #34495e;
60
+ background-color: #ecf0f1;
55
61
  }
56
62
 
57
63
  .nav-link.active {
@@ -59,16 +65,15 @@ body {
59
65
  background-color: #1abc9c;
60
66
  }
61
67
 
68
+ /* Sidebar footer */
62
69
  #sidebar-footer {
63
- position: fixed;
64
- bottom: 20px;
65
- left: 20px;
66
- width: 200px;
67
70
  font-size: 12px;
68
71
  color: #7f8c8d;
69
72
  text-align: center;
70
73
  line-height: 1.4;
71
- background-color: #2c3e50;
74
+ margin-top: 40px;
75
+ padding-top: 20px;
76
+ border-top: 1px solid #ccc;
72
77
  }
73
78
 
74
79
  #sidebar-footer a {
@@ -80,14 +85,33 @@ body {
80
85
  text-decoration: underline;
81
86
  }
82
87
 
83
- #content {
84
- margin-left: 260px;
88
+ /* Main wrapper stretches full width but content is pushed right */
89
+ #wrapper {
90
+ margin-left: 240px;
91
+ padding: 0;
92
+ background-color: #ffffff;
93
+ min-height: 100vh;
94
+ overflow-x: hidden;
95
+ }
96
+
97
+ /* Inner content area is centered up to max-width */
98
+ #wrapper-inner {
99
+ max-width: 960px;
100
+ margin: 0 auto;
85
101
  padding: 20px;
86
102
  box-sizing: border-box;
87
103
  }
88
104
 
105
+ /* Content area */
106
+ #content {
107
+ width: 100%;
108
+ box-sizing: border-box;
109
+ }
110
+
89
111
  .page-section {
90
112
  display: none;
113
+ max-width: 100%;
114
+ overflow-x: auto;
91
115
  }
92
116
 
93
117
  .page-section.active {
@@ -110,7 +134,7 @@ table {
110
134
  border-collapse: collapse;
111
135
  margin-top: 1em;
112
136
  background-color: white;
113
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
137
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
114
138
  overflow-x: auto;
115
139
  }
116
140
 
@@ -119,8 +143,7 @@ thead {
119
143
  color: white;
120
144
  }
121
145
 
122
- th,
123
- td {
146
+ th, td {
124
147
  padding: 10px;
125
148
  border: 1px solid #ddd;
126
149
  text-align: left;
@@ -134,12 +157,14 @@ tbody tr:hover {
134
157
  background-color: #e8f0fe;
135
158
  }
136
159
 
160
+ /* Images */
137
161
  .dash-image {
138
162
  max-width: 100%;
139
163
  height: auto;
140
164
  margin: 1em 0;
141
165
  }
142
166
 
167
+ /* Download Button */
143
168
  .download-button {
144
169
  display: inline-block;
145
170
  padding: 0.5em 1em;
@@ -155,7 +180,7 @@ tbody tr:hover {
155
180
  background-color: #547a9f;
156
181
  }
157
182
 
158
- /* Sortable Tables */
183
+ /* Sortable Table Headers */
159
184
  table.sortable th {
160
185
  cursor: pointer;
161
186
  position: relative;
@@ -172,20 +197,21 @@ table.sortable th::after {
172
197
  }
173
198
 
174
199
  table.sortable th.sorted-asc::after {
175
- content: "\25B2";
200
+ content: "";
176
201
  }
177
202
 
178
203
  table.sortable th.sorted-desc::after {
179
- content: "\25BC";
204
+ content: "";
180
205
  }
181
206
 
182
207
  /* MiniPage Layout */
183
208
  .minipage-row {
184
209
  display: flex;
185
- width: 100%;
186
210
  gap: 20px;
187
211
  margin-bottom: 20px;
212
+ max-width: 100%;
188
213
  box-sizing: border-box;
214
+ overflow-x: auto;
189
215
  }
190
216
 
191
217
  .minipage-cell {
@@ -207,8 +233,7 @@ table.sortable th.sorted-desc::after {
207
233
  }
208
234
 
209
235
  .minipage-cell .syntax-block {
210
- margin-top: 0.5em;
211
- margin-bottom: 0.5em;
236
+ margin: .5em 0;
212
237
  }
213
238
 
214
239
  .minipage-cell table {
@@ -232,8 +257,8 @@ table.sortable th.sorted-desc::after {
232
257
  padding: 1em;
233
258
  background: none;
234
259
  color: inherit;
235
- font-family: 'Fira Mono', 'Consolas', monospace;
236
- font-size: 0.95em;
260
+ font-family: 'Fira Mono','Consolas',monospace;
261
+ font-size: .95em;
237
262
  }
238
263
 
239
264
  .code-toolbar {
@@ -243,24 +268,23 @@ table.sortable th.sorted-desc::after {
243
268
  z-index: 2;
244
269
  }
245
270
 
246
- .copy-btn,
247
- .view-raw-btn {
271
+ .copy-btn, .view-raw-btn {
248
272
  color: #fff;
249
273
  background: #444;
250
274
  border-radius: 4px;
251
275
  padding: 2px 8px;
252
- font-size: 0.85em;
276
+ font-size: .85em;
253
277
  text-decoration: none;
254
278
  margin-left: 4px;
255
279
  cursor: pointer;
256
280
  transition: background 0.2s;
257
281
  }
258
282
 
259
- .copy-btn:hover,
260
- .view-raw-btn:hover {
283
+ .copy-btn:hover, .view-raw-btn:hover {
261
284
  background: #1abc9c;
262
285
  }
263
286
 
287
+ /* Table Wrapper */
264
288
  .table-wrapper {
265
289
  overflow-x: auto;
266
290
  width: 100%;
staticdash/dashboard.py CHANGED
@@ -2,7 +2,6 @@ import os
2
2
  import shutil
3
3
  import uuid
4
4
  import pandas as pd
5
- import plotly.graph_objects as go
6
5
  from dominate import document
7
6
  from dominate.tags import div, h1, h2, h3, h4, p, a, script, link
8
7
  from dominate.util import raw as raw_util
@@ -198,11 +197,13 @@ class Dashboard:
198
197
  with div(id="sidebar-footer"):
199
198
  a("Produced by staticdash", href="https://pypi.org/project/staticdash/", target="_blank")
200
199
 
201
- with div(id="content"):
202
- for idx, page in enumerate(self.pages):
203
- with div(id=f"page-{page.slug}", cls="page-section", style="display:none;") as section:
204
- for el in page.render(idx, downloads_dir=downloads_dir, relative_prefix=""):
205
- section += el
200
+ with div(id="wrapper"):
201
+ with div(id="wrapper-inner"):
202
+ with div(id="content"):
203
+ for idx, page in enumerate(self.pages):
204
+ with div(id=f"page-{page.slug}", cls="page-section", style="display:none;") as section:
205
+ for el in page.render(idx, downloads_dir=downloads_dir, relative_prefix=""):
206
+ section += el
206
207
 
207
208
  with open(os.path.join(output_dir, "index.html"), "w") as f:
208
209
  f.write(str(index_doc))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: staticdash
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: A lightweight static HTML dashboard generator with Plotly and pandas support.
5
5
  Author-email: Brian Day <brian.day1@gmail.com>
6
6
  License: CC0-1.0
@@ -0,0 +1,8 @@
1
+ staticdash/__init__.py,sha256=KqViaDkiQnhBI8-j3hr14umLDmPgddvdB_G1nJeC5Xs,38
2
+ staticdash/dashboard.py,sha256=tihDfI7K-VS5bhEVDM_cJU2XEXgCG0B2fArEX0Paqog,9869
3
+ staticdash/assets/css/style.css,sha256=JtSJ5J3btfPyId0OKMh3uzUOSnkK2MuPcm89cb3RXEU,4543
4
+ staticdash/assets/js/script.js,sha256=pXqvTyw1LRNYl5u1kQbRtQkwe0dnd1yDs1Jstj7S-GU,4148
5
+ staticdash-0.4.0.dist-info/METADATA,sha256=IkvB_unIwpLFJs1mHKXfd7fytFr08Ei-JLLc90auAXE,1776
6
+ staticdash-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ staticdash-0.4.0.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
8
+ staticdash-0.4.0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- staticdash/__init__.py,sha256=KqViaDkiQnhBI8-j3hr14umLDmPgddvdB_G1nJeC5Xs,38
2
- staticdash/dashboard.py,sha256=lJMRt-3kGucPqGak6bty2y4xcTS4xhRYISoj9YGNVWY,9781
3
- staticdash/assets/css/style.css,sha256=I0IAJoAxyPjx5DHD4f_D0xKgFGtZOpnOUlD2qomCVfw,3978
4
- staticdash/assets/js/script.js,sha256=pXqvTyw1LRNYl5u1kQbRtQkwe0dnd1yDs1Jstj7S-GU,4148
5
- staticdash-0.3.3.dist-info/METADATA,sha256=rCwXd558UO6Gou5pFqfEFan5NyVJzYgtaHCZsnjB7fc,1776
6
- staticdash-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- staticdash-0.3.3.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
8
- staticdash-0.3.3.dist-info/RECORD,,