staticdash 0.3.4__tar.gz → 0.4.0__tar.gz
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-0.3.4 → staticdash-0.4.0}/PKG-INFO +1 -1
- {staticdash-0.3.4 → staticdash-0.4.0}/pyproject.toml +1 -1
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash/assets/css/style.css +55 -32
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash/dashboard.py +7 -6
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash.egg-info/PKG-INFO +1 -1
- {staticdash-0.3.4 → staticdash-0.4.0}/README.md +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/setup.cfg +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash/__init__.py +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash/assets/js/script.js +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash.egg-info/SOURCES.txt +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash.egg-info/dependency_links.txt +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash.egg-info/requires.txt +0 -0
- {staticdash-0.3.4 → staticdash-0.4.0}/staticdash.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "staticdash"
|
7
|
-
version = "0.
|
7
|
+
version = "0.4.0"
|
8
8
|
description = "A lightweight static HTML dashboard generator with Plotly and pandas support."
|
9
9
|
authors = [
|
10
10
|
{ name = "Brian Day", email = "brian.day1@gmail.com" }
|
@@ -1,23 +1,28 @@
|
|
1
1
|
body {
|
2
2
|
margin: 0;
|
3
3
|
font-family: sans-serif;
|
4
|
-
/* background-color: #f9f9f9; */
|
5
4
|
background-color: #ffffff;
|
6
5
|
color: #333;
|
7
6
|
}
|
8
7
|
|
8
|
+
/* Fixed sidebar on the left */
|
9
9
|
#sidebar {
|
10
10
|
position: fixed;
|
11
11
|
top: 0;
|
12
12
|
left: 0;
|
13
13
|
width: 240px;
|
14
14
|
height: 100vh;
|
15
|
-
background-color: #
|
16
|
-
padding: 20px
|
15
|
+
background-color: #ffffff;
|
16
|
+
padding: 20px;
|
17
17
|
box-sizing: border-box;
|
18
18
|
overflow-y: auto;
|
19
19
|
scrollbar-width: thin;
|
20
|
-
scrollbar-color: #888 #
|
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;
|
21
26
|
}
|
22
27
|
|
23
28
|
#sidebar::-webkit-scrollbar {
|
@@ -25,7 +30,7 @@ body {
|
|
25
30
|
}
|
26
31
|
|
27
32
|
#sidebar::-webkit-scrollbar-track {
|
28
|
-
background: #
|
33
|
+
background: #ffffff;
|
29
34
|
}
|
30
35
|
|
31
36
|
#sidebar::-webkit-scrollbar-thumb {
|
@@ -34,14 +39,15 @@ body {
|
|
34
39
|
}
|
35
40
|
|
36
41
|
#sidebar h1 {
|
37
|
-
color: #
|
42
|
+
color: #2c3e50;
|
38
43
|
font-size: 20px;
|
39
44
|
margin-bottom: 20px;
|
40
45
|
}
|
41
46
|
|
47
|
+
/* Nav links */
|
42
48
|
.nav-link {
|
43
49
|
display: block;
|
44
|
-
color: #
|
50
|
+
color: #2c3e50;
|
45
51
|
text-decoration: none;
|
46
52
|
margin: 10px 0;
|
47
53
|
font-weight: bold;
|
@@ -51,8 +57,7 @@ body {
|
|
51
57
|
}
|
52
58
|
|
53
59
|
.nav-link:hover {
|
54
|
-
color: #
|
55
|
-
background-color: #34495e;
|
60
|
+
background-color: #ecf0f1;
|
56
61
|
}
|
57
62
|
|
58
63
|
.nav-link.active {
|
@@ -60,16 +65,15 @@ body {
|
|
60
65
|
background-color: #1abc9c;
|
61
66
|
}
|
62
67
|
|
68
|
+
/* Sidebar footer */
|
63
69
|
#sidebar-footer {
|
64
|
-
position: fixed;
|
65
|
-
bottom: 20px;
|
66
|
-
left: 20px;
|
67
|
-
width: 200px;
|
68
70
|
font-size: 12px;
|
69
71
|
color: #7f8c8d;
|
70
72
|
text-align: center;
|
71
73
|
line-height: 1.4;
|
72
|
-
|
74
|
+
margin-top: 40px;
|
75
|
+
padding-top: 20px;
|
76
|
+
border-top: 1px solid #ccc;
|
73
77
|
}
|
74
78
|
|
75
79
|
#sidebar-footer a {
|
@@ -81,14 +85,33 @@ body {
|
|
81
85
|
text-decoration: underline;
|
82
86
|
}
|
83
87
|
|
84
|
-
|
85
|
-
|
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;
|
86
101
|
padding: 20px;
|
87
102
|
box-sizing: border-box;
|
88
103
|
}
|
89
104
|
|
105
|
+
/* Content area */
|
106
|
+
#content {
|
107
|
+
width: 100%;
|
108
|
+
box-sizing: border-box;
|
109
|
+
}
|
110
|
+
|
90
111
|
.page-section {
|
91
112
|
display: none;
|
113
|
+
max-width: 100%;
|
114
|
+
overflow-x: auto;
|
92
115
|
}
|
93
116
|
|
94
117
|
.page-section.active {
|
@@ -111,7 +134,7 @@ table {
|
|
111
134
|
border-collapse: collapse;
|
112
135
|
margin-top: 1em;
|
113
136
|
background-color: white;
|
114
|
-
box-shadow: 0 2px 4px rgba(0,
|
137
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
115
138
|
overflow-x: auto;
|
116
139
|
}
|
117
140
|
|
@@ -120,8 +143,7 @@ thead {
|
|
120
143
|
color: white;
|
121
144
|
}
|
122
145
|
|
123
|
-
th,
|
124
|
-
td {
|
146
|
+
th, td {
|
125
147
|
padding: 10px;
|
126
148
|
border: 1px solid #ddd;
|
127
149
|
text-align: left;
|
@@ -135,12 +157,14 @@ tbody tr:hover {
|
|
135
157
|
background-color: #e8f0fe;
|
136
158
|
}
|
137
159
|
|
160
|
+
/* Images */
|
138
161
|
.dash-image {
|
139
162
|
max-width: 100%;
|
140
163
|
height: auto;
|
141
164
|
margin: 1em 0;
|
142
165
|
}
|
143
166
|
|
167
|
+
/* Download Button */
|
144
168
|
.download-button {
|
145
169
|
display: inline-block;
|
146
170
|
padding: 0.5em 1em;
|
@@ -156,7 +180,7 @@ tbody tr:hover {
|
|
156
180
|
background-color: #547a9f;
|
157
181
|
}
|
158
182
|
|
159
|
-
/* Sortable
|
183
|
+
/* Sortable Table Headers */
|
160
184
|
table.sortable th {
|
161
185
|
cursor: pointer;
|
162
186
|
position: relative;
|
@@ -173,20 +197,21 @@ table.sortable th::after {
|
|
173
197
|
}
|
174
198
|
|
175
199
|
table.sortable th.sorted-asc::after {
|
176
|
-
content: "
|
200
|
+
content: "▲";
|
177
201
|
}
|
178
202
|
|
179
203
|
table.sortable th.sorted-desc::after {
|
180
|
-
content: "
|
204
|
+
content: "▼";
|
181
205
|
}
|
182
206
|
|
183
207
|
/* MiniPage Layout */
|
184
208
|
.minipage-row {
|
185
209
|
display: flex;
|
186
|
-
width: 100%;
|
187
210
|
gap: 20px;
|
188
211
|
margin-bottom: 20px;
|
212
|
+
max-width: 100%;
|
189
213
|
box-sizing: border-box;
|
214
|
+
overflow-x: auto;
|
190
215
|
}
|
191
216
|
|
192
217
|
.minipage-cell {
|
@@ -208,8 +233,7 @@ table.sortable th.sorted-desc::after {
|
|
208
233
|
}
|
209
234
|
|
210
235
|
.minipage-cell .syntax-block {
|
211
|
-
margin
|
212
|
-
margin-bottom: 0.5em;
|
236
|
+
margin: .5em 0;
|
213
237
|
}
|
214
238
|
|
215
239
|
.minipage-cell table {
|
@@ -233,8 +257,8 @@ table.sortable th.sorted-desc::after {
|
|
233
257
|
padding: 1em;
|
234
258
|
background: none;
|
235
259
|
color: inherit;
|
236
|
-
font-family: 'Fira Mono',
|
237
|
-
font-size:
|
260
|
+
font-family: 'Fira Mono','Consolas',monospace;
|
261
|
+
font-size: .95em;
|
238
262
|
}
|
239
263
|
|
240
264
|
.code-toolbar {
|
@@ -244,24 +268,23 @@ table.sortable th.sorted-desc::after {
|
|
244
268
|
z-index: 2;
|
245
269
|
}
|
246
270
|
|
247
|
-
.copy-btn,
|
248
|
-
.view-raw-btn {
|
271
|
+
.copy-btn, .view-raw-btn {
|
249
272
|
color: #fff;
|
250
273
|
background: #444;
|
251
274
|
border-radius: 4px;
|
252
275
|
padding: 2px 8px;
|
253
|
-
font-size:
|
276
|
+
font-size: .85em;
|
254
277
|
text-decoration: none;
|
255
278
|
margin-left: 4px;
|
256
279
|
cursor: pointer;
|
257
280
|
transition: background 0.2s;
|
258
281
|
}
|
259
282
|
|
260
|
-
.copy-btn:hover,
|
261
|
-
.view-raw-btn:hover {
|
283
|
+
.copy-btn:hover, .view-raw-btn:hover {
|
262
284
|
background: #1abc9c;
|
263
285
|
}
|
264
286
|
|
287
|
+
/* Table Wrapper */
|
265
288
|
.table-wrapper {
|
266
289
|
overflow-x: auto;
|
267
290
|
width: 100%;
|
@@ -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="
|
202
|
-
|
203
|
-
with div(id=
|
204
|
-
for
|
205
|
-
section
|
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))
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|