Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0upons/cli",
"version": "1.9.0",
"version": "1.9.1",
"description": "c0upons CLI — search, submit, and manage coupons from the terminal",
"type": "module",
"bin": {
Expand Down
2 changes: 2 additions & 0 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Geist } from "next/font/google";
import "./globals.css";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import PitFooter from "@/components/PitFooter";
import Script from "next/script";

const geist = Geist({ subsets: ["latin"] });
Expand Down Expand Up @@ -94,6 +95,7 @@ export default function RootLayout({
<Footer />
<Script data-site="e615d01b-b475-4df6-8d72-c6f60acfcf04" src="https://crawlproof.com/stats.js" strategy="afterInteractive" />
<Script src="https://crawlproof.com/ad.js" strategy="afterInteractive" />
<PitFooter />
</body>
</html>
);
Expand Down
100 changes: 26 additions & 74 deletions apps/web/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,83 +1,35 @@
import Image from 'next/image';
import Link from 'next/link';
import { Footer as ProfullstackFooter } from '@profullstack/footer/react';

const LINKS: [string, string][] = [
['/stores', 'Stores'],
['/submit', 'Submit a code'],
['/blog', 'Blog'],
['/docs', 'Docs & API'],
['/about', 'About'],
['/privacy', 'Privacy'],
['/terms', 'Terms'],
];

export default function Footer() {
return (
<>
<footer className="bg-gray-900 text-gray-400 mt-20">
<div className="max-w-7xl mx-auto px-4 py-14">
<div className="grid grid-cols-2 md:grid-cols-4 gap-10">
<div className="col-span-2 md:col-span-1">
<Link href="/" className="inline-block">
<Image src="/logo.svg" alt="c0upons" width={104} height={22} unoptimized className="h-[22px] w-auto" />
</Link>
<p className="mt-3 text-sm leading-relaxed">
Community-powered coupon codes and deals. Save more with codes shared by real people.
</p>
<div className="mt-4 flex gap-3">
<a
href="https://github.com/profullstack/c0upons"
target="_blank"
rel="noopener noreferrer"
className="text-gray-500 hover:text-white transition-colors"
aria-label="GitHub"
>
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" />
</svg>
</a>
</div>
</div>

<div className="flex flex-col gap-3 text-sm">
<span className="font-semibold text-gray-200 text-xs uppercase tracking-widest">Browse</span>
<Link href="/" className="hover:text-white transition-colors">Home</Link>
<Link href="/stores" className="hover:text-white transition-colors">All Stores</Link>
<a href="/bbs" className="hover:text-white transition-colors">Forums</a>
<Link href="/search" className="hover:text-white transition-colors">Search</Link>
<Link href="/submit" className="hover:text-white transition-colors">Submit a Code</Link>
<Link href="/bounties" className="hover:text-white transition-colors">Bounties</Link>
<Link href="/blog" className="hover:text-white transition-colors">Blog</Link>
<Link href="/about" className="hover:text-white transition-colors">About</Link>
<Link href="/team" className="hover:text-white transition-colors">Team</Link>
<Link href="/privacy" className="hover:text-white transition-colors">Privacy</Link>
<Link href="/terms" className="hover:text-white transition-colors">Terms</Link>
</div>

<div className="flex flex-col gap-3 text-sm">
<span className="font-semibold text-gray-200 text-xs uppercase tracking-widest">Developers</span>
<Link href="/blog" className="hover:text-white transition-colors">Blog</Link>
<Link href="/blog/rss.xml" className="hover:text-white transition-colors">RSS Feed</Link>
<Link href="/docs" className="hover:text-white transition-colors">Documentation</Link>
<Link href="/docs#cli" className="hover:text-white transition-colors">CLI</Link>
<Link href="/docs#api" className="hover:text-white transition-colors">REST API</Link>
<a
href="https://github.com/profullstack/c0upons"
target="_blank"
rel="noopener noreferrer"
className="hover:text-white transition-colors"
>
GitHub ↗
</a>
</div>

<div className="flex flex-col gap-3 text-sm">
<span className="font-semibold text-gray-200 text-xs uppercase tracking-widest">Install CLI</span>
<code className="text-xs bg-gray-800 text-orange-400 rounded px-3 py-2 font-mono leading-relaxed block">
curl -fsSL https://c0upons.com/install.sh | sh
</code>
<Link href="/docs#cli" className="text-xs text-orange-500 hover:text-orange-400 transition-colors">
View CLI docs →
</Link>
</div>
</div>
<footer className="bg-gray-900 text-gray-400 mt-20">
<div className="max-w-7xl mx-auto px-4 py-6 flex flex-col md:flex-row md:items-center md:justify-between gap-3 text-sm">
<div className="flex items-center gap-3">
<Link href="/" className="inline-block">
<Image src="/logo.svg" alt="c0upons" width={104} height={22} unoptimized className="h-[22px] w-auto" />
</Link>
<span>&copy; {new Date().getFullYear()} Profullstack, Inc.</span>
</div>
</footer>
{/* Copyright and the Profullstack webring: @profullstack/footer, server-rendered. */}
<div className="bg-gray-900 text-gray-400">
<ProfullstackFooter site="https://c0upons.com/" tagline="Community-powered savings." />
<nav className="flex flex-wrap gap-x-4 gap-y-1" aria-label="Footer">
{LINKS.map(([href, label]) => (
<Link key={href} href={href} className="hover:text-white transition-colors">{label}</Link>
))}
<a href="https://github.com/profullstack/c0upons" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">
GitHub
</a>
</nav>
</div>
</>
</footer>
);
}
25 changes: 25 additions & 0 deletions apps/web/components/PitFooter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// The pit.world network footer, fetched server-side from pit.world and cached
// for an hour. It is a plain HTML fragment (a scoped <style> plus one <nav>),
// so it renders as-is. Any failure (timeout, non-200, network) renders nothing:
// the network footer must never break a page.
const SNIPPET_URL = 'https://pit.world/snippets/footer.html?site=c0upons.com';

async function loadSnippet(): Promise<string | null> {
try {
const res = await fetch(SNIPPET_URL, {
next: { revalidate: 3600 },
signal: AbortSignal.timeout(3000),
});
if (!res.ok) return null;
const html = await res.text();
return html.includes('data-pit-footer') ? html : null;
} catch {
return null;
}
}

export default async function PitFooter() {
const html = await loadSnippet();
if (!html) return null;
return <div dangerouslySetInnerHTML={{ __html: html }} />;
}
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0upons/web",
"version": "1.9.0",
"version": "1.9.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/cli/c0upons
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -euo pipefail

VERSION="1.9.0"
VERSION="1.9.1"
BASE_URL="${C0UPONS_API:-https://c0upons.com/api}"
# Website root (for login + share links). Defaults to BASE_URL without /api.
WEB_URL="${C0UPONS_WEB:-${BASE_URL%/api}}"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0upons",
"version": "1.9.0",
"version": "1.9.1",
"private": true,
"type": "module",
"packageManager": "bun@1.4.0",
Expand Down
Loading