Skip to content

Commit d3d0632

Browse files
committed
dbadmin style
1 parent f945148 commit d3d0632

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

apps/_dashboard/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def make_grid():
180180
)
181181

182182
grid = action.uses(db)(make_grid)()
183-
return dict(grid=grid)
183+
return dict(table_name="py4web_error", grid=grid)
184184

185185
@action("dbadmin/<app_name>/<db_name>/<table_name>")
186186
@action.uses(Logged(session), "dbadmin.html")
@@ -212,7 +212,7 @@ def make_grid():
212212
return Grid(table, columns=columns)
213213

214214
grid = action.uses(db)(make_grid)()
215-
return dict(grid=grid)
215+
return dict(table_name=table_name, grid=grid)
216216

217217
@action("info")
218218
@session_secured
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[[extend "layout.html"]]
2+
<h2>Table "[[=table_name]]"</h2>
23
[[=grid]]

apps/_dashboard/templates/layout.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111
.grid-table-wrapper{overflow-x: auto;}
1212
body { background: black; color: white; }
1313
body > center > * { max-width: 90vw; }
14-
form { max-width: 900px; margin: 0 auto; }
15-
nav.black a, a, label { color: #33BFFF; }
14+
form { max-width: 900px; margin: 0 0 0 20px; }
15+
nav.black a, a { color: #33BFFF; }
16+
label:not(.help) { color: black; background-color: #d1d1d1; padding: 2px 5px; margin: 5px 0 0 10px; border-top-left-radius: 5px; border-top-right-radius: 5px}
17+
span ~ label { border-radius: 5px}
18+
label ~ div { position: relative; top: -4px}
1619
button, a[role=button], input[type=submit], input[type=button] { background-color: #33BFFF; color: black}
20+
p, input, textarea { margin: 5px}
1721
thead>tr {background: black; border-top: 2px solid #33BFFF; border-bottom: 2px solid #33BFFF;}
1822
tr:hover {background:#111111}
1923
.grid-search-form {width:100%; max-width: 100%}
@@ -32,7 +36,7 @@
3236
</nav>
3337
</header>
3438
<!-- beginning of HTML inserted by extending template -->
35-
<center>
39+
<div>
3640
<div>
3741
<!-- Flash alert messages, first optional one in data-alert -->
3842
<flash-alerts class="padded" data-alert="[[=globals().get('flash','')]]"></flash-alerts>
@@ -41,7 +45,7 @@
4145
<!-- contect injected by extending page -->
4246
[[include]]
4347
</main>
44-
</center>
48+
</div>
4549
<!-- end of HTML inserted by extending template -->
4650
<footer class="black padded">
4751
<p>

0 commit comments

Comments
 (0)