1
0
Fork 0

Adds some extra bling to the admin page

This commit is contained in:
sloum 2024-01-17 16:05:36 -08:00
parent 44cc5f7c6b
commit 0494d26b0c
1 changed files with 16 additions and 10 deletions

View File

@ -24,7 +24,7 @@
table{width:calc(100% - 1em)}
.error{background:darkred;color:pink}
ul.inline li{display:inline-block; margin:0}
ul.inline.pipe li:not(:last-child)::after{content: ' | '}
ul.inline.pipe li:not(:last-child)::after{content:'';margin-right:0.5em}
ul.list-style-none{list-style:none;margin:0;padding:0}
header ul.inline{position:absolute;top:0;right:2em;margin:0}
header ul.inline li{background:#333;color:#DDD;border-radius:0 0 10px 10px;padding:0.5em;margin:0 5px}
@ -38,7 +38,8 @@
thead{background: #555;color:#EEE}
fieldset{display: inline;padding: 0 2px 0 0;margin: 0 5px 0 0;border: none;vertical-align: middle}
legend{float: left;border: none;padding-inline: 0 2px}
ul:not(.inline) li {margin-bottom:0.5em}
ul:not(.inline) li {margin-bottom:0.5em;padding-left:0;margin-left:0}
.center{text-align:center;padding-left:0}
input[type="submit"] {
background-color: #333;
padding: 5px 10px;
@ -48,6 +49,11 @@
letter-spacing: 0.5px;
color: #EEE;
}
:any-link[target]::after{content:' \2197'}
:any-link{color:blue}
.action{text-decoration:none;font-size:1.25em}
details.post-list[open]{max-height:50vh;overflow-y:scroll}
details span.counter{float:right;margin-right:1em;padding:0 1em;border-radius:15px;background-color:#EEE;color:#333;border:1px solid #333}
@media only screen and (min-width: 800px) {
.container {
column-count: 2;
@ -122,7 +128,7 @@
</form>
</details>
<details class="post-list" open>
<summary>Posts</summary>
<summary>Posts <span class="counter"><?php echo count( $files ); ?></span></summary>
<table>
<thead>
<tr>
@ -136,15 +142,15 @@
foreach( $files as $f ) {
$parts = split_filename( $f );
$link = make_post_link( $f );
$del = $parts["raw"];
$f = $parts["raw"];
$out = <<<HTML
<tr>
<td>$link</td>
<td>{$parts["time"]}</td>
<td>
<td class="center">
<ul class="inline list-style-none pipe">
<li><a href="edit.php?file=posts%2F$del">Edit</a></li>
<li><a href="delete_data.php?f=$del&k=posts">Delete</a></li>
<li><a href="edit.php?file=posts%2F$f" aria-label="edit" class="action" title="Edit">&#9999;&#65039;</a></li>
<li><a href="delete_data.php?f=$f&k=posts" aria-label="delete" class="action" title="Delete">&#10060;</a></li>
</ul>
</td>
</tr>
@ -177,7 +183,7 @@ HTML;
</form>
</details>
<details class="media-list">
<summary>Media Files</summary>
<summary>Media Files <span class="counter"><?php echo count( $media_files ); ?></span></summary>
<table>
<thead>
<tr>
@ -192,8 +198,8 @@ HTML;
$out = <<<HTML
<tr>
<td>$link</td>
<td>
<a href="delete_data.php?f=$f&k=media">Delete</a>
<td class="center">
<a href="delete_data.php?f=$f&k=media" aria-label="delete" class="action" title="Delete">&#10060;</a>
</td>
</tr>
HTML;