GG.deals clone: CodeIgniter 4 + MongoDB game price tracker
- 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
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?= $this->extend('layout') ?>
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<div class="mb-6">
|
||||
<h1 class="text-2xl font-extrabold text-white tracking-tight">Video game news</h1>
|
||||
<p class="text-sm text-muted mt-1">Deals, bundles, freebies, giveaways and subscriptions — all in one feed.</p>
|
||||
</div>
|
||||
|
||||
<!-- category filter -->
|
||||
<div class="flex flex-wrap gap-1.5 mb-6">
|
||||
<?php foreach ($cats as $key => $label): ?>
|
||||
<a href="<?= $key === '' ? '/news' : '/news/' . $key ?>"
|
||||
class="px-3.5 py-2 text-xs font-bold rounded-lg transition-colors border <?= $active === $key ? 'bg-accent/15 text-accent border-accent/40' : 'bg-card border-line text-muted hover:text-zinc-200 hover:border-accent/30' ?>">
|
||||
<?= $label ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-3">
|
||||
<?php foreach ($posts as $p): ?>
|
||||
<a href="/<?= esc($p['category']) === 'deal' ? 'deal' : (esc($p['category']) === 'freebies' ? 'freebie' : (esc($p['category']) === 'giveaways' ? 'giveaway' : 'article')) ?>/<?= esc($p['slug']) ?>"
|
||||
class="group bg-card border border-line rounded-xl p-4 hover:border-accent/40 transition-colors flex flex-col">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="kind-tag <?= $p['category'] === 'freebies' ? 'kind-keyshop' : 'kind-official' ?>">
|
||||
<?= esc($p['category']) ?>
|
||||
</span>
|
||||
<?php if (isset($p['date'])): ?>
|
||||
<span class="text-[11px] text-muted"><?= time_ago($p['date']) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<h2 class="text-[15px] font-semibold text-zinc-100 leading-snug mb-2 group-hover:text-accent"><?= esc($p['title']) ?></h2>
|
||||
<p class="text-sm text-muted leading-relaxed line-clamp-3 flex-1"><?= esc($p['body']) ?></p>
|
||||
<span class="mt-3 pt-3 border-t border-line/60 text-xs font-bold text-accent">Read more →</span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user