add .project explorer
This commit is contained in:
parent
fea3f5fe41
commit
411043718a
|
@ -72,6 +72,10 @@ $links = [
|
|||
"href" => "resumes/",
|
||||
"icon" => "money"
|
||||
],
|
||||
"projects" => [
|
||||
"href" => "projects/",
|
||||
"icon" => "rocket"
|
||||
],
|
||||
"tilde.json explorer" => [
|
||||
"href" => "tilde.json/",
|
||||
"icon" => "code"
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
|
||||
<title>tilde.team projects</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>projects</h1>
|
||||
<p>put stuff you're working on in ~/.project to appear here</p>
|
||||
<hr>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>user</th>
|
||||
<th>project</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach (glob("/home/*/.project") as $project) {
|
||||
$user = posix_getpwuid(fileowner($project))["name"];
|
||||
$project = file_get_contents($project);
|
||||
if (empty(trim($project))) continue;
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="/~<?=$user?>/"><strong>~<?=$user?></strong></a></td>
|
||||
<td><pre><?=htmlspecialchars($project)?></pre></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
index.php
|
Loading…
Reference in New Issue