forked from Kdyby/HtmlValidatorPanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
panel.phtml
60 lines (52 loc) · 1.58 KB
/
panel.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace Kdyby\Extension\Diagnostics\HtmlValidator;
use Nette;
?>
<style>
#nette-debug .nette-htmlValidation {
min-width: 700px;
}
#nette-debug .nette-htmlValidation table {
width: 100%;
max-width: 700px;
}
#nette-debug .nette-htmlValidation table pre {
max-width: 670px;
overflow: hidden;
box-shadow: none !important;
}
#nette-debug .nette-htmlValidation td span.severenity-1 {
color: #aaaa30 !important;
font-weight: bold !important;
}
#nette-debug .nette-htmlValidation td span.severenity-2 {
color: #aa832f !important;
font-weight: bold !important;
}
#nette-debug .nette-htmlValidation td span.severenity-3 {
color: #aa4c34 !important;
font-weight: bold !important;
}
#nette-debug .nette-htmlValidation span.highlight {
background: #CD1818;
color: white;
font-weight: bold;
font-style: normal;
display: block;
padding: 0 .4em;
margin: 0 -.4em;
}
</style>
<h1>Document HTML validation (<?php echo count($errors); ?> problems)</h1>
<div class="nette-inner nette-htmlValidation">
<table>
<?php foreach ($errors as $error): ?>
<tr><td><span class="severenity-<?php echo (int)$error->level; ?>">
<?php echo htmlspecialchars(ValidatorPanel::$severenity[$error->level] . ' on column ' . $error->column . ': ' . $error->message); ?>
</span></td></tr>
<tr><td>
<?php echo Nette\Diagnostics\BlueScreen::highlightPhp($html, $error->line, 10); ?>
</td></tr>
<?php endforeach ?>
</table>
</div>