fix json error, and clean up formatting in the php

This commit is contained in:
Ben Harris 2018-11-16 10:57:00 -05:00
parent 54c9ba4698
commit 5b11a31799
5 changed files with 106 additions and 106 deletions

View File

@ -3,11 +3,11 @@
<p>We're working on providing services to <a href="members.php">the tildeverse,</a> a community of GNU+Linux boxes that aim to share the fun and love!</p>
<h2>Our Services</h2>
<div class="list-group">
<?php foreach (json_decode(file_get_contents("https://git.tilde.team/api/v1/orgs/tildeverse/repos")) ?? [] as $repo): ?>
<?php foreach (json_decode(file_get_contents("https://tildegit.org/api/v1/orgs/tildeverse/repos")) ?? [] as $repo): ?>
<div class="list-group-item">
<h3 class="list-group-item-heading"><a href="<?=$repo->html_url?>"><?=$repo->name?></a></h3>
<p class="list-group-item-text"><?=$repo->description?><?php if ($repo->website != ""): ?> - <em><a href="<?=$repo->website?>"><?=$repo->website?></a></em><?php endif; ?></p>
</div>
<?php endforeach;?>
<?php endforeach;?>
</div>
<?php include 'footer.php'; ?>

View File

@ -1,37 +1,39 @@
{
"members": [
{
"description": "thunix offers Shell (SSH) accounts, Web Hosting, Email Accounts, and many other things to people free of charge. ",
"link": "https://www.thunix.org",
"name": "thunix",
"sysadmins": [
[
"hexhaxtron",
"http://www.thunix.org/"
]
],
[
"mcveri / xkern",
"https://www.thunix.org/~xkern"
]
],
[
"krystianbajno",
"https://www.thunix.org/~krystianbajno"
]
],
[
"Bercik",
"https://www.thunix.org/~bercik"
]
],
[
"amcclure",
"https://www.thunix.org/~amcclure"
]
],
[
"Naglfar",
"https://www.thunix.org/~naglfar"
]
],
"link": "https://www.thunix.org",
"description": "thunix offers Secure Shell (SSH) accounts, Web Hosting, Email Accounts, and many other things to people free of charge. "
]
},
{
"description": "non-commercial space for teaching, learning, and enjoying the social medium of unix",
"link": "https://tilde.team",
"name": "tilde.team",
"sysadmins": [
[
@ -46,31 +48,29 @@
"cmccabe",
"https://cmccabe.tilde.team/"
]
],
"link": "https://tilde.team",
"description": "non-commercial space for teaching, learning, and enjoying the social medium of unix"
]
},
{
"description": "intentional digital community for making art, socializing, and learning",
"link": "https://tilde.town",
"name": "tilde.town",
"sysadmins": [
[
"vilmibm",
"https://tilde.town/~vilmibm/"
]
],
"link": "https://tilde.town",
"description": "intentional digital community for making art, socializing, and learning"
]
},
{
"description": "basically a social network inside SSH: there is chat, email, forums, games, and lots more.",
"link": "https://yourtilde.com",
"name": "yourtilde.com",
"sysadmins": [
[
"deepend",
"https://yourtilde.com/~deepend/"
]
],
"link": "https://yourtilde.com",
"description": "basically a social network inside SSH: there is chat, email, forums, games, and lots more."
]
}
]
}

View File

@ -1,17 +1,17 @@
<?php include 'header.php'; ?>
<h1><img style="width:75px;" src="./logos/tildeverse-green.png">tildeverse members</h1>
<div class="list-group">
<?php foreach (json_decode(file_get_contents("members.json"))->members ?? [] as $member): ?>
<?php foreach (json_decode(file_get_contents("members.json"))->members ?? [] as $member): ?>
<div class="list-group-item">
<h3 class="list-group-item-heading"><a href="<?=$member->link?>"><?=$member->name?></a></h3>
<p class="list-group-item-text"><?=$member->description?></p>
<h4>Sysadmins</h4>
<ul>
<?php foreach ($member->sysadmins as $admin): ?>
<?php foreach ($member->sysadmins as $admin): ?>
<li><a href="<?=$admin[1]?>"><?=$admin[0]?></a></li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach;?>
<?php endforeach;?>
</div>
<?php include 'footer.php'; ?>