Add jasny-bootstrap to footer and add rowlinks to channel stats

This commit is contained in:
Robert Miles 2018-07-19 11:28:28 -04:00
parent b2f6bbd4d1
commit 277d4c4dce
2 changed files with 4 additions and 3 deletions

View File

@ -2,5 +2,6 @@
</div> </div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="./jasny-bootstrap.js"></script>
</body> </body>
</html> </html>

View File

@ -6,11 +6,11 @@ include "header.php"; ?>
$stats = json_decode(file_get_contents("stats.json")); $stats = json_decode(file_get_contents("stats.json"));
?> ?>
<p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p> <p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
<table class='table table-striped table-bordered'> <table class='table table-striped table-bordered table-hover'>
<thead><tr><th>Name</th><th>Users</th><th>Topic</th></tr></thead> <thead><tr><th>Name</th><th>Users</th><th>Topic</th></tr></thead>
<tbody> <tbody data-link="row" class="rowlink">
<?php foreach($stats->channels as $channel): ?> <?php foreach($stats->channels as $channel): ?>
<tr><td><?=$channel->name?></td><td><?=$channel->usercount?></td><td><?=$channel->topic?></td></tr> <tr><td><a href="//web.tilde.chat/?join=<?=ltrim($channel->name,"#")?>"><?=$channel->name?></a></td><td><?=$channel->usercount?></td><td><?=$channel->topic?></td></tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>