1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 16:33:00 +00:00

Improve look of page list

This commit is contained in:
Starbeamrainbowlabs 2015-12-16 10:24:13 +00:00
parent e0e586fe28
commit 319f016146
4 changed files with 27 additions and 39 deletions

View file

@ -310,7 +310,11 @@ textarea ~ input[type=submit] { margin: 0.5rem 0.8rem; padding: 0.5rem; font-wei
.page-tags-display li a { color: #FB701A; text-decoration: none; } .page-tags-display li a { color: #FB701A; text-decoration: none; }
.page-tags-display li::before { content: \"\\A\"; position: relative; top: 0.03rem; left: -0.9rem; width: 0; height: 0; border-top: 0.6rem solid transparent; border-bottom: 0.6rem solid transparent; border-right: 0.5rem solid #D2C3DD; } .page-tags-display li::before { content: \"\\A\"; position: relative; top: 0.03rem; left: -0.9rem; width: 0; height: 0; border-top: 0.6rem solid transparent; border-bottom: 0.6rem solid transparent; border-right: 0.5rem solid #D2C3DD; }
.page-list td { padding: 0.5rem 0.2rem 0.5rem 0.2rem; } .page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
.page-list li { margin: 0.5rem; padding: 0.5rem; }
.page-list li .size { color: rgba(30, 30, 30, 0.5); }
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
.page-list li .tags { margin: 0 1rem; }
.tag-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; } .tag-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
.tag-list li { margin: 1rem } .tag-list li { margin: 1rem }
.mini-tag { background: #d2c3dd; padding: 0.2rem 0.4rem; color: #fb701a; text-decoration: none; } .mini-tag { background: #d2c3dd; padding: 0.2rem 0.4rem; color: #fb701a; text-decoration: none; }
@ -2883,15 +2887,8 @@ register_module([
function generate_page_list($pagelist) function generate_page_list($pagelist)
{ {
global $pageindex; global $pageindex;
// ✎ ✎ 🕒 🕒
$result = "<table class='page-list'> $result = "<ul class='page-list'>\n";
<tr>
<th>Page Name</th>
<th>Size</th>
<th>Last Editor</th>
<th>Last Edit Time</th>
<th>Tags</th>
</tr>\n";
foreach($pagelist as $pagename) foreach($pagelist as $pagename)
{ {
// Construct a list of tags that are attached to this page ready for display // Construct a list of tags that are attached to this page ready for display
@ -2906,16 +2903,13 @@ function generate_page_list($pagelist)
$tags = substr($tags, 0, -2); // Remove the last ", " from the tag list $tags = substr($tags, 0, -2); // Remove the last ", " from the tag list
} }
$result .= "\t\t<tr> $result .= "<li><a href='index.php?page=$pagename'>$pagename</a>
<td><a href='index.php?page=$pagename'>$pagename</a></td> <em class='size'>(" . human_filesize($pageindex->$pagename->size) . ")</em>
<td>" . human_filesize($pageindex->$pagename->size) . "</td> <span class='editor'>&#9998;" . $pageindex->$pagename->lasteditor . "</span>
<td>" . $pageindex->$pagename->lasteditor . "</td> <time title='" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . "'>" . human_time_since($pageindex->$pagename->lastmodified) . "</time>
<td>" . human_time_since($pageindex->$pagename->lastmodified) . " <small>(" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . ")</small></td> <span class='tags'>$tags</span></li>";
<td>$tags</td>
</tr>\n";
} }
$result .= " </table>"; $result .= " </ul>";
return $result; return $result;
} }

View file

@ -113,7 +113,7 @@
"author": "Starbeamrainbowlabs", "author": "Starbeamrainbowlabs",
"description": "Adds a page that lists all the pages in the index along with their metadata.", "description": "Adds a page that lists all the pages in the index along with their metadata.",
"id": "page-list", "id": "page-list",
"lastupdate": 1449952102, "lastupdate": 1450261390,
"optional": false "optional": false
}, },
{ {

View file

@ -70,15 +70,8 @@ register_module([
function generate_page_list($pagelist) function generate_page_list($pagelist)
{ {
global $pageindex; global $pageindex;
// ✎ &#9998; 🕒 &#128338;
$result = "<table class='page-list'> $result = "<ul class='page-list'>\n";
<tr>
<th>Page Name</th>
<th>Size</th>
<th>Last Editor</th>
<th>Last Edit Time</th>
<th>Tags</th>
</tr>\n";
foreach($pagelist as $pagename) foreach($pagelist as $pagename)
{ {
// Construct a list of tags that are attached to this page ready for display // Construct a list of tags that are attached to this page ready for display
@ -93,16 +86,13 @@ function generate_page_list($pagelist)
$tags = substr($tags, 0, -2); // Remove the last ", " from the tag list $tags = substr($tags, 0, -2); // Remove the last ", " from the tag list
} }
$result .= "\t\t<tr> $result .= "<li><a href='index.php?page=$pagename'>$pagename</a>
<td><a href='index.php?page=$pagename'>$pagename</a></td> <em class='size'>(" . human_filesize($pageindex->$pagename->size) . ")</em>
<td>" . human_filesize($pageindex->$pagename->size) . "</td> <span class='editor'>&#9998;" . $pageindex->$pagename->lasteditor . "</span>
<td>" . $pageindex->$pagename->lasteditor . "</td> <time title='" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . "'>" . human_time_since($pageindex->$pagename->lastmodified) . "</time>
<td>" . human_time_since($pageindex->$pagename->lastmodified) . " <small>(" . date("l jS \of F Y \a\\t h:ia T", $pageindex->$pagename->lastmodified) . ")</small></td> <span class='tags'>$tags</span></li>";
<td>$tags</td>
</tr>\n";
} }
$result .= " </table>"; $result .= " </ul>";
return $result; return $result;
} }

View file

@ -299,7 +299,11 @@ textarea ~ input[type=submit] { margin: 0.5rem 0.8rem; padding: 0.5rem; font-wei
.page-tags-display li a { color: #FB701A; text-decoration: none; } .page-tags-display li a { color: #FB701A; text-decoration: none; }
.page-tags-display li::before { content: \"\\A\"; position: relative; top: 0.03rem; left: -0.9rem; width: 0; height: 0; border-top: 0.6rem solid transparent; border-bottom: 0.6rem solid transparent; border-right: 0.5rem solid #D2C3DD; } .page-tags-display li::before { content: \"\\A\"; position: relative; top: 0.03rem; left: -0.9rem; width: 0; height: 0; border-top: 0.6rem solid transparent; border-bottom: 0.6rem solid transparent; border-right: 0.5rem solid #D2C3DD; }
.page-list td { padding: 0.5rem 0.2rem 0.5rem 0.2rem; } .page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
.page-list li { margin: 0.5rem; padding: 0.5rem; }
.page-list li .size { color: rgba(30, 30, 30, 0.5); }
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
.page-list li .tags { margin: 0 1rem; }
.tag-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; } .tag-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
.tag-list li { margin: 1rem } .tag-list li { margin: 1rem }
.mini-tag { background: #d2c3dd; padding: 0.2rem 0.4rem; color: #fb701a; text-decoration: none; } .mini-tag { background: #d2c3dd; padding: 0.2rem 0.4rem; color: #fb701a; text-decoration: none; }