Files
ggdeals/app/Views/news_article.php
T
deepseek fff7a4b9b9 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
2026-08-23 07:06:02 +00:00

72 lines
3.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?= $this->extend('layout') ?>
<?= $this->section('content') ?>
<div class="text-xs text-muted mb-4 flex items-center gap-1.5">
<a href="/news" class="hover:text-accent">News</a>
<span></span>
<span class="text-zinc-400"><?= ucfirst(esc($post['category'])) ?></span>
</div>
<article class="max-w-3xl">
<div class="flex items-center gap-2.5 mb-3">
<span class="kind-tag <?= $post['category'] === 'freebies' ? 'kind-keyshop' : 'kind-official' ?>"><?= esc($post['category']) ?></span>
<?php if (isset($post['date'])): ?>
<span class="text-xs text-muted"><?= time_ago($post['date']) ?> · <?= bson_date($post['date']) ?></span>
<?php endif; ?>
</div>
<h1 class="text-3xl font-extrabold text-white tracking-tight leading-tight mb-4"><?= esc($post['title']) ?></h1>
<?php if (! empty($post['game_slug'])): ?>
<a href="/game/<?= esc($post['game_slug']) ?>" class="inline-flex items-center gap-2 bg-card border border-line rounded-lg px-3 py-2 text-xs font-bold text-accent hover:border-accent/50 transition-colors mb-6">
View related game page →
</a>
<?php endif; ?>
<div class="prose-custom bg-panel border border-line rounded-2xl p-6 mb-8">
<p class="text-[15px] text-zinc-200 leading-relaxed"><?= esc($post['body']) ?></p>
<?php if ($post['category'] === 'freebies'): ?>
<div class="mt-6 bg-card border border-dashed border-accent/40 rounded-xl p-4 flex flex-wrap items-center justify-between gap-3">
<div>
<div class="text-sm font-bold text-accent">FREE to keep — limited time</div>
<div class="text-xs text-muted mt-0.5">Claim it now before the offer expires</div>
</div>
<a href="https://www.google.com/search?q=<?= rawurlencode('claim free ' . $post['title']) ?>" target="_blank" rel="nofollow noopener"
class="bg-accent text-accent-ink font-extrabold text-sm py-2.5 px-6 rounded-lg hover:bg-accent/90 transition-colors">
Claim now →
</a>
</div>
<?php endif; ?>
<?php if ($post['category'] === 'giveaways'): ?>
<div class="mt-6 bg-card border border-dashed border-amber-400/40 rounded-xl p-4 flex flex-wrap items-center justify-between gap-3">
<div>
<div class="text-sm font-bold text-amber-300">Giveaway in progress</div>
<div class="text-xs text-muted mt-0.5">Enter now for a chance to win</div>
</div>
<button class="bg-amber-400 text-black font-extrabold text-sm py-2.5 px-6 rounded-lg hover:bg-amber-300 transition-colors">
Enter giveaway →
</button>
</div>
<?php endif; ?>
</div>
<!-- related -->
<?php if ($related !== []): ?>
<div class="mb-8">
<h2 class="text-sm font-bold text-zinc-200 uppercase tracking-wider mb-3">More <?= ucfirst(esc($post['category'])) ?> news</h2>
<div class="grid sm:grid-cols-2 gap-2.5">
<?php foreach ($related as $r): ?>
<a href="/article/<?= esc($r['slug']) ?>" class="bg-card border border-line rounded-xl p-4 hover:border-accent/40 transition-colors group">
<div class="text-[13px] font-semibold text-zinc-100 group-hover:text-accent leading-snug"><?= esc($r['title']) ?></div>
<div class="text-[11px] text-muted mt-1.5"><?= time_ago($r['date']) ?></div>
</a>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</article>
<?= $this->endSection() ?>