/
layout.phtml
48 lines (43 loc) · 1.58 KB
/
layout.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Labels: <?php echo $username; ?></title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css">
</head>
<body class="container">
<h1>Labels: <a href="https://github.com/<?php echo $username; ?>"><?php echo $username; ?></a></h1>
<table class="table table-striped">
<thead>
<tr>
<th>Repository name</th>
<th>Labels</th>
</tr>
</thead>
<tbody>
<?php
foreach ($data as $repo => $labels) {
echo '<tr>', PHP_EOL;
echo "\t", '<td style="white-space: nowrap;"><a href="https://github.com/' . $username . '/' . $repo . '/labels">' . $repo . '</a></td>', PHP_EOL;
echo "\t", '<td>', PHP_EOL;
foreach ($labels as $label => $color) {
echo "\t\t", '<span class="label" style="background-color:#' . $color . ';">' . $label . '</span>', PHP_EOL;
}
echo "\t", '</td>', PHP_EOL;
echo '</tr>', PHP_EOL;
}
?>
</tbody>
</table>
<footer>
<div class="row">
<div class="col-md-6">
<p>Copyright © <?php echo date('Y'); ?>, <a href="https://github.com/michalbundyra">Michał Bundyra</a></p>
</div>
<div class="col-md-6">
<p class="pull-right">Generated at: <i><?php echo date('r'); ?></i></p>
</div>
</div>
</footer>
</body>
</html>