-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.phtml
58 lines (49 loc) · 2.13 KB
/
home.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
<?php
require("head.phtml");
?>
<main>
<div class="repos">
<?php if ($logged_in) : ?>
<div class="repos-head">
<h3>Your Repositories</h3>
<a class="new" href="/repo/create">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true">
<path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path>
</svg>
New
</a>
</div>
<ul>
<?php foreach ($repos as $repo) : ?>
<li class="repo">
<a href="/repo/?name=<?= $repo["name"] ?>">
<?= $repo["name"] ?>
</a>
<span class="visibility"><?php if ($repo["private"] == 0) echo "Public"; else echo "Private"; ?></span>
<?php if ($repo["change"]): ?>
<p>Updated <?= $repo["change"] ?></p>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="fake repos-head">
<span class="fake-h3"></span>
</div>
<ul class="fake">
<?php for ($i = 0; $i < 10; $i++): ?>
<li class="repo">
<span class="fake-repo-name"></span>
<span class="fake-repo-change"></span>
</li>
<?php endfor ?>
</ul>
<div class="info">
<h3>Login to view your repositories</h3>
<span>or <a href="/search">browse</a></span>
</div>
<?php endif; ?>
</div>
</main>
</body>
</html>