Skip to content

Instantly share code, notes, and snippets.

@javiereguiluz
Created October 23, 2015 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javiereguiluz/8ef2512c805e1b73db30 to your computer and use it in GitHub Desktop.
Save javiereguiluz/8ef2512c805e1b73db30 to your computer and use it in GitHub Desktop.
```css
body {
background-color: #F9F9F9;
color: #222;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.4;
padding: 0;
margin: 0;
}
.container-fluid {
margin: 0 auto;
max-width: 1200px;
padding: 0 1em;
}
#header {
background-color: #222;
height: 36px;
}
#header h1 {
color: #FFF;
font-size: 18px;
font-weight: 500;
line-height: 36px;
margin: 0;
}
#header h1 span {
color: #CCC;
}
.summary {
border: solid rgba(0, 0, 0, 0.1);
border-width: 2px 0;
color: #FFF;
}
.summary.summary-success {
background: #5E976E;
}
.summary.summary-error {
background: #B0413E;
}
h2 {
font-size: 21px;
font-weight: 500;
margin: 1em 0 0;
}
.empty {
border: 4px dashed #E0E0E0;
color: #999;
font-size: 16px;
margin: 1em 0;
padding: .5em 2em;
}
table, tr, th, td {
background: #FFF;
border-collapse: collapse;
line-height: 1.5;
vertical-align: top;
}
table {
background: #FFF;
border: 1px solid #E0E0E0;
box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);
margin: 1em 0;
width: 100%;
}
table th, table td {
padding: 8px 10px;
}
table th {
font-weight: bold;
text-align: left;
}
table thead th {
background-color: #666;
border: 1px solid #666;
color: #F9F9F9;
}
table tbody td {
border: 1px solid #E0E0E0;
border-width: 1px 0;
}
table tbody td {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
table tbody tr:hover td {
background: rgba(255, 255, 200, 0.4);
}
table tr.file.info td.filename {
background-color: #E0E0E0;
font-weight: bold;
}
table tr.violation td.index {
color: #999;
font-size: 12px;
}
.metrics {
overflow: auto;
}
.metrics .metric {
float: left;
margin-right: 1.5em;
}
.metric {
min-width: 140px;
position: relative;
}
.metric .value {
float: left;
font-size: 36px;
padding: 4px 4px 4px 0;
}
.metric .value.date {
min-width: 180px;
}
.metric .label {
float: left;
font-size: 13px;
line-height: 1.2;
opacity: 0.8;
padding: 5px;
position: absolute;
top: 8px;
text-transform: lowercase;
}
#footer, #footer a {
color: #999;
font-size: 13px;
}
#footer a:hover {
color: #218BC3;
}
```
```html
<body>
<div id="header">
<div class="container-fluid">
<h1><span>SensioLabs</span> Deprecation Detector</h1>
</div>
</div>
<div class="summary summary-success">
<div class="container-fluid">
<div class="metrics">
<div class="metric">
<span class="value">0</span>
<span class="label">Deprecations <br> detected</span>
</div>
<div class="metric">
<span class="value">375</span>
<span class="label">Analyzed <br> files</span>
</div>
<div class="metric">
<span class="value date">2015-10-22</span>
<span class="label">Analysis <br> date</span>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<h2>Deprecation details</h2>
...
</div>
</body>
```
When there are no violations:
```html
<div class="summary summary-success">
..
</div>
...
<div class="container-fluid">
<h2>Deprecation details</h2>
<div class="empty">
<p>
Good job! Your project contains no deprecations.
</p>
</div>
</div>
```
When there are violations:
```html
<div class="summary summary-error">
..
</div>
...
<div class="container-fluid">
<h2>Deprecation details</h2>
<table> ... </table>
</div>
```
The footer now includes a link back to Deprecation Detector home:
```html
<div id="footer">
Generated by <a href="https://github.com/sensiolabs-de/deprecation-detector">SensioLabs Deprecation Detector</a>
using PHP <span class="php-version">5.6.2</span> at <span class="date">2015-10-22 15:53:19</span>.
</div>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment