Official Landing Page https://www.gnusocial.rocks/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

112 lines
3.6 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>GNU social &mdash; Some public communities</title>
  7. <link rel="shortcut icon" href="/favicon.ico">
  8. <link rel="stylesheet" href="https://unpkg.com/purecss@2.0.5/build/pure-min.css">
  9. <link rel="stylesheet" href="https://unpkg.com/purecss@2.0.5/build/grids-responsive-min.css">
  10. <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
  11. <link rel="stylesheet" href="/assets/css/style.css">
  12. <style>
  13. .content-wrapper {
  14. top: 2em;
  15. }
  16. #nodes {
  17. font-family: Helvetica, Arial, sans-serif;
  18. border-collapse: collapse;
  19. width: 100%;
  20. }
  21. #nodes td, #nodes th {
  22. border: 1px solid #ddd;
  23. padding: 8px;
  24. }
  25. #nodes tr:nth-child(even){background-color: #f2f2f2;}
  26. #nodes tr:hover {background-color: #ddd;}
  27. #nodes th {
  28. padding-top: 12px;
  29. padding-bottom: 12px;
  30. text-align: left;
  31. background-color: #A22430;
  32. color: white;
  33. }
  34. </style>
  35. <?php
  36. $query = urlencode('
  37. {
  38. nodes(platform: "gnusocial") {
  39. openSignups
  40. name
  41. host
  42. countryCode
  43. }
  44. }
  45. ');
  46. $query_result = json_decode(file_get_contents("https://the-federation.info/graphql?query={$query}"), true);
  47. $query_result = $query_result['data']['nodes'];
  48. // Filter out instances with closed signups
  49. $nodes = array_filter($query_result, function ($node) {
  50. return $node['openSignups'];
  51. });
  52. // garbage collect
  53. unset($query_result);
  54. ?>
  55. </head>
  56. <body>
  57. <header class="header">
  58. <div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
  59. <a class="pure-menu-heading" href="/">GNU social</a>
  60. <ul class="pure-menu-list">
  61. <li class="pure-menu-item"><a href="/" class="pure-menu-link">Home</a></li>
  62. <li class="pure-menu-item"><a href="https://gnusocial.network/" class="pure-menu-link">Version 2</a></li>
  63. <li class="pure-menu-item"><a href="/v3" class="pure-menu-link">Version 3</a></li>
  64. </ul>
  65. </div>
  66. </header>
  67. <div class="content-wrapper">
  68. <div class="content">
  69. <h2 class="content-head is-center">Some public GNU social communities</h2>
  70. <p>Please note that the servers listed here are not run by us and we are not responsible for their operation or
  71. their content. They are listed here as a service to the community.</p>
  72. <h3>Public GNU social Servers</h3>
  73. <table id="nodes">
  74. <thead>
  75. <tr>
  76. <th>Name</th>
  77. <th>Country</th>
  78. </tr>
  79. </thead>
  80. <tbody>
  81. <?php foreach ($nodes as $node): ?>
  82. <tr>
  83. <td>
  84. <a href="https://<?php echo $node['host']; ?>"><?php echo $node['name']; ?></a>
  85. </td>
  86. <td>
  87. <?php echo $node['countryCode']; ?>
  88. </td>
  89. </tr>
  90. <?php endforeach; ?>
  91. </tbody>
  92. </table>
  93. <p><br>This table's data comes from <a href="https://the-federation.info/">the federation - a statistics hub</a>, if
  94. you want to be listed here, please go to https://the-federation.info/register/&#x3C;yournode.tld&#x3E;.
  95. After some seconds, you should see your node added.</p>
  96. </div>
  97. <footer class="l-box is-center">
  98. This site's source is <a href="https://code.undefinedhackers.net/GNUsocial/gnusocial.rocks">hosted here</a>.
  99. </footer>
  100. </div>
  101. </body>
  102. </html>