staticdash 0.4.0__py3-none-any.whl → 0.4.2__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/assets/css/style.css +86 -53
- staticdash/dashboard.py +7 -7
- {staticdash-0.4.0.dist-info → staticdash-0.4.2.dist-info}/METADATA +1 -1
- staticdash-0.4.2.dist-info/RECORD +8 -0
- staticdash-0.4.0.dist-info/RECORD +0 -8
- {staticdash-0.4.0.dist-info → staticdash-0.4.2.dist-info}/WHEEL +0 -0
- {staticdash-0.4.0.dist-info → staticdash-0.4.2.dist-info}/top_level.txt +0 -0
staticdash/assets/css/style.css
CHANGED
@@ -1,28 +1,25 @@
|
|
1
1
|
body {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: row;
|
4
|
+
min-height: 100vh;
|
2
5
|
margin: 0;
|
3
6
|
font-family: sans-serif;
|
4
|
-
background-color: #
|
7
|
+
background-color: #f9f9f9;
|
5
8
|
color: #333;
|
6
9
|
}
|
7
10
|
|
8
|
-
/* Fixed sidebar on the left */
|
9
11
|
#sidebar {
|
10
12
|
position: fixed;
|
11
|
-
top: 0;
|
12
13
|
left: 0;
|
14
|
+
top: 0;
|
13
15
|
width: 240px;
|
14
16
|
height: 100vh;
|
15
|
-
background-color: #
|
16
|
-
padding: 20px;
|
17
|
+
background-color: #2c3e50;
|
18
|
+
padding: 20px 20px 60px 20px;
|
17
19
|
box-sizing: border-box;
|
18
20
|
overflow-y: auto;
|
19
21
|
scrollbar-width: thin;
|
20
|
-
scrollbar-color: #888 #
|
21
|
-
display: flex;
|
22
|
-
flex-direction: column;
|
23
|
-
justify-content: space-between;
|
24
|
-
border-right: 1px solid #ccc;
|
25
|
-
z-index: 1000;
|
22
|
+
scrollbar-color: #888 #2c3e50;
|
26
23
|
}
|
27
24
|
|
28
25
|
#sidebar::-webkit-scrollbar {
|
@@ -30,7 +27,7 @@ body {
|
|
30
27
|
}
|
31
28
|
|
32
29
|
#sidebar::-webkit-scrollbar-track {
|
33
|
-
background: #
|
30
|
+
background: #2c3e50;
|
34
31
|
}
|
35
32
|
|
36
33
|
#sidebar::-webkit-scrollbar-thumb {
|
@@ -39,15 +36,14 @@ body {
|
|
39
36
|
}
|
40
37
|
|
41
38
|
#sidebar h1 {
|
42
|
-
color: #
|
39
|
+
color: #ecf0f1;
|
43
40
|
font-size: 20px;
|
44
41
|
margin-bottom: 20px;
|
45
42
|
}
|
46
43
|
|
47
|
-
/* Nav links */
|
48
44
|
.nav-link {
|
49
45
|
display: block;
|
50
|
-
color: #
|
46
|
+
color: #bdc3c7;
|
51
47
|
text-decoration: none;
|
52
48
|
margin: 10px 0;
|
53
49
|
font-weight: bold;
|
@@ -57,7 +53,8 @@ body {
|
|
57
53
|
}
|
58
54
|
|
59
55
|
.nav-link:hover {
|
60
|
-
|
56
|
+
color: #ffffff;
|
57
|
+
background-color: #34495e;
|
61
58
|
}
|
62
59
|
|
63
60
|
.nav-link.active {
|
@@ -65,15 +62,16 @@ body {
|
|
65
62
|
background-color: #1abc9c;
|
66
63
|
}
|
67
64
|
|
68
|
-
/* Sidebar footer */
|
69
65
|
#sidebar-footer {
|
66
|
+
position: fixed;
|
67
|
+
bottom: 20px;
|
68
|
+
left: 20px;
|
69
|
+
width: 200px;
|
70
70
|
font-size: 12px;
|
71
71
|
color: #7f8c8d;
|
72
72
|
text-align: center;
|
73
73
|
line-height: 1.4;
|
74
|
-
|
75
|
-
padding-top: 20px;
|
76
|
-
border-top: 1px solid #ccc;
|
74
|
+
background-color: #2c3e50;
|
77
75
|
}
|
78
76
|
|
79
77
|
#sidebar-footer a {
|
@@ -85,37 +83,67 @@ body {
|
|
85
83
|
text-decoration: underline;
|
86
84
|
}
|
87
85
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
#content {
|
87
|
+
flex: 1 1 auto;
|
88
|
+
display: flex;
|
89
|
+
flex-direction: column;
|
90
|
+
padding: 20px;
|
91
|
+
box-sizing: border-box;
|
93
92
|
min-height: 100vh;
|
94
|
-
|
93
|
+
margin-left: 240px;
|
94
|
+
overflow-x: auto;
|
95
|
+
min-width: 0; /* Allow shrinking below 900px */
|
95
96
|
}
|
96
97
|
|
97
|
-
|
98
|
-
|
99
|
-
|
98
|
+
.content-inner {
|
99
|
+
max-width: 900px;
|
100
|
+
width: 100%;
|
101
|
+
min-width: 0;
|
100
102
|
margin: 0 auto;
|
101
|
-
|
102
|
-
|
103
|
+
display: flex;
|
104
|
+
flex-direction: column;
|
105
|
+
min-height: 100vh;
|
103
106
|
}
|
104
107
|
|
105
|
-
|
106
|
-
#content {
|
107
|
-
|
108
|
-
|
108
|
+
@media (max-width: 1200px) {
|
109
|
+
#content {
|
110
|
+
max-width: 98vw;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
@media (max-width: 940px) {
|
115
|
+
#content {
|
116
|
+
/* Keep margin-left: 240px; so content never jumps under sidebar */
|
117
|
+
min-width: 0;
|
118
|
+
padding: 10px;
|
119
|
+
}
|
120
|
+
.content-inner {
|
121
|
+
max-width: 100vw;
|
122
|
+
min-width: 0;
|
123
|
+
width: 100%;
|
124
|
+
overflow-x: auto;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
@media (max-width: 800px) {
|
129
|
+
#content {
|
130
|
+
overflow-x: auto;
|
131
|
+
}
|
132
|
+
.content-inner {
|
133
|
+
width: 900px;
|
134
|
+
min-width: 900px;
|
135
|
+
max-width: 900px;
|
136
|
+
}
|
109
137
|
}
|
110
138
|
|
111
139
|
.page-section {
|
112
140
|
display: none;
|
113
|
-
|
114
|
-
overflow-x: auto;
|
141
|
+
width: 100%;
|
115
142
|
}
|
116
143
|
|
117
144
|
.page-section.active {
|
118
145
|
display: block;
|
146
|
+
width: 100%;
|
119
147
|
}
|
120
148
|
|
121
149
|
.plot-container {
|
@@ -134,7 +162,7 @@ table {
|
|
134
162
|
border-collapse: collapse;
|
135
163
|
margin-top: 1em;
|
136
164
|
background-color: white;
|
137
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
165
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
138
166
|
overflow-x: auto;
|
139
167
|
}
|
140
168
|
|
@@ -143,7 +171,8 @@ thead {
|
|
143
171
|
color: white;
|
144
172
|
}
|
145
173
|
|
146
|
-
th,
|
174
|
+
th,
|
175
|
+
td {
|
147
176
|
padding: 10px;
|
148
177
|
border: 1px solid #ddd;
|
149
178
|
text-align: left;
|
@@ -157,14 +186,12 @@ tbody tr:hover {
|
|
157
186
|
background-color: #e8f0fe;
|
158
187
|
}
|
159
188
|
|
160
|
-
/* Images */
|
161
189
|
.dash-image {
|
162
190
|
max-width: 100%;
|
163
191
|
height: auto;
|
164
192
|
margin: 1em 0;
|
165
193
|
}
|
166
194
|
|
167
|
-
/* Download Button */
|
168
195
|
.download-button {
|
169
196
|
display: inline-block;
|
170
197
|
padding: 0.5em 1em;
|
@@ -180,7 +207,7 @@ tbody tr:hover {
|
|
180
207
|
background-color: #547a9f;
|
181
208
|
}
|
182
209
|
|
183
|
-
/* Sortable
|
210
|
+
/* Sortable Tables */
|
184
211
|
table.sortable th {
|
185
212
|
cursor: pointer;
|
186
213
|
position: relative;
|
@@ -197,21 +224,20 @@ table.sortable th::after {
|
|
197
224
|
}
|
198
225
|
|
199
226
|
table.sortable th.sorted-asc::after {
|
200
|
-
content: "
|
227
|
+
content: "\25B2";
|
201
228
|
}
|
202
229
|
|
203
230
|
table.sortable th.sorted-desc::after {
|
204
|
-
content: "
|
231
|
+
content: "\25BC";
|
205
232
|
}
|
206
233
|
|
207
234
|
/* MiniPage Layout */
|
208
235
|
.minipage-row {
|
209
236
|
display: flex;
|
237
|
+
width: 100%;
|
210
238
|
gap: 20px;
|
211
239
|
margin-bottom: 20px;
|
212
|
-
max-width: 100%;
|
213
240
|
box-sizing: border-box;
|
214
|
-
overflow-x: auto;
|
215
241
|
}
|
216
242
|
|
217
243
|
.minipage-cell {
|
@@ -233,7 +259,8 @@ table.sortable th.sorted-desc::after {
|
|
233
259
|
}
|
234
260
|
|
235
261
|
.minipage-cell .syntax-block {
|
236
|
-
margin: .5em
|
262
|
+
margin-top: 0.5em;
|
263
|
+
margin-bottom: 0.5em;
|
237
264
|
}
|
238
265
|
|
239
266
|
.minipage-cell table {
|
@@ -257,8 +284,8 @@ table.sortable th.sorted-desc::after {
|
|
257
284
|
padding: 1em;
|
258
285
|
background: none;
|
259
286
|
color: inherit;
|
260
|
-
font-family: 'Fira Mono','Consolas',monospace;
|
261
|
-
font-size: .95em;
|
287
|
+
font-family: 'Fira Mono', 'Consolas', monospace;
|
288
|
+
font-size: 0.95em;
|
262
289
|
}
|
263
290
|
|
264
291
|
.code-toolbar {
|
@@ -268,24 +295,30 @@ table.sortable th.sorted-desc::after {
|
|
268
295
|
z-index: 2;
|
269
296
|
}
|
270
297
|
|
271
|
-
.copy-btn,
|
298
|
+
.copy-btn,
|
299
|
+
.view-raw-btn {
|
272
300
|
color: #fff;
|
273
301
|
background: #444;
|
274
302
|
border-radius: 4px;
|
275
303
|
padding: 2px 8px;
|
276
|
-
font-size: .85em;
|
304
|
+
font-size: 0.85em;
|
277
305
|
text-decoration: none;
|
278
306
|
margin-left: 4px;
|
279
307
|
cursor: pointer;
|
280
308
|
transition: background 0.2s;
|
281
309
|
}
|
282
310
|
|
283
|
-
.copy-btn:hover,
|
311
|
+
.copy-btn:hover,
|
312
|
+
.view-raw-btn:hover {
|
284
313
|
background: #1abc9c;
|
285
314
|
}
|
286
315
|
|
287
|
-
/* Table Wrapper */
|
288
316
|
.table-wrapper {
|
289
317
|
overflow-x: auto;
|
290
318
|
width: 100%;
|
319
|
+
}
|
320
|
+
|
321
|
+
table, .syntax-block, pre {
|
322
|
+
max-width: 100%;
|
323
|
+
overflow-x: auto;
|
291
324
|
}
|
staticdash/dashboard.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2
2
|
import shutil
|
3
3
|
import uuid
|
4
4
|
import pandas as pd
|
5
|
+
import plotly.graph_objects as go
|
5
6
|
from dominate import document
|
6
7
|
from dominate.tags import div, h1, h2, h3, h4, p, a, script, link
|
7
8
|
from dominate.util import raw as raw_util
|
@@ -197,13 +198,12 @@ class Dashboard:
|
|
197
198
|
with div(id="sidebar-footer"):
|
198
199
|
a("Produced by staticdash", href="https://pypi.org/project/staticdash/", target="_blank")
|
199
200
|
|
200
|
-
with div(id="
|
201
|
-
with div(
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
section += el
|
201
|
+
with div(id="content"):
|
202
|
+
with div(cls="content-inner"):
|
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
|
207
207
|
|
208
208
|
with open(os.path.join(output_dir, "index.html"), "w") as f:
|
209
209
|
f.write(str(index_doc))
|
@@ -0,0 +1,8 @@
|
|
1
|
+
staticdash/__init__.py,sha256=KqViaDkiQnhBI8-j3hr14umLDmPgddvdB_G1nJeC5Xs,38
|
2
|
+
staticdash/dashboard.py,sha256=wfFJ6XPSs711jUSWPkHzRxsAU02g7zzyA9rkIiWfbwA,9844
|
3
|
+
staticdash/assets/css/style.css,sha256=mT-WK5zr3AoKENSrqYqL65pposLhbHKeuri8Xr6IjRo,4928
|
4
|
+
staticdash/assets/js/script.js,sha256=pXqvTyw1LRNYl5u1kQbRtQkwe0dnd1yDs1Jstj7S-GU,4148
|
5
|
+
staticdash-0.4.2.dist-info/METADATA,sha256=F0_mWymbExiHFnQJb69x8fJsqYp2r1vvtV07rkzJKdg,1776
|
6
|
+
staticdash-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
staticdash-0.4.2.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
|
8
|
+
staticdash-0.4.2.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
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,,
|
File without changes
|
File without changes
|