Browse Source

htdocs: blue skin

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1068 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 9 years ago
parent
commit
1761854eb5
  1. 24
      htdocs/cacher/cacher.css
  2. 12
      htdocs/cacher/cacher.php
  3. 56
      htdocs/cacher/cacher.tpl.php
  4. 193
      htdocs/common/common.css
  5. 18
      htdocs/common/common.php
  6. 15
      htdocs/common/footer.tpl.php
  7. 18
      htdocs/common/header.tpl.php
  8. 3
      htdocs/coverager/coverager.css
  9. 12
      htdocs/coverager/coverager.tpl.php

24
htdocs/cacher/cacher.css

@ -1,28 +1,20 @@
td, th { white-space: pre; }
.phpinfo table { border: 1px solid black; margin-bottom: 1px; }
.phpinfo table th, .phpinfo table td { border: 1px solid black; }
.phpinfo table th { font-weight: bold; }
.phpinfo .e {background-color: #ccccff; font-weight: bold; color: #000000;}
.phpinfo .h {background-color: #9999cc; font-weight: bold; color: #000000;}
.phpinfo .v {background-color: #cccccc; color: #000000;}
.button { }
span.sortarrow { color: white; text-decoration: none; }
form {margin: 0; padding: 0}
.percent { height: 3px; margin-bottom: 1px; border: 1px solid gray; }
.percent div { float: left; height: 100%; }
.pvalue { background: limegreen; }
.blocksgraph { height: 16px; }
.blocksgraph div { float: left; height: 3px; width: 4px; border: solid gray; border-width: 0 0px 1px 0; }
.blocksgraph { border: 1px solid gray; border-bottom: 0px; }
.blocksgraph { height: 13px; }
.blocksgraph div { float: left; height: 3px; width: 4px; border: solid gray; border-width: 0 0 1px 0; }
.blocksgraph { border: 1px solid gray; border-bottom: 0; }
.percent *, .blocksgraph *, .hitsgraph * { font-size: 1px; font-height: 1px; }
.hitsgraph { height: 20px; margin: auto; }
.hitsgraph { margin: auto; }
.hitsgraph div { float: left; width: 2px; height: 100%; }
.hitsgraph div:hover { background: gray; }
.hitsgraph div div { float: none; width: 100%; }
.hitsgraph div div.barf { border: 0px solid gray; border-width: 1px 0 0 0; }
.hitsgraph div div.barv { border: 0px solid gray; border-width: 0 0 1px 0; }
.hitsgraph div div.barf { border: 0 solid gray; border-width: 1px 0 0 0; }
.hitsgraph div div.barv { border: 0 solid gray; border-width: 0 0 1px 0; }
.hitsgraph div div.barf.active { border-color: yellow; }
.hitsgraph div div.barv.active { border-color: yellow; }
@ -30,6 +22,6 @@ form {margin: 0; padding: 0}
dl { overflow: hidden; }
dt { font-weight: bold; clear: both; float: left; width: 100px; text-align: right; margin: 0; }
dd { margin: 0; }
.blockarea { overflow: hidden; _width: 1px; }
.blockarea { overflow: hidden; width: 400px; }
div.legend { float: left; border: 1px solid gray; font: 12px/12px monospace; }
div.legendtitle { float: left; padding: 2px; padding-right: 10px; font: 12px/12px monospace; }

12
htdocs/cacher/cacher.php

@ -34,6 +34,9 @@ function freeblock_to_graph($freeblocks, $size)
if ($config['percent_graph_type'] != 'free') {
$v = 1 - $v;
}
if ($k % 30 == 0) {
$v = 1;
}
$v = (int) ($v * $c);
$r = $g = $c - $v;
$b = $c;
@ -85,9 +88,14 @@ function bar_hits_percent($v, $percent, $active)
$g = $b = 220 - (int) ($percent * 220);
$percent = (int) ($percent * 100);
$a = $active ? ' active' : '';
$height = 20;
$valueHeight = ceil($height * $percent / 100);
$paddingHeight = $height - $valueHeight;
$valueHeight = $valueHeight ? $valueHeight . "px" : 0;
$paddingHeight = $paddingHeight ? $paddingHeight . "px" : 0;
return '<div title="' . $v . '">'
. '<div class="barf' . $a . '" style="height: ' . (100 - $percent) . '%"></div>'
. '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $percent . '%"></div>'
. '<div class="barf' . $a . '" style="height: ' . $paddingHeight . '"></div>'
. '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $valueHeight . '"></div>'
. '</div>';
}

56
htdocs/cacher/cacher.tpl.php

@ -9,24 +9,6 @@ $b = new Cycle('class="col1"', 'class="col2"');
?>
<table cellspacing="0" cellpadding="4" class="cycles caches">
<caption><?php echo _('Caches'); ?></caption>
<col />
<col align="right" />
<col align="right" />
<col align="right" />
<col />
<col />
<col align="right" />
<col align="right" />
<col align="right" />
<col />
<col align="right" />
<col align="right" />
<col align="right" />
<col align="right" />
<col align="right" />
<col align="right" />
<col align="right" />
<col />
<tr <?php echo $a->next(); ?>>
<?php echo
th(N_("cache.cache"))
@ -72,7 +54,7 @@ $b = new Cycle('class="col1"', 'class="col2"');
$pempty = $tmp;
}
$w = $config['percent_graph_width'];
$w = $config['percent_graph_width'] + 2;
if (empty($ci['istotal'])) {
$graph = freeblock_to_graph($ci['free_blocks'], $ci['size']);
$blocksgraph = "<div class=\"blocksgraph\" style=\"width: {$w}px\">{$graph}</div>";
@ -114,9 +96,9 @@ $b = new Cycle('class="col1"', 'class="col2"');
$l_enabledisable = $ci['disabled'] ? $l_enable : $l_disable;
echo <<<EOS
<th>{$ci['cache_name']}</th>
<td title="{$ci['slots']}">{$ci_slots}</td>
<td title="{$ci['size']}">{$ci_size}</td>
<td title="{$ci['avail']}">{$ci_avail}</td>
<td align="right" title="{$ci['slots']}">{$ci_slots}</td>
<td align="right" title="{$ci['size']}">{$ci_size}</td>
<td align="right" title="{$ci['avail']}">{$ci_avail}</td>
<td title="{$pvalue} %"
><div class="percent" style="width: {$w}px"
><div style="width: {$pvalue}%" class="pvalue"></div
@ -134,18 +116,18 @@ $b = new Cycle('class="col1"', 'class="col2"');
></form
></td>
<td>{$ci['status']}</td>
<td>{$ci['hits']}</td>
<td align="right">{$ci['hits']}</td>
<td><div class="hitsgraph" style="width: {$hits_graph_h_w}px">{$hits_graph_h}</div></td>
<td>{$hits_avg_h}</td>
<td>{$hits_avg_s}</td>
<td>{$ci['updates']}</td>
<td>{$ci['skips']}</td>
<td>{$ci['ooms']}</td>
<td>{$ci['errors']}</td>
<td align="right">{$hits_avg_h}</td>
<td align="right">{$hits_avg_s}</td>
<td align="right">{$ci['updates']}</td>
<td align="right">{$ci['skips']}</td>
<td align="right">{$ci['ooms']}</td>
<td align="right">{$ci['errors']}</td>
<td>{$ci['can_readonly']}</td>
<td>{$ci['cached']}</td>
<td>{$ci['deleted']}</td>
<td>{$ci['gc']}</td>
<td align="right">{$ci['cached']}</td>
<td align="right">{$ci['deleted']}</td>
<td align="right">{$ci['gc']}</td>
EOS;
$b->reset();
@ -172,7 +154,7 @@ if ($cachelist) {
?>
<form action="" method="post">
<table cellspacing="0" cellpadding="4" class="cycles entries" width="100%">
<table cellspacing="0" cellpadding="4" class="cycles entries">
<caption><?php echo _("{$cachelist['type_name']} $listname"); ?></caption>
<?php
echo "
@ -187,7 +169,7 @@ if ($cachelist) {
}
else {
echo
th("entry.remove", 'width="20"')
th("entry.remove")
;
}
@ -311,7 +293,8 @@ ENTRY;
}
ob_end_flush();
}
if (ini_get("xcache.test")) {
if ($moduleinfo) {
if (ini_get("xcache.test")) {
?>
<form method="post" action=""
><div
@ -319,8 +302,7 @@ if (ini_get("xcache.test")) {
/></div
></form>
<?php
}
if ($moduleinfo) {
}
$t_moduleinfo = _("Module Info");
echo <<<HTML
<h2>$t_moduleinfo</h2>

193
htdocs/common/common.css

@ -1,23 +1,180 @@
table.cycles { border: 1px solid black; margin-top: 5px; margin-bottom: 5px; }
table.cycles .col1 { background-color: #f5f5f5; }
table.cycles .col2 { background-color: #e0e0e0; }
table.cycles th, table.cycles td { border: 1px solid black; font-family: monospace; }
table.cycles th { background-color: #9999cc; color: black; font-weight: bold; height: 20px; line-height: 20px; font-family: serif; }
th a { color: black; font-weight: bold; display: block; width: 100%; height: 100%; }
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
body {
background: white;
color: black;
margin: 0;
padding: 0;
font-family: arial;
font-size: 12pt;
}
form {
margin: 0;
padding: 0;
}
a:link
, a:visited {
color: #0066CC;
}
a:link:hover
, a:visited:hover {
color: #BB0000;
}
a:link:active
, a:visited:active {
color: red;
}
#header {
background: #5084D5;
position: relative;
height: 51px;
color: #d0d0d0;
}
h1, h2, h3, h4, h5, h6 {
margin-bottom: 2px;
}
#header #banner {
font: 32px/51px serif;
padding-left: 10px;
color: white;
font-family: "arial", serif;
}
#header #mainnav {
top: 3px;
right: 5px;
font-size: 16px;
line-height: 16px;
position: absolute;
}
#header #mainnav a {
font-size: 14px;
}
#header #subnav {
bottom: 0;
right: 5px;
position: absolute;
font-size: 28px;
line-height: 28px;
}
#header #subnav a {
font-size: 24px;
}
#header #nav {
font-family: "arial", serif;
}
#header #mainnav a:link, #header #mainnav a:visited {
color: black;
}
#header #mainnav a:active, #header #mainnav a:hover {
color: red;
}
#headerbase {
background: #1163BC;
border: 1px solid #334C66;
border-width: 1px 0 1px 0;
margin-bottom: 10px;
font: 12px/12px serif;
}
#main table {
font-size: 12px;
border: 1px solid #334C66;
border-top-width: 0;
}
#main table caption {
background: #1163BC;
color: white;
line-height: 20px;
border: 1px solid #334C66;
border-bottom-width: 0;
padding: 0;
}
#main table tfoot {
background: #1163BC;
}
#main table th {
background: #E7E7FF;
color: black;
}
#main table td {
vertical-align: top;
}
#main {
margin: 20px;
}
#note {
font-size: 11.9px;
}
#footer {
bottom: 0px;
background: #E7E7FF;
border-top: 1px solid gray;
}
#poweredBy {
overflow: hidden;
}
#footer {
clear: both;
height: 40px;
position: relative;
}
#footer img {
margin-top: 2px;
margin-left: 2px;
border: 0;
}
#poweredBy h3 {
float: right;
margin-right: 20px;
margin-top: 20px;
}
#poweredBy h3 {
margin: 0;
font-size: 12px;
position: absolute;
bottom: 8px;
right: 8px;
}
.phpinfo table { border: 1px solid black; margin-bottom: 1px; }
.phpinfo table th, .phpinfo table td { border: 1px solid black; }
.phpinfo table th { font-weight: bold; }
.phpinfo .e {background: #81BBF2; font-weight: bold; color: #000000;}
#main .phpinfo .h th {background: #5084D5; font-weight: bold; color: #000000;}
.phpinfo .v {color: #000000;}
.button { }
span.sortarrow { color: white; text-decoration: none; }
table.cycles { border: 1px solid #334C66; margin-bottom: 5px; }
table.cycles .col1 { background: #f5f5f5; }
table.cycles .col2 { background: #e0e0e0; }
table.cycles th, table.cycles td { border: 1px solid #334C66; font-family: monospace; }
#main table.cycles caption { color: white; font-weight: bold; height: 24px; line-height: 24px; font-family: serif; }
#main table.cycles th { background: #81BBF2; color: #334C66; font-weight: bold; height: 20px; line-height: 20px; font-family: serif; }
#main table.cycles th.h { background: #5084D5; }
th.h a:visited
, th.h a:link { color: black; }
th.h a:hover { color: #BB0000; }
th.h a:active { color: red; }
th a { font-weight: bold; display: block; width: 100%; height: 100%; }
th { font-size: 12px; }
input, table { font-family: sans-serif; }
input { font-size: 12px; }
table { border-collapse: collapse; font-size: 11px; margin: 0; }
table caption, h2, h3 { font-size: 16px; font-weight: bold; text-align: left; padding-top: 20px; margin-bottom: 2px; }
h3 { font-size: 14px; padding-top: 2px; margin-bottom: 0px; }
table caption {
font-size: 14px;
font-weight: bold;
}
h1 { text-align: center; display: block; }
.switcher { text-align: center; display: block; padding: 2px 0 2px 0; }
.switcher a { color: blue; padding: 1px 8px 1px 8px; border: 1px solid white; border-bottom-color: black; text-decoration: none; }
.switcher a:hover.active
, .switcher a:active.active
, .switcher a.active { color: black; background: #99C; border-color: #99C; border-left-color: black; border-right-color: black; }
.switcher a:hover { background: #f0f0f0; }
.switcher a:active { background: #e0e0e0; }
.footnote { text-align: right; font-size: 12px; }
a {
text-decoration: none;
}
#main table td {
vertical-align: middle;
}
.switcher a { color: black; padding: 1px 8px 1px 8px; border: 1px solid white; }
.switcher a { border-color: white; border-bottom-color: #334C66; }
#nav .switcher a { border-color: #5084D5; border-bottom-color: #334C66; }
#nav .switcher a.active, .switcher a.active { color: white; background: #1163BC; border-color: #334C66; border-bottom-color: #1163BC; }
#nav .switcher a:hover.active, .switcher a:hover.active { background: #81BBF2; }
.switcher a:hover { background: #81BBF2; }
#nav .switcher a:active, .switcher a:active { background: #81BBF2; }

18
htdocs/common/common.php

@ -40,7 +40,19 @@ function switcher($name, $options)
return implode('', $html);
}
function moduleswitcher()
function mainnav()
{
foreach (array(
"http://xcache.lighttpd.net/" => "XCache",
"http://www.php.net/" => "PHP",
"http://www.lighttpd.net/" => "LIGHTTPD",
) as $url => $title) {
$html[] = sprintf('<a href="%s" target="_blank">%s</a>', $url, $title);
}
return implode('|', $html);
}
function subnav()
{
global $module, $modules;
$html = array();
@ -57,7 +69,7 @@ function th($name, $attrs = null)
$translated = "$name|$name";
}
list($text, $title) = explode('|', $translated, 2);
return sprintf('%s<th%s id="%s" title="%s"><a href="javascript:" onclick="resort(this); return false">%s</a></th>%s'
return sprintf('%s<th%s id="%s" class="h" title="%s"><a href="javascript:" onclick="resort(this); return false">%s</a></th>%s'
, "\t"
, $attrs ? " $attrs" : ""
, $name, htmlspecialchars(trim($title)), trim($text)
@ -253,5 +265,7 @@ if (file_exists("../coverager/index.php")) {
}
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Content-Type: text/html; " . $GLOBALS['config']['charset']);
header("Content-Language: " . $GLOBALS['config']['lang']);
?>

15
htdocs/common/footer.tpl.php

@ -1,12 +1,21 @@
<div class="footnote">
PHP <?php
</div>
<div id="footer">
<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
</a>
<a href="http://feed.w3.org/check.cgi?url=http://<?php echo $_SERVER["HTTP_HOST"], $_SERVER["REQUEST_URI"]; ?>">
<img src="http://validator.w3.org/feed/images/valid-rss-rogers.png" alt="Valid RSS" title="Validate my RSS feed" />
</a>
<div id="poweredBy">
<h3>PHP <?php
echo phpversion();
?> Powered By: XCache <?php
echo defined('XCACHE_VERSION') ? XCACHE_VERSION : '';
?>, <?php
echo defined('XCACHE_MODULES') ? XCACHE_MODULES : '';
?>
</h3>
</div>
</div>
</body>

18
htdocs/common/header.tpl.php

@ -1,8 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=6" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['config']['charset']; ?>" />
<meta http-equiv="Content-Language" content="<?php echo $GLOBALS['config']['charset']; ?>" />
<meta http-equiv="Content-Language" content="<?php echo $GLOBALS['config']['lang']; ?>" />
<script type="text/javascript" src="tablesort.js"></script>
<link rel="stylesheet" type="text/css" href="../common/common.css" />
@ -11,5 +12,16 @@
</head>
<body>
<h1><?php echo $title; ?></h1>
<div class="switcher"><?php echo moduleswitcher(); ?></div>
<div id="header">
<div id="banner"><?php echo $title; ?></div>
<div id="nav">
<div id="mainnav">
<?php echo mainnav(); ?>
</div>
<div id="subnav" class="switcher">
<?php echo subnav(); ?>
</div>
</div>
</div>
<div id="headerbase">&nbsp;</div>
<div id="main">

3
htdocs/coverager/coverager.css

@ -1,6 +1,3 @@
table.center { margin-left: auto; margin-right: auto; }
table\-center { text-align: center; }
.coverFile {
text-align: left;
color: gray;

12
htdocs/coverager/coverager.tpl.php

@ -40,8 +40,7 @@ function dir_head()
$l_lns = _("Lines");
$l_tds = _("TODO");
return <<<EOS
<div class="table-center">
<table cellpadding="2" cellspacing="0" border="0" class="cycles center">
<table cellpadding="2" cellspacing="0" border="0" class="cycles">
<tr>
<th>{$l_dir}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th><th>{$l_tds}</th>
</tr>
@ -89,8 +88,7 @@ EOS;
function dir_foot()
{
return <<<EOS
</table>
</div>
</table>
EOS;
}
@ -103,8 +101,7 @@ function file_head()
$l_hit = _("Hits");
$l_lns = _("Lines");
return <<<EOS
<div class="center-table">
<table cellpadding="2" cellspacing="0" border="0" class="cycles center">
<table cellpadding="2" cellspacing="0" border="0" class="cycles">
<tr>
<th>{$l_fil}</th><th>{$l_per}</th><th>{$l_hit}</th><th>{$l_lns}</th>
</tr>
@ -147,8 +144,7 @@ EOS;
function file_foot()
{
return <<<EOS
</table>
</div>
</table>
EOS;
}

Loading…
Cancel
Save