gnusocial.rocks/communities/index.php

87 lines
3.0 KiB
PHP
Raw Normal View History

2021-03-29 09:24:15 +01:00
<!DOCTYPE html>
<html lang="en">
2021-03-31 13:26:32 +01:00
<head>
<meta charset="utf-8">
2021-09-11 18:24:40 +01:00
<meta name="viewport" content="width=device-width, initial-scale=0.86, maximum-scale=5.0, minimum-scale=0.86">
2021-03-31 13:26:32 +01:00
<title>GNU social &mdash; Some public communities</title>
2021-03-31 14:05:38 +01:00
<link rel="shortcut icon" href="/favicon.ico">
2021-09-11 18:24:40 +01:00
<link rel="stylesheet" href="https://www.gnusocial.rocks/assets/css/style.css">
<link rel="stylesheet" href="https://www.gnusocial.rocks/assets/css/reset.css">
2021-03-31 13:26:32 +01:00
<?php
$query = urlencode('
{
nodes(platform: "gnusocial") {
openSignups
name
host
countryCode
}
}
');
$query_result = json_decode(file_get_contents("https://the-federation.info/graphql?query={$query}"), true);
$query_result = $query_result['data']['nodes'];
// Filter out instances with closed signups
$nodes = array_filter($query_result, function ($node) {
return $node['openSignups'];
});
// garbage collect
unset($query_result);
?>
</head>
2021-03-29 09:24:15 +01:00
2021-03-31 13:26:32 +01:00
<body>
2021-03-31 13:56:57 +01:00
<header class="header">
<div class="home-menu menu menu-horizontal menu-fixed">
2021-09-11 18:24:40 +01:00
<a class="menu-heading" href="https://gnusocial.rocks/">
<img src="https://www.gnusocial.rocks/assets/img/gnu-social-logo-invert.svg" alt="GNU social">
</a>
<ul class="menu-list">
<li class="menu-item"><a href="/" class=" menu-link">Home</a></li>
<li class="menu-item"><a href="/v2" class=" menu-link">Version 2</a></li>
<li class="menu-item"><a href="/v3" class=" menu-link">Version 3</a></li>
2021-03-31 13:26:32 +01:00
</ul>
</div>
</header>
<div class="splash-container">
<div class="splash">
2021-03-29 09:24:15 +01:00
2021-03-31 13:26:32 +01:00
<h2 class="content-head is-center">Some public GNU social communities</h2>
2021-03-29 09:24:15 +01:00
<p>Please note that the servers listed here are not run by us and we are not responsible for their operation or
their content. They are listed here as a service to the community.</p>
<h3>Public GNU social Servers</h3>
<table id="nodes">
<thead>
<tr>
<th>Name</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<?php foreach ($nodes as $node): ?>
<tr>
<td>
<a href="https://<?php echo $node['host']; ?>"><?php echo $node['name']; ?></a>
</td>
<td>
<?php echo $node['countryCode']; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p><br>This table's data comes from <a href="https://the-federation.info/">the federation - a statistics hub</a>, if
2021-03-31 13:56:57 +01:00
you want to be listed here, please go to https://the-federation.info/register/&#x3C;yournode.tld&#x3E;.
2021-03-29 09:24:15 +01:00
After some seconds, you should see your node added.</p>
2021-03-31 13:26:32 +01:00
</div>
2021-09-11 17:31:43 +01:00
2021-03-31 13:26:32 +01:00
</div>
2021-09-11 17:31:43 +01:00
<footer class="l-box is-center">
This site's source is <a href="https://code.undefinedhackers.net/GNUsocial/gnusocial.rocks">hosted here</a>.
</footer>
2021-03-31 13:26:32 +01:00
</body>
2021-03-29 09:24:15 +01:00
</html>