1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Colour code the branches on the supported version SVG.

This commit is contained in:
Adam Harvey
2014-10-28 09:40:56 -07:00
parent 464ffa5497
commit 359f4a374c
3 changed files with 28 additions and 4 deletions

View File

@@ -71,16 +71,28 @@ $height = $header_height + $footer_height + (count($branches) * $branch_height);
font-size: <?php echo (2 / 3) * $header_height; ?>px;
}
g.eol rect,
.branches rect.eol {
fill: #f33;
}
g.eol text {
fill: white;
}
g.security rect,
.branches rect.security {
fill: #f93;
}
g.stable rect,
.branches rect.stable {
fill: #9c9;
}
.branch-labels text {
alignment-baseline: central;
text-anchor: middle;
}
.today line {
@@ -107,9 +119,12 @@ $height = $header_height + $footer_height + (count($branches) * $branch_height);
<!-- Branch labels -->
<g class="branch-labels">
<?php foreach ($branches as $branch => $version): ?>
<text x="0" y="<?php echo $version['top'] + (0.5 * $branch_height) ?>">
<?php echo htmlspecialchars($branch) ?>
</text>
<g class="<?php echo get_branch_support_state($branch) ?>">
<rect x="0" y="<?php echo $version['top'] ?>" width="<?php echo 0.5 * $margin_left ?>" height="<?php echo $branch_height ?>" />
<text x="<?php echo 0.25 * $margin_left ?>" y="<?php echo $version['top'] + (0.5 * $branch_height) ?>">
<?php echo htmlspecialchars($branch) ?>
</text>
</g>
<?php endforeach ?>
</g>

View File

@@ -1,7 +1,8 @@
/* Branches page */
table.standard tr.eol td:first-child {
background: #f99;
background: #f33;
color: white;
}
table.standard tr.security td:first-child {

View File

@@ -98,6 +98,14 @@ include $_SERVER['DOCUMENT_ROOT'] . '/images/supported-versions.php';
are only made on an as-needed basis.
</td>
</tr>
<tr class="eol">
<td>End of life</td>
<td>
A release that is no longer supported. Users of this release should
upgrade as soon as possible, as they may be exposed to unpatched security
vulnerabilities.
</td>
</tr>
</table>
<?php site_footer(); ?>