Skip to content

Commit

Permalink
Moves alternating colors to styles where they belong
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobemerick committed Dec 8, 2015
1 parent 51c0101 commit 0c9b087
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
20 changes: 5 additions & 15 deletions asset/display.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@
</tr>
</table>
<table class="main" cellspacing="0">
<?php $class = '' ?>
<?php foreach ($output['console']['messages'] as $log): ?>
<tr class="log-<?php echo $log['type'] ?>">
<td class="type"><?php echo $log['type'] ?></td>
<td class="<?php echo $class ?>">
<td>
<?php if ($log['type'] == 'log'): ?>
<div><pre><?php echo $log['data'] ?></pre></div>
<?php elseif ($log['type'] == 'memory'): ?>
Expand All @@ -81,7 +80,6 @@
<?php endif ?>
</td>
</tr>
<?php $class = ($class == '') ? 'alt' : '' ?>
<?php endforeach ?>
</table>
<?php endif ?>
Expand All @@ -106,18 +104,16 @@
</tr>
</table>
<table class="main" cellspacing="0">
<?php $class = '' ?>
<?php foreach ($output['console']['messages'] as $log): ?>
<?php if ($log['type'] == 'speed'): ?>
<tr class="log-speed">
<td class="<?php echo $class ?>">
<td>
<div>
<pre><?php echo $log['data'] ?></pre>
<em><?php echo $log['name'] ?></em>
</div>
</td>
</tr>
<?php $class = ($class == '') ? 'alt' : '' ?>
<?php endif ?>
<?php endforeach ?>
</table>
Expand Down Expand Up @@ -149,10 +145,9 @@
</tr>
</table>
<table class="main" cellspacing="0">';
<?php $class = '' ?>
<?php foreach ($output['queries'] as $query): ?>
<tr>
<td class="<?php echo $class ?>">
<td>
<?php echo $query['sql'] ?>
<?php if ($query['explain']): ?>
<em>
Expand All @@ -165,7 +160,6 @@
<?php endif ?>
</td>
</tr>
<?php $class = ($class == '') ? 'alt' : '' ?>
<?php endforeach ?>
</table>
<?php endif ?>
Expand All @@ -190,19 +184,17 @@
</tr>
</table>
<table class="main" cellspacing="0">';
<?php $class = '' ?>
<?php foreach ($output['console']['messages'] as $log): ?>
<?php if ($log['type'] == 'memory'): ?>
<tr class="log-memory">
<td class="<?php echo $class ?>">
<td>
<b><?php echo $log['data'] ?></b>
<?php if ($log['data_type']) : ?>
<em><?php echo $log['data_type'] ?></em>:
<?php endif ?>
<?php echo $log['name'] ?>
</td>
</tr>
<?php $class = ($class == '') ? 'alt' : '' ?>
<?php endif ?>
<?php endforeach ?>
</table>
Expand Down Expand Up @@ -234,15 +226,13 @@
</tr>
</table>
<table class="main" cellspacing="0">
<?php $class = '' ?>
<?php foreach ($output['files'] as $file): ?>
<tr>
<td class="<?php echo $class ?>">
<td>
<b><?php echo $file['size'] ?></b>
<?php echo $file['name'] ?>
</td>
</tr>
<?php $class = ($class == '') ? 'alt' : '' ?>
<?php endforeach ?>
</table>
<?php endif ?>
Expand Down
13 changes: 3 additions & 10 deletions asset/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,15 @@
font-family:Monaco, "Consolas", "Lucida Console", "Courier New", monospace;
font-size:11px;
}
.pQp .main td.alt{
.pQp .main tr:nth-child(even) td {
background:#111;
}
.pQp .main tr.alt td{
background:#2E2E2E;
border-top:1px dotted #4E4E4E;
}
.pQp .main tr.alt td.alt{
background:#333;
}
.pQp .main td b{
float:right;
font-weight:normal;
color:#E6F387;
}
.pQp .main td:hover{
.pQp .main tr td:hover {
background:#2E2E2E;
}

Expand Down Expand Up @@ -403,4 +396,4 @@
#pqp-footer a:active, #pqp-footer a:active strong, #pqp-footer a:active b{
background:#ECF488;
color:green !important;
}
}

0 comments on commit 0c9b087

Please sign in to comment.