- Full gg.deals-style UI: deal feed with filters, game pages with price history charts, rankings, vouchers, news, prepaids, subscriptions, bundles, franchises, wishlist, API docs - Real data crawlers: * gg:crawl (Steam Store API + GOG Catalog + Epic free games) * gg:catalog (252K game slugs from gg.deals sitemaps) * gg:ggdeals (per-game prices via FlareSolverr session, JSON-LD parsing) * gg:seed / gg:crawl-covers (demo seed + Steam CDN cover art) - 24/7 self-updating scheduler (scripts/scheduler_loop.php, lockfile-protected) - Tailwind v4 dark/light theme, Alpine.js, Chart.js
53 lines
2.8 KiB
PHP
53 lines
2.8 KiB
PHP
<?= $this->extend('layout') ?>
|
|
<?= $this->section('content') ?>
|
|
|
|
<div class="mb-6">
|
|
<h1 class="text-2xl font-extrabold text-white tracking-tight">Rankings</h1>
|
|
<p class="text-sm text-muted mt-1">Top games by wishlist, collection, critic scores and community reviews.</p>
|
|
</div>
|
|
|
|
<?php
|
|
$sections = [
|
|
'wishlisted' => ['🔥 Most Wishlisted', $wishlisted, 'trending'],
|
|
'collected' => ['📦 Most Collected', $collected, 'rating_pct'],
|
|
'metacritic' => ['⭐ Metacritic', $metacritic, 'score'],
|
|
'reviews' => ['💬 Steam Reviews', $reviews, 'rating_pct'],
|
|
];
|
|
?>
|
|
|
|
<div class="grid lg:grid-cols-2 gap-6">
|
|
<?php foreach ($sections as $key => [$title, $list, $field]): ?>
|
|
<div class="bg-panel border border-line rounded-2xl overflow-hidden">
|
|
<div class="px-5 py-4 border-b border-line flex items-center justify-between">
|
|
<h2 class="text-sm font-bold text-zinc-200 uppercase tracking-wider"><?= $title ?></h2>
|
|
<span class="text-xs text-muted">Top <?= count($list) ?></span>
|
|
</div>
|
|
<div class="divide-y divide-line/60">
|
|
<?php foreach ($list as $i => $g): ?>
|
|
<a href="/game/<?= $g['slug'] ?>" class="flex items-center gap-4 px-5 py-3 hover:bg-elev/50 transition-colors group">
|
|
<span class="w-7 text-center text-lg font-extrabold <?= $i < 3 ? 'text-accent' : 'text-muted' ?>"><?= $i + 1 ?></span>
|
|
<img src="<?= esc($g['cover']['file']) ?>" alt="" class="w-24 h-[45px] object-cover rounded-md ring-1 ring-line shrink-0">
|
|
<div class="min-w-0 flex-1">
|
|
<div class="text-sm font-semibold text-zinc-100 truncate group-hover:text-accent"><?= esc($g['title']) ?></div>
|
|
<div class="text-xs text-muted mt-0.5">
|
|
<span class="text-accent font-bold"><?= money($g['best_keyshop']['price'] ?? $g['base_price']) ?></span>
|
|
<span class="line-through ml-1"><?= money($g['base_price']) ?></span>
|
|
</div>
|
|
</div>
|
|
<div class="text-right shrink-0">
|
|
<div class="text-sm font-extrabold text-zinc-100">
|
|
<?= $field === 'score' ? 'MC ' . (int) $g['score'] : (int) $g[$field] . '%' ?>
|
|
</div>
|
|
<div class="text-[10px] uppercase tracking-wider text-muted">
|
|
<?= $field === 'score' ? 'Metascore' : ($field === 'trending' ? 'Popularity' : 'Positive reviews') ?>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
|
|
<?= $this->endSection() ?>
|