'init'
This commit is contained in:
BIN
app/favicon.ico
Normal file
BIN
app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
377
app/globals.css
Normal file
377
app/globals.css
Normal file
@@ -0,0 +1,377 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #f4f7fb;
|
||||
--foreground: #0c1929;
|
||||
--muted: #5b6b7c;
|
||||
--accent: #0d9488;
|
||||
--accent-secondary: #ea580c;
|
||||
--accent-tertiary: #0284c7;
|
||||
--surface: rgba(255, 255, 255, 0.78);
|
||||
--surface-solid: #ffffff;
|
||||
--border: rgba(13, 148, 136, 0.14);
|
||||
--gradient-1: #0d9488;
|
||||
--gradient-2: #f59e0b;
|
||||
--gradient-3: #0284c7;
|
||||
--glow-sm: 0 8px 32px rgba(13, 148, 136, 0.2);
|
||||
--glow-lg: 0 24px 64px rgba(234, 88, 12, 0.18);
|
||||
--mesh-1: rgba(13, 148, 136, 0.32);
|
||||
--mesh-2: rgba(245, 158, 11, 0.26);
|
||||
--mesh-3: rgba(2, 132, 199, 0.22);
|
||||
--prose: #334155;
|
||||
--card-shadow: 0 4px 24px rgba(12, 25, 41, 0.07);
|
||||
--callout-bg: rgba(13, 148, 136, 0.08);
|
||||
--callout-border: rgba(13, 148, 136, 0.22);
|
||||
--read-max: 42rem;
|
||||
--header-h: 4.25rem;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: #060d18;
|
||||
--foreground: #e8eef4;
|
||||
--muted: #8fa3b8;
|
||||
--accent: #2dd4bf;
|
||||
--accent-secondary: #fb923c;
|
||||
--accent-tertiary: #38bdf8;
|
||||
--surface: rgba(12, 25, 41, 0.72);
|
||||
--surface-solid: #0c1929;
|
||||
--border: rgba(45, 212, 191, 0.14);
|
||||
--gradient-1: #14b8a6;
|
||||
--gradient-2: #fb923c;
|
||||
--gradient-3: #38bdf8;
|
||||
--glow-sm: 0 8px 32px rgba(20, 184, 166, 0.22);
|
||||
--glow-lg: 0 24px 64px rgba(251, 146, 60, 0.16);
|
||||
--mesh-1: rgba(20, 184, 166, 0.35);
|
||||
--mesh-2: rgba(251, 146, 60, 0.28);
|
||||
--mesh-3: rgba(56, 189, 248, 0.25);
|
||||
--prose: #b8c5d4;
|
||||
--card-shadow: 0 4px 28px rgba(0, 0, 0, 0.4);
|
||||
--callout-bg: rgba(20, 184, 166, 0.1);
|
||||
--callout-border: rgba(45, 212, 191, 0.25);
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-accent: var(--accent);
|
||||
--color-surface: var(--surface);
|
||||
--color-border: var(--border);
|
||||
--font-sans: var(--font-dm-sans);
|
||||
--font-serif: var(--font-source-serif);
|
||||
--font-display: var(--font-plus-jakarta);
|
||||
}
|
||||
|
||||
html {
|
||||
color-scheme: light;
|
||||
scroll-padding-top: calc(var(--header-h) + 1rem);
|
||||
}
|
||||
|
||||
html.dark {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: var(--font-dm-sans), system-ui, sans-serif;
|
||||
}
|
||||
|
||||
/* Latitude grid + ambient mesh */
|
||||
.mesh-bg {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -2;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(rgba(13, 148, 136, 0.04) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(13, 148, 136, 0.04) 1px, transparent 1px);
|
||||
background-size: 48px 48px;
|
||||
}
|
||||
|
||||
.dark .mesh-bg {
|
||||
background-image:
|
||||
linear-gradient(rgba(45, 212, 191, 0.06) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(45, 212, 191, 0.06) 1px, transparent 1px);
|
||||
}
|
||||
|
||||
.mesh-bg::before,
|
||||
.mesh-bg::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(88px);
|
||||
animation: mesh-float 20s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.mesh-bg::before {
|
||||
width: min(72vw, 540px);
|
||||
height: min(72vw, 540px);
|
||||
top: -14%;
|
||||
right: -6%;
|
||||
background: radial-gradient(circle, var(--mesh-1), transparent 68%);
|
||||
}
|
||||
|
||||
.mesh-bg::after {
|
||||
width: min(58vw, 420px);
|
||||
height: min(58vw, 420px);
|
||||
bottom: 8%;
|
||||
left: -12%;
|
||||
background: radial-gradient(circle, var(--mesh-2), transparent 70%);
|
||||
animation-delay: -7s;
|
||||
}
|
||||
|
||||
.mesh-orb {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(76px);
|
||||
animation: mesh-float 24s ease-in-out infinite alternate-reverse;
|
||||
}
|
||||
|
||||
.mesh-orb--sky {
|
||||
width: min(48vw, 340px);
|
||||
height: min(48vw, 340px);
|
||||
top: 42%;
|
||||
left: 38%;
|
||||
background: radial-gradient(circle, var(--mesh-3), transparent 70%);
|
||||
}
|
||||
|
||||
@keyframes mesh-float {
|
||||
0% {
|
||||
transform: translate(0, 0) scale(1);
|
||||
}
|
||||
100% {
|
||||
transform: translate(20px, -28px) scale(1.06);
|
||||
}
|
||||
}
|
||||
|
||||
.gradient-text {
|
||||
background: linear-gradient(
|
||||
125deg,
|
||||
var(--gradient-1) 0%,
|
||||
var(--gradient-2) 45%,
|
||||
var(--gradient-3) 100%
|
||||
);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.glass-card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
backdrop-filter: blur(16px);
|
||||
box-shadow: var(--card-shadow);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
height: 3rem;
|
||||
padding-inline: 1.75rem;
|
||||
border-radius: 9999px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: white;
|
||||
background: linear-gradient(
|
||||
125deg,
|
||||
var(--gradient-1),
|
||||
var(--gradient-2),
|
||||
var(--gradient-3)
|
||||
);
|
||||
background-size: 200% 200%;
|
||||
box-shadow: var(--glow-sm);
|
||||
transition: transform 0.2s, box-shadow 0.2s, background-position 0.4s;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: var(--glow-lg);
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
height: 3rem;
|
||||
padding-inline: 1.75rem;
|
||||
border-radius: 9999px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--foreground);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
backdrop-filter: blur(12px);
|
||||
transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
border-color: color-mix(in srgb, var(--accent) 45%, transparent);
|
||||
box-shadow: var(--glow-sm);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.font-display {
|
||||
font-family: var(--font-plus-jakarta), var(--font-dm-sans), system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.cover-float {
|
||||
animation: cover-float 7s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes cover-float {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0) rotate(-0.5deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-12px) rotate(0.5deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Hub marquee */
|
||||
.marquee-track {
|
||||
display: flex;
|
||||
width: max-content;
|
||||
animation: marquee 42s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
/* Reading progress */
|
||||
.reading-progress {
|
||||
position: fixed;
|
||||
top: var(--header-h);
|
||||
left: 0;
|
||||
z-index: 40;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.reading-progress__bar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
var(--gradient-1),
|
||||
var(--gradient-2),
|
||||
var(--gradient-3)
|
||||
);
|
||||
transition: width 0.1s linear;
|
||||
box-shadow: 0 0 12px color-mix(in srgb, var(--gradient-1) 50%, transparent);
|
||||
}
|
||||
|
||||
/* Prose */
|
||||
.prose-ebook {
|
||||
font-size: 1.0625rem;
|
||||
line-height: 1.88;
|
||||
}
|
||||
|
||||
.prose-ebook h2 {
|
||||
font-family: var(--font-source-serif), Georgia, serif;
|
||||
font-size: clamp(1.4rem, 3.2vw, 1.75rem);
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.025em;
|
||||
line-height: 1.25;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.prose-ebook .chapter-lead {
|
||||
font-size: 0.9375rem;
|
||||
color: var(--muted);
|
||||
margin-bottom: 1.5rem;
|
||||
padding-bottom: 1.25rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.prose-ebook p {
|
||||
color: var(--prose);
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.prose-ebook p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.prose-ebook strong {
|
||||
color: var(--foreground);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.prose-ebook ul {
|
||||
margin: 1rem 0 1.35rem;
|
||||
padding-left: 1.35rem;
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
.prose-ebook li {
|
||||
color: var(--prose);
|
||||
margin-bottom: 0.55rem;
|
||||
}
|
||||
|
||||
.prose-ebook ol {
|
||||
margin: 1rem 0 1.35rem;
|
||||
padding-left: 1.35rem;
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.prose-ebook blockquote {
|
||||
margin: 1.5rem 0;
|
||||
padding: 1rem 1.15rem 1rem 1.25rem;
|
||||
border-left: 3px solid var(--gradient-1);
|
||||
border-radius: 0 0.75rem 0.75rem 0;
|
||||
background: var(--callout-bg);
|
||||
border-top: 1px solid var(--callout-border);
|
||||
border-right: 1px solid var(--callout-border);
|
||||
border-bottom: 1px solid var(--callout-border);
|
||||
font-size: 0.98rem;
|
||||
color: var(--foreground);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.prose-ebook blockquote p {
|
||||
margin: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* TOC active state */
|
||||
.toc-link--active {
|
||||
background: color-mix(in srgb, var(--gradient-1) 12%, transparent);
|
||||
color: var(--foreground);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.toc-link--active .toc-index {
|
||||
background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
|
||||
color: white;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.cover-float,
|
||||
.marquee-track,
|
||||
.mesh-bg::before,
|
||||
.mesh-bg::after,
|
||||
.mesh-orb {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-secondary:hover {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
77
app/layout.tsx
Normal file
77
app/layout.tsx
Normal file
@@ -0,0 +1,77 @@
|
||||
import type { Metadata } from "next";
|
||||
import { DM_Sans, Plus_Jakarta_Sans, Source_Serif_4 } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { brand, ebookMeta } from "@/content/ebook";
|
||||
|
||||
const dmSans = DM_Sans({
|
||||
variable: "--font-dm-sans",
|
||||
subsets: ["latin"],
|
||||
weight: ["400", "500", "600", "700"],
|
||||
});
|
||||
|
||||
const plusJakarta = Plus_Jakarta_Sans({
|
||||
variable: "--font-plus-jakarta",
|
||||
subsets: ["latin"],
|
||||
weight: ["500", "600", "700", "800"],
|
||||
});
|
||||
|
||||
const sourceSerif = Source_Serif_4({
|
||||
variable: "--font-source-serif",
|
||||
subsets: ["latin"],
|
||||
weight: ["400", "500", "600"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `${ebookMeta.title} — Free Digital Nomad Ebook`,
|
||||
description: ebookMeta.subtitle,
|
||||
keywords: [
|
||||
"digital nomad",
|
||||
"remote work",
|
||||
"work from anywhere",
|
||||
"nomad visa",
|
||||
"location independent",
|
||||
],
|
||||
openGraph: {
|
||||
title: `${ebookMeta.title} — Digital Nomad Guide`,
|
||||
description: ebookMeta.subtitle,
|
||||
type: "website",
|
||||
locale: "en_US",
|
||||
},
|
||||
};
|
||||
|
||||
const themeScript = `
|
||||
(function () {
|
||||
try {
|
||||
var stored = localStorage.getItem('theme');
|
||||
var dark =
|
||||
stored === 'dark' ||
|
||||
(stored !== 'light' &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
document.documentElement.classList.toggle('dark', dark);
|
||||
} catch (e) {}
|
||||
})();
|
||||
`;
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
suppressHydrationWarning
|
||||
className={`${dmSans.variable} ${plusJakarta.variable} ${sourceSerif.variable} h-full scroll-smooth antialiased`}
|
||||
>
|
||||
<head>
|
||||
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
||||
</head>
|
||||
<body className="min-h-full font-sans">
|
||||
<div className="mesh-bg" aria-hidden>
|
||||
<div className="mesh-orb mesh-orb--sky" />
|
||||
</div>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
316
app/page.tsx
Normal file
316
app/page.tsx
Normal file
@@ -0,0 +1,316 @@
|
||||
import Link from "next/link";
|
||||
import { BookCover } from "@/components/BookCover";
|
||||
import { FaqAccordion } from "@/components/FaqAccordion";
|
||||
import { HighlightIcon } from "@/components/HighlightIcon";
|
||||
import { SiteHeader } from "@/components/SiteHeader";
|
||||
import {
|
||||
ebookMeta,
|
||||
heroStats,
|
||||
highlights,
|
||||
nomadHubs,
|
||||
pillars,
|
||||
tableOfContents,
|
||||
testimonial,
|
||||
} from "@/content/ebook";
|
||||
|
||||
const hubMarquee = [...nomadHubs, ...nomadHubs];
|
||||
|
||||
export default function LandingPage() {
|
||||
return (
|
||||
<div className="relative min-h-screen">
|
||||
<SiteHeader />
|
||||
|
||||
<main>
|
||||
{/* Hero */}
|
||||
<section className="relative overflow-hidden px-4 pb-14 pt-8 sm:px-6 sm:pb-20 sm:pt-12 lg:px-8 lg:pb-28 lg:pt-16">
|
||||
<div className="mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-2 lg:gap-20">
|
||||
<div className="order-2 text-center lg:order-1 lg:text-left">
|
||||
<p className="mb-4 inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-4 py-1.5 text-xs font-semibold uppercase tracking-[0.16em] text-[var(--accent)] backdrop-blur-md">
|
||||
<span className="relative flex h-2 w-2">
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--gradient-1)] opacity-60" />
|
||||
<span className="relative inline-flex h-2 w-2 rounded-full bg-[var(--gradient-1)]" />
|
||||
</span>
|
||||
Free ebook · Digital nomad · English
|
||||
</p>
|
||||
<h1 className="font-display text-[2.35rem] font-extrabold leading-[1.06] tracking-tight sm:text-5xl lg:text-[3.4rem]">
|
||||
Work from{" "}
|
||||
<span className="gradient-text">anywhere</span>
|
||||
<span className="block text-[var(--foreground)]">with a plan.</span>
|
||||
</h1>
|
||||
<p className="mx-auto mt-5 max-w-xl text-lg leading-relaxed text-[var(--muted)] lg:mx-0">
|
||||
<span className="font-semibold text-[var(--foreground)]">
|
||||
{ebookMeta.title}
|
||||
</span>{" "}
|
||||
is a field guide for remote workers and founders building a
|
||||
location-independent life—bases, visas, gear, community, and
|
||||
rhythm.
|
||||
</p>
|
||||
<p className="mt-4 text-sm text-[var(--muted)]">
|
||||
by{" "}
|
||||
<span className="font-medium text-[var(--foreground)]">
|
||||
{ebookMeta.author}
|
||||
</span>
|
||||
<span className="mx-2 opacity-40">·</span>
|
||||
{ebookMeta.readTime}
|
||||
<span className="mx-2 opacity-40">·</span>
|
||||
{ebookMeta.pages} pages
|
||||
</p>
|
||||
<div className="mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row lg:justify-start">
|
||||
<Link href="/read" className="btn-primary w-full sm:w-auto">
|
||||
Read free — no signup
|
||||
</Link>
|
||||
<a href="#contents" className="btn-secondary w-full sm:w-auto">
|
||||
Browse chapters
|
||||
</a>
|
||||
</div>
|
||||
<dl className="mt-10 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:max-w-xl">
|
||||
{heroStats.map((stat) => (
|
||||
<div
|
||||
key={stat.label}
|
||||
className="rounded-xl border border-[var(--border)] bg-[var(--surface)]/60 px-3 py-3 text-center backdrop-blur-sm"
|
||||
>
|
||||
<dt className="font-display text-lg font-bold text-[var(--foreground)]">
|
||||
{stat.value}
|
||||
</dt>
|
||||
<dd className="mt-0.5 text-[10px] font-medium uppercase tracking-wider text-[var(--muted)]">
|
||||
{stat.label}
|
||||
</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div className="order-1 flex justify-center lg:order-2 lg:justify-end">
|
||||
<BookCover />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Hub marquee */}
|
||||
<section
|
||||
className="border-y border-[var(--border)] bg-[var(--surface-solid)]/40 py-4"
|
||||
aria-label="Popular nomad hubs"
|
||||
>
|
||||
<div className="overflow-hidden">
|
||||
<div className="marquee-track gap-3 px-2">
|
||||
{hubMarquee.map((hub, i) => (
|
||||
<span
|
||||
key={`${hub.city}-${i}`}
|
||||
className="mx-1.5 inline-flex shrink-0 items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-4 py-2 text-sm backdrop-blur-sm"
|
||||
>
|
||||
<span className="font-semibold text-[var(--foreground)]">
|
||||
{hub.city}
|
||||
</span>
|
||||
<span className="text-[var(--muted)]">{hub.country}</span>
|
||||
<span className="hidden text-xs text-[var(--accent)] sm:inline">
|
||||
· {hub.vibe}
|
||||
</span>
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Highlights */}
|
||||
<section className="px-4 py-16 sm:px-6 sm:py-20 lg:px-8">
|
||||
<div className="mx-auto max-w-6xl">
|
||||
<p className="text-center text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
|
||||
What you'll master
|
||||
</p>
|
||||
<h2 className="mt-2 text-center font-serif text-2xl font-medium tracking-tight sm:text-3xl">
|
||||
Built for the{" "}
|
||||
<span className="gradient-text">digital nomad</span> reality
|
||||
</h2>
|
||||
<div className="mt-10 grid gap-4 sm:grid-cols-2">
|
||||
{highlights.map((item) => (
|
||||
<div
|
||||
key={item.title}
|
||||
className="glass-card group rounded-2xl p-6 transition-transform duration-300 hover:-translate-y-1"
|
||||
>
|
||||
<div className="mb-4 flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-[var(--gradient-1)]/15 via-[var(--gradient-2)]/15 to-[var(--gradient-3)]/15 text-[var(--accent)]">
|
||||
<HighlightIcon name={item.icon} />
|
||||
</div>
|
||||
<h3 className="font-display text-base font-bold text-[var(--foreground)]">
|
||||
{item.title}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm leading-relaxed text-[var(--muted)]">
|
||||
{item.description}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Pillars */}
|
||||
<section className="border-y border-[var(--border)] bg-[var(--surface-solid)]/50 px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
|
||||
<div className="mx-auto max-w-6xl">
|
||||
<div className="mx-auto max-w-2xl text-center">
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
|
||||
Four pillars
|
||||
</p>
|
||||
<h2 className="mt-2 font-serif text-2xl font-medium sm:text-3xl">
|
||||
Location freedom,{" "}
|
||||
<span className="gradient-text">without chaos</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div className="mt-12 grid gap-6 sm:grid-cols-2">
|
||||
{pillars.map((pillar, index) => (
|
||||
<article
|
||||
key={pillar.title}
|
||||
className="glass-card rounded-2xl p-6 sm:p-8"
|
||||
>
|
||||
<span className="font-mono text-xs font-bold text-[var(--accent)]">
|
||||
0{index + 1}
|
||||
</span>
|
||||
<h3 className="mt-2 font-display text-lg font-bold">
|
||||
{pillar.title}
|
||||
</h3>
|
||||
<p className="mt-2 text-[var(--muted)] leading-relaxed">
|
||||
{pillar.body}
|
||||
</p>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Testimonial */}
|
||||
<section className="px-4 py-16 sm:px-6 lg:px-8">
|
||||
<figure className="glass-card relative mx-auto max-w-3xl overflow-hidden rounded-3xl p-8 sm:p-10">
|
||||
<div
|
||||
className="absolute -right-8 -top-8 h-32 w-32 rounded-full bg-[var(--gradient-1)]/20 blur-2xl"
|
||||
aria-hidden
|
||||
/>
|
||||
<blockquote className="relative font-serif text-xl leading-relaxed text-[var(--foreground)] sm:text-2xl">
|
||||
“{testimonial.quote}”
|
||||
</blockquote>
|
||||
<figcaption className="relative mt-6 flex flex-wrap items-center gap-3 text-sm">
|
||||
<span className="font-display font-bold">{testimonial.author}</span>
|
||||
<span className="text-[var(--muted)]">{testimonial.role}</span>
|
||||
<span className="w-full text-xs text-[var(--accent)] sm:w-auto">
|
||||
{testimonial.location}
|
||||
</span>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
{/* Table of contents */}
|
||||
<section
|
||||
id="contents"
|
||||
className="border-t border-[var(--border)] px-4 py-16 sm:px-6 sm:py-24 lg:px-8"
|
||||
>
|
||||
<div className="mx-auto max-w-6xl">
|
||||
<div className="mb-10 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
|
||||
Table of contents
|
||||
</p>
|
||||
<h2 className="mt-2 font-serif text-2xl font-medium sm:text-3xl">
|
||||
Six chapters + introduction
|
||||
</h2>
|
||||
</div>
|
||||
<p className="max-w-sm text-sm text-[var(--muted)]">
|
||||
Read in-browser on laptop, tablet, or phone—with light/dark mode
|
||||
for late-night flights.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ol className="grid gap-3 lg:grid-cols-2">
|
||||
{tableOfContents.map((item, index) => (
|
||||
<li key={item.id}>
|
||||
<Link
|
||||
href={`/read#${item.id}`}
|
||||
className="glass-card group flex gap-4 rounded-2xl p-5 transition-all hover:border-[var(--accent)]/35 hover:shadow-[var(--glow-sm)]"
|
||||
>
|
||||
<span className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-[var(--gradient-1)] to-[var(--gradient-3)] text-sm font-bold text-white">
|
||||
{String(index + 1).padStart(2, "0")}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-display font-semibold leading-snug group-hover:text-[var(--accent)]">
|
||||
{item.title}
|
||||
</span>
|
||||
{item.summary ? (
|
||||
<span className="mt-1 block text-sm text-[var(--muted)] line-clamp-2">
|
||||
{item.summary}
|
||||
</span>
|
||||
) : null}
|
||||
</span>
|
||||
<span
|
||||
className="shrink-0 self-center text-[var(--muted)] transition-transform group-hover:translate-x-1 group-hover:text-[var(--accent)]"
|
||||
aria-hidden
|
||||
>
|
||||
→
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* FAQ */}
|
||||
<section className="border-t border-[var(--border)] bg-[var(--surface-solid)]/40 px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
|
||||
<div className="mx-auto max-w-3xl">
|
||||
<p className="text-center text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
|
||||
FAQ
|
||||
</p>
|
||||
<h2 className="mt-2 text-center font-serif text-2xl font-medium sm:text-3xl">
|
||||
Before you pack
|
||||
</h2>
|
||||
<div className="mt-10">
|
||||
<FaqAccordion />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* CTA */}
|
||||
<section className="px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
|
||||
<div className="relative mx-auto max-w-6xl overflow-hidden rounded-3xl">
|
||||
<div
|
||||
className="absolute inset-0 bg-gradient-to-br from-teal-700 via-teal-600 to-sky-800 dark:from-teal-900 dark:via-teal-800 dark:to-slate-900"
|
||||
aria-hidden
|
||||
/>
|
||||
<div
|
||||
className="absolute inset-0 bg-[url('data:image/svg+xml,%3Csvg width=%2260%22 height=%2260%22 viewBox=%220 0 60 60%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg fill=%22none%22 fill-rule=%22evenodd%22%3E%3Cg fill=%22%23ffffff%22 fill-opacity=%220.06%22%3E%3Cpath d=%22M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E')] opacity-80"
|
||||
aria-hidden
|
||||
/>
|
||||
<div className="relative px-8 py-14 text-center sm:px-16 sm:py-20">
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em] text-teal-200">
|
||||
Your next base starts here
|
||||
</p>
|
||||
<h2 className="mt-3 font-display text-2xl font-bold text-white sm:text-4xl">
|
||||
Read the nomad playbook tonight
|
||||
</h2>
|
||||
<p className="mx-auto mt-4 max-w-lg text-base text-teal-50/90 sm:text-lg">
|
||||
No signup. No paywall. Open on any device, switch themes for red-eye
|
||||
flights, and jump straight to visas or community.
|
||||
</p>
|
||||
<Link
|
||||
href="/read"
|
||||
className="mt-8 inline-flex h-12 items-center justify-center rounded-full bg-white px-10 text-sm font-bold text-teal-800 shadow-xl transition-transform hover:scale-[1.02] active:scale-[0.98]"
|
||||
>
|
||||
Open {ebookMeta.title}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer className="border-t border-[var(--border)]">
|
||||
<div className="mx-auto flex max-w-6xl flex-col items-center justify-between gap-4 px-4 py-8 text-sm text-[var(--muted)] sm:flex-row sm:px-6 lg:px-8">
|
||||
<p>
|
||||
© {ebookMeta.year} {ebookMeta.author} · {ebookMeta.title} — digital
|
||||
nomad field guide
|
||||
</p>
|
||||
<Link
|
||||
href="/read"
|
||||
className="font-medium text-[var(--accent)] transition-opacity hover:opacity-80"
|
||||
>
|
||||
Read the ebook
|
||||
</Link>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
84
app/read/page.tsx
Normal file
84
app/read/page.tsx
Normal file
@@ -0,0 +1,84 @@
|
||||
import Link from "next/link";
|
||||
import { ChapterContent } from "@/components/ChapterContent";
|
||||
import { ChapterNav } from "@/components/ChapterNav";
|
||||
import { ReadSidebar } from "@/components/ReadSidebar";
|
||||
import { ReadingProgress } from "@/components/ReadingProgress";
|
||||
import { SiteHeader } from "@/components/SiteHeader";
|
||||
import { chapters, ebookMeta } from "@/content/ebook";
|
||||
|
||||
export const metadata = {
|
||||
title: `Read — ${ebookMeta.title} | Digital Nomad Guide`,
|
||||
description: ebookMeta.subtitle,
|
||||
};
|
||||
|
||||
export default function ReadPage() {
|
||||
return (
|
||||
<div className="relative min-h-screen">
|
||||
<SiteHeader ctaLabel="Home" ctaHref="/" showBack />
|
||||
<ReadingProgress />
|
||||
|
||||
<div className="mx-auto flex max-w-6xl gap-10 px-4 py-8 sm:px-6 sm:py-12 lg:px-8">
|
||||
<ReadSidebar />
|
||||
|
||||
<div className="min-w-0 flex-1" style={{ maxWidth: "var(--read-max)" }}>
|
||||
<header className="mb-10 border-b border-[var(--border)] pb-10 text-center sm:mb-12 sm:pb-12">
|
||||
<p className="inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-3 py-1 text-xs font-semibold uppercase tracking-[0.16em] text-[var(--accent)]">
|
||||
Digital nomad · English
|
||||
</p>
|
||||
<h1 className="mt-4 font-serif text-3xl font-medium tracking-tight sm:text-4xl">
|
||||
<span className="gradient-text">{ebookMeta.title}</span>
|
||||
</h1>
|
||||
<p className="mx-auto mt-3 max-w-lg text-[var(--muted)] leading-relaxed">
|
||||
{ebookMeta.subtitle}
|
||||
</p>
|
||||
<p className="mt-3 text-sm text-[var(--muted)]">
|
||||
{ebookMeta.author} · {ebookMeta.readTime} · {ebookMeta.pages} pages
|
||||
</p>
|
||||
<Link href="/" className="btn-secondary mt-6 text-sm lg:hidden">
|
||||
← Landing page
|
||||
</Link>
|
||||
</header>
|
||||
|
||||
<article className="prose-ebook">
|
||||
{chapters.map((chapter, index) => (
|
||||
<section
|
||||
key={chapter.id}
|
||||
id={chapter.id}
|
||||
className={
|
||||
index > 0
|
||||
? "mt-16 scroll-mt-[calc(var(--header-h)+1.5rem)] border-t border-[var(--border)] pt-16 sm:mt-20 sm:pt-20"
|
||||
: "scroll-mt-[calc(var(--header-h)+1.5rem)]"
|
||||
}
|
||||
>
|
||||
<h2>{chapter.title}</h2>
|
||||
{chapter.summary ? (
|
||||
<p className="chapter-lead">{chapter.summary}</p>
|
||||
) : null}
|
||||
<ChapterContent content={chapter.content} />
|
||||
<ChapterNav chapterId={chapter.id} />
|
||||
</section>
|
||||
))}
|
||||
</article>
|
||||
|
||||
<footer className="mt-16 rounded-2xl border border-[var(--border)] bg-[var(--surface)] px-6 py-10 text-center backdrop-blur-md sm:mt-20">
|
||||
<p className="font-display text-lg font-bold text-[var(--foreground)]">
|
||||
You've finished the trailhead
|
||||
</p>
|
||||
<p className="mt-2 text-sm text-[var(--muted)]">
|
||||
Pick one habit from this guide and test it in your next base. Safe
|
||||
travels—and deep work.
|
||||
</p>
|
||||
<div className="mt-6 flex flex-col items-center justify-center gap-3 sm:flex-row">
|
||||
<Link href="/" className="btn-secondary">
|
||||
Back to home
|
||||
</Link>
|
||||
<a href="#introduction" className="btn-primary">
|
||||
Re-read intro
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user