Display world count on home page
This commit is contained in:
parent
378ee801f3
commit
68b8dff13c
|
@ -22,16 +22,16 @@ final readonly class HomeController
|
|||
}
|
||||
|
||||
/**
|
||||
* Sample data copied from Wayback Machine snapshots.
|
||||
* Sample data based on Wayback Machine snapshots.
|
||||
*
|
||||
* @see https://web.archive.org/web/20210924115620/https://www.shintolin.com/
|
||||
*/
|
||||
private function getSampleData(): array
|
||||
{
|
||||
return [
|
||||
'activePlayersCount' => 14,
|
||||
'activeSettlementsCount' => 7,
|
||||
'tileCount' => 10070,
|
||||
'activeWorldCount' => 13,
|
||||
'activePlayerCount' => 14,
|
||||
'activeSettlementCount' => 7,
|
||||
'newestPlayer' => [
|
||||
'url' => '/profile/artya',
|
||||
'name' => 'Grzegorz Brzęczyszczykiewicz',
|
||||
|
|
|
@ -23,17 +23,17 @@
|
|||
<p class="login"><a href="#TODO-login" class="btn btn-light">Login</a></p>
|
||||
<table class="stats">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><a href="{{ path('app_website_leaderboard', {metric: 'worlds'}) }}">Total Worlds</a></th>
|
||||
<td>{{ activeWorldCount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="{{ path('app_website_leaderboard', {metric: 'frags'}) }}">Active Players</a></th>
|
||||
<td>{{ activePlayersCount }}</td>
|
||||
<td>{{ activePlayerCount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="{{ path('app_website_leaderboard', {metric: 'bigtowns'}) }}">Settlements</a></th>
|
||||
<td>{{ activeSettlementsCount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Map Size</th>
|
||||
<td>{{ tileCount }}</td>
|
||||
<th><a href="{{ path('app_website_leaderboard', {metric: 'bigtowns'}) }}">Active Settlements</a></th>
|
||||
<td>{{ activeSettlementCount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="{{ path('app_website_leaderboard', {metric: 'younguns'}) }}">Newest Player</a></th>
|
||||
|
@ -67,7 +67,8 @@
|
|||
</ul>
|
||||
<p class="screenshots">
|
||||
<a href="{{ asset('img/screenshot_full.png') }}">
|
||||
<img src="{{ asset('img/screenshot_full.thumb.webp') }}" width="200" height="165" alt="Screenshot of user interface">
|
||||
<img src="{{ asset('img/screenshot_full.thumb.webp') }}" width="200" height="165"
|
||||
alt="Screenshot of user interface">
|
||||
</a>
|
||||
</p>
|
||||
</article>
|
||||
|
|
Reference in a new issue