add pronouns page

This commit is contained in:
Ben Harris 2020-09-29 16:30:27 -04:00
parent 34611c2874
commit 64d850158c
2 changed files with 32 additions and 0 deletions

View File

@ -60,6 +60,10 @@ $links = [
"href" => "taglines/",
"icon" => "quote-left"
],
"pronouns" => [
"href" => "pronouns/",
"icon" => "heart"
],
"assorted images" => [
"href" => "img/",
"icon" => "file-image-o"

28
pronouns/index.php Normal file
View File

@ -0,0 +1,28 @@
<!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 pronouns</title>
</head>
<body>
<div class="container">
<h1>pronouns</h1>
<p>put your pronouns in ~/.pronouns to appear here</p>
<hr>
<?php foreach (glob("/home/*/.pronouns") as $pronoun) {
$user = posix_getpwuid(fileowner($pronoun))["name"];
$pronoun = file_get_contents($pronoun);
if (empty(trim($pronoun))) continue;
?>
<p><a href="/~<?=$user?>/"><strong>~<?=$user?></strong></a> - <?=$pronoun?></p>
<?php } ?>
</div>
</body>
</html>