staticdash 0.4.0__py3-none-any.whl → 0.4.1__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 +21 -32
- staticdash/dashboard.py +18 -8
- {staticdash-0.4.0.dist-info → staticdash-0.4.1.dist-info}/METADATA +1 -1
- staticdash-0.4.1.dist-info/RECORD +8 -0
- staticdash-0.4.0.dist-info/RECORD +0 -8
- {staticdash-0.4.0.dist-info → staticdash-0.4.1.dist-info}/WHEEL +0 -0
- {staticdash-0.4.0.dist-info → staticdash-0.4.1.dist-info}/top_level.txt +0 -0
staticdash/assets/css/style.css
CHANGED
@@ -3,47 +3,39 @@ body {
|
|
3
3
|
font-family: sans-serif;
|
4
4
|
background-color: #ffffff;
|
5
5
|
color: #333;
|
6
|
+
display: flex;
|
7
|
+
min-height: 100vh;
|
6
8
|
}
|
7
9
|
|
8
|
-
/*
|
10
|
+
/* Sidebar */
|
9
11
|
#sidebar {
|
10
|
-
position: fixed;
|
11
|
-
top: 0;
|
12
|
-
left: 0;
|
13
12
|
width: 240px;
|
14
|
-
height: 100vh;
|
15
13
|
background-color: #ffffff;
|
14
|
+
border-right: 1px solid #ccc;
|
16
15
|
padding: 20px;
|
17
16
|
box-sizing: border-box;
|
18
17
|
overflow-y: auto;
|
19
|
-
|
20
|
-
|
18
|
+
position: sticky;
|
19
|
+
top: 0;
|
20
|
+
height: 100vh;
|
21
21
|
display: flex;
|
22
22
|
flex-direction: column;
|
23
|
-
justify-content: space-between;
|
24
|
-
border-right: 1px solid #ccc;
|
25
|
-
z-index: 1000;
|
26
|
-
}
|
27
|
-
|
28
|
-
#sidebar::-webkit-scrollbar {
|
29
|
-
width: 6px;
|
30
|
-
}
|
31
|
-
|
32
|
-
#sidebar::-webkit-scrollbar-track {
|
33
|
-
background: #ffffff;
|
34
|
-
}
|
35
|
-
|
36
|
-
#sidebar::-webkit-scrollbar-thumb {
|
37
|
-
background-color: #888;
|
38
|
-
border-radius: 3px;
|
39
23
|
}
|
40
24
|
|
25
|
+
/* Sidebar header */
|
41
26
|
#sidebar h1 {
|
42
27
|
color: #2c3e50;
|
43
28
|
font-size: 20px;
|
44
29
|
margin-bottom: 20px;
|
45
30
|
}
|
46
31
|
|
32
|
+
/* Nav links container */
|
33
|
+
#sidebar .nav-links {
|
34
|
+
flex-grow: 1;
|
35
|
+
display: flex;
|
36
|
+
flex-direction: column;
|
37
|
+
}
|
38
|
+
|
47
39
|
/* Nav links */
|
48
40
|
.nav-link {
|
49
41
|
display: block;
|
@@ -71,7 +63,6 @@ body {
|
|
71
63
|
color: #7f8c8d;
|
72
64
|
text-align: center;
|
73
65
|
line-height: 1.4;
|
74
|
-
margin-top: 40px;
|
75
66
|
padding-top: 20px;
|
76
67
|
border-top: 1px solid #ccc;
|
77
68
|
}
|
@@ -85,24 +76,22 @@ body {
|
|
85
76
|
text-decoration: underline;
|
86
77
|
}
|
87
78
|
|
88
|
-
/*
|
79
|
+
/* Wrapper */
|
89
80
|
#wrapper {
|
90
|
-
|
91
|
-
padding: 0;
|
81
|
+
flex: 1;
|
92
82
|
background-color: #ffffff;
|
93
|
-
min-height: 100vh;
|
94
83
|
overflow-x: hidden;
|
84
|
+
display: flex;
|
85
|
+
flex-direction: column;
|
95
86
|
}
|
96
87
|
|
97
|
-
/* Inner content area is centered up to max-width */
|
98
88
|
#wrapper-inner {
|
99
|
-
max-width:
|
89
|
+
max-width: 2200px;
|
100
90
|
margin: 0 auto;
|
101
91
|
padding: 20px;
|
102
92
|
box-sizing: border-box;
|
103
93
|
}
|
104
94
|
|
105
|
-
/* Content area */
|
106
95
|
#content {
|
107
96
|
width: 100%;
|
108
97
|
box-sizing: border-box;
|
@@ -288,4 +277,4 @@ table.sortable th.sorted-desc::after {
|
|
288
277
|
.table-wrapper {
|
289
278
|
overflow-x: auto;
|
290
279
|
width: 100%;
|
291
|
-
}
|
280
|
+
}
|
staticdash/dashboard.py
CHANGED
@@ -160,7 +160,6 @@ class Dashboard:
|
|
160
160
|
os.makedirs(downloads_dir, exist_ok=True)
|
161
161
|
shutil.copytree(assets_src, assets_dst, dirs_exist_ok=True)
|
162
162
|
|
163
|
-
# Per-page HTML
|
164
163
|
for page in self.pages:
|
165
164
|
doc = document(title=page.title)
|
166
165
|
with doc.head:
|
@@ -172,13 +171,23 @@ class Dashboard:
|
|
172
171
|
doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-python.min.js"))
|
173
172
|
doc.head.add(script(src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-javascript.min.js"))
|
174
173
|
with doc:
|
175
|
-
with div(
|
176
|
-
|
177
|
-
|
174
|
+
with div(id="sidebar"):
|
175
|
+
h1(self.title)
|
176
|
+
with div(cls="nav-links"):
|
177
|
+
for p in self.pages:
|
178
|
+
a(p.title, cls="nav-link", href="#", **{"data-target": f"page-{p.slug}"})
|
179
|
+
with div(id="sidebar-footer"):
|
180
|
+
a("Produced by staticdash", href="https://pypi.org/project/staticdash/", target="_blank")
|
181
|
+
with div(id="wrapper"):
|
182
|
+
with div(id="wrapper-inner"):
|
183
|
+
with div(id="content"):
|
184
|
+
for idx, p in enumerate(self.pages):
|
185
|
+
with div(id=f"page-{p.slug}", cls="page-section", style="display:none;") as section:
|
186
|
+
for el in p.render(idx, downloads_dir=downloads_dir, relative_prefix=""):
|
187
|
+
section += el
|
178
188
|
with open(os.path.join(pages_dir, f"{page.slug}.html"), "w") as f:
|
179
189
|
f.write(str(doc))
|
180
190
|
|
181
|
-
# Main index.html
|
182
191
|
index_doc = document(title=self.title)
|
183
192
|
with index_doc.head:
|
184
193
|
index_doc.head.add(link(rel="stylesheet", href="assets/css/style.css"))
|
@@ -192,8 +201,9 @@ class Dashboard:
|
|
192
201
|
with index_doc:
|
193
202
|
with div(id="sidebar"):
|
194
203
|
h1(self.title)
|
195
|
-
|
196
|
-
|
204
|
+
with div(cls="nav-links"):
|
205
|
+
for page in self.pages:
|
206
|
+
a(page.title, cls="nav-link", href="#", **{"data-target": f"page-{page.slug}"})
|
197
207
|
with div(id="sidebar-footer"):
|
198
208
|
a("Produced by staticdash", href="https://pypi.org/project/staticdash/", target="_blank")
|
199
209
|
|
@@ -206,4 +216,4 @@ class Dashboard:
|
|
206
216
|
section += el
|
207
217
|
|
208
218
|
with open(os.path.join(output_dir, "index.html"), "w") as f:
|
209
|
-
f.write(str(index_doc))
|
219
|
+
f.write(str(index_doc))
|
@@ -0,0 +1,8 @@
|
|
1
|
+
staticdash/__init__.py,sha256=KqViaDkiQnhBI8-j3hr14umLDmPgddvdB_G1nJeC5Xs,38
|
2
|
+
staticdash/dashboard.py,sha256=5CWNHWFRgE0-DRQCnsxtmTigMN_Q2MuTGVGj03eUMXk,10572
|
3
|
+
staticdash/assets/css/style.css,sha256=wdTyRpTTYZtNOdb3NygdKYN6UEAKDwOoRx3-zyfphPQ,4232
|
4
|
+
staticdash/assets/js/script.js,sha256=pXqvTyw1LRNYl5u1kQbRtQkwe0dnd1yDs1Jstj7S-GU,4148
|
5
|
+
staticdash-0.4.1.dist-info/METADATA,sha256=Kw6f3V-VAbEFOlrx7Ea0IdCFA6V2fwv9MZgpIXF5uHU,1776
|
6
|
+
staticdash-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
staticdash-0.4.1.dist-info/top_level.txt,sha256=3MzZU6SptkUkjcHV1cvPji0H4aRzPphLHnpStgGEcxM,11
|
8
|
+
staticdash-0.4.1.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
|