site/index.php

59 lines
3.0 KiB
PHP

<?php require_once '/var/www/tilde/server/header1.php';
$PageTitle = "Welcome to Summit Pubnix";
require_once '/var/www/tilde/server/header2.php'; ?>
<h2>What is summit?</h2>
<p>summit is an intentional and inclusive community for developing, making, learning, teaching, socializing, and enjoying various aspects of GNU/Linux in a free/non-commercial environment. If you need help or have any questions, feel free to ask in <a href="https://webchat.reenode.net/##pubnix">##pubnix</a> on <a href="ircs://chat.freenode.net"><code>chat.freenode.net</code></a>, or <a href="https://web.tilde.chat/?join=pubnix">#pubnix</a> on <a href="ircs://irc.tilde.chat"><code>irc.tilde.chat</code></a>.</p>
<p>summit tries to adhere to the values and philosophy of the Hacker Ethic whenever possible. The hacker ethics and beliefs as described by Levy are:</p>
<ul>
<li>Access to computers - and anything which might teach you something about the way the world works - should be unlimited and total. Always yield to the Hands-On Imperative!</li>
<li>All information should be free</li>
<li>Mistrust authority - promote decentralization</li>
<li>Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position</li>
<li>You can create art and beauty on a computer</li>
<li>Computers can change your life for the better</li>
</ul>
<hr>
<h2>News</h2>
<p><a href="/news/">news archive here...</a></p>
<?php foreach (array_slice(array_reverse(glob("news/pages/*.md")), 0, 4) as $page):
$parsed = $parser->parse(file_get_contents($page));
$yaml = $parsed->getYAML();
if (!$yaml["published"]) continue; ?>
<table border="1" width="100%">
<tr>
<th colspan="2">
<a href="/news/<?=basename($page, ".md")?>"><?=$yaml["title"]?></a>
</th>
</tr>
<tr>
<td width="50%">
<?=$yaml["date"]?>
</td>
<td width="50%">
<a href="/~<?=$yaml["author"]?>/"><?=$yaml["author"]?></a>
</td>
</tr>
</table>
<?php endforeach; ?>
<hr>
<h2>Users</h2>
<ul>
<?php
foreach (glob("/home/*") as $nameUser):
$nameUser = basename($nameUser);
$nameFull = exec("awk -v user='$nameUser' -F':' 'user==$1{print $5}' /etc/passwd");?>
<li><?=$nameFull?> (~<?=$nameUser?>) &mdash; <a href="/~<?=$nameUser?>/">web</a>, <a href="gopher://summit.tildex.com/~<?=$nameUser?>/">gopher</a></li>
<?php endforeach; ?>
</ul>
<hr>
<h2>Projects</h2>
<?php foreach (json_decode(file_get_contents("https://tildegit.org/api/v1/orgs/pubnix/repos")) ?? [] as $repo): ?>
<h3><a href="<?=$repo->html_url?>"><?=$repo->name?></a></h3>
<?php if ($repo->website != ""): ?><p><em><a href="<?=$repo->website?>"><?=$repo->website?></a></em><br><?php endif; ?>
<?php if ($repo->description != "") { ?><?=$repo->description?></p><?php } else { ?>No description provided.</p><?php } ?>
<?php endforeach; ?>
<hr>
<h2>Mastodon</h2>
<iframe allowfullscreen sandbox="allow-top-navigation allow-scripts" width="100%" height="540" src="https://www.mastofeed.com/api/feed?url=https%3A%2F%2Ftilde.zone%2Fusers%2Fsummit&size=100&header=true&replies=true&boosts=true"></iframe>
<?php require_once '/var/www/tilde/server/footer.php' ?>