mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Further improvements to all pages listing
This commit is contained in:
parent
319f016146
commit
f0e18ebf64
5 changed files with 11 additions and 9 deletions
|
@ -312,7 +312,7 @@ textarea ~ input[type=submit] { margin: 0.5rem 0.8rem; padding: 0.5rem; font-wei
|
||||||
|
|
||||||
.page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
|
.page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
|
||||||
.page-list li { 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 .size { margin-left: 0.7rem; color: rgba(30, 30, 30, 0.5); }
|
||||||
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
|
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
|
||||||
.page-list li .tags { margin: 0 1rem; }
|
.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; }
|
||||||
|
@ -460,9 +460,10 @@ if($env->is_logged_in)
|
||||||
*/
|
*/
|
||||||
function human_filesize($bytes, $decimals = 2)
|
function human_filesize($bytes, $decimals = 2)
|
||||||
{
|
{
|
||||||
$sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"];
|
$sz = ["b", "kb", "mb", "gb", "tb", "pb", "eb", "yb", "zb"];
|
||||||
$factor = floor((strlen($bytes) - 1) / 3);
|
$factor = floor((strlen($bytes) - 1) / 3);
|
||||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
$result = round($bytes / pow(1024, $factor), $decimals);
|
||||||
|
return $result . @$sz[$factor];
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* @summary Calculates the time sincce a particular timestamp and returns a
|
* @summary Calculates the time sincce a particular timestamp and returns a
|
||||||
|
|
5
core.php
5
core.php
|
@ -106,9 +106,10 @@ if($env->is_logged_in)
|
||||||
*/
|
*/
|
||||||
function human_filesize($bytes, $decimals = 2)
|
function human_filesize($bytes, $decimals = 2)
|
||||||
{
|
{
|
||||||
$sz = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "YB", "ZB"];
|
$sz = ["b", "kb", "mb", "gb", "tb", "pb", "eb", "yb", "zb"];
|
||||||
$factor = floor((strlen($bytes) - 1) / 3);
|
$factor = floor((strlen($bytes) - 1) / 3);
|
||||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
$result = round($bytes / pow(1024, $factor), $decimals);
|
||||||
|
return $result . @$sz[$factor];
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* @summary Calculates the time sincce a particular timestamp and returns a
|
* @summary Calculates the time sincce a particular timestamp and returns a
|
||||||
|
|
|
@ -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": 1450261390,
|
"lastupdate": 1450292650,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -301,7 +301,7 @@ textarea ~ input[type=submit] { margin: 0.5rem 0.8rem; padding: 0.5rem; font-wei
|
||||||
|
|
||||||
.page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
|
.page-list { list-style-type: none; margin: 0.5rem; padding: 0.5rem; }
|
||||||
.page-list li { 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 .size { margin-left: 0.7rem; color: rgba(30, 30, 30, 0.5); }
|
||||||
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
|
.page-list li .editor { display: inline-block; margin: 0 0.5rem; }
|
||||||
.page-list li .tags { margin: 0 1rem; }
|
.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; }
|
||||||
|
|
Loading…
Reference in a new issue