Skip to content

Commit d0a5ad1

Browse files
committed
just show a coming soon page for now on logstruct.com
1 parent 7afd0e3 commit d0a5ad1

File tree

8 files changed

+112
-23
lines changed

8 files changed

+112
-23
lines changed
File renamed without changes.

bin/all_write

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "===> Running Sorbet"
6+
bin/typecheck
7+
8+
echo "===> Running LogStruct TypeScript Export"
9+
scripts/export_typescript_types.rb
10+
11+
echo "===> Running TypeScript"
12+
(cd site && npx tsc --noEmit)
13+
14+
echo "===> Running RuboCop"
15+
bin/rubocop -A
16+
17+
echo "===> Running Prettier"
18+
bin/prettier --write
19+
20+
echo "===> Running ESLint"
21+
(cd site && npm run lint -- --fix)
22+
23+
echo "===> Running CSpell Spellcheck"
24+
bin/spellcheck
25+
26+
echo "===> Running Ruby tests"
27+
bin/test
28+
29+
echo "===> Running TypeScript tests"
30+
(cd site && npm test)
31+
32+
echo "All checks passed! ✅"

site/app/coming-soon.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client';
2+
3+
export default function ComingSoon() {
4+
return (
5+
<div className="container mx-auto px-4 flex flex-col items-center justify-center min-h-[80vh] text-center">
6+
<h1 className="text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl mb-8">
7+
Coming Soon
8+
</h1>
9+
<p className="text-xl text-neutral-600 dark:text-neutral-400 max-w-2xl mx-auto mb-12">
10+
LogStruct is a new way to add type-safe, structured JSON logging to any
11+
Rails app. We&apos;re currently in development and will be launching
12+
soon!
13+
</p>
14+
</div>
15+
);
16+
}

site/app/layout.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { Geist, Geist_Mono } from 'next/font/google';
33
import Script from 'next/script';
44
import './globals.css';
55
import { MainNav } from '@/components/main-nav';
6+
import { EmptyNav } from '@/components/empty-nav';
67
import { SiteFooter } from '@/components/site-footer';
78
import { ThemeProvider } from '@/components/theme-provider';
9+
import { isComingSoon } from '@/lib/config';
10+
import ComingSoonContent from './coming-soon';
811

912
const geistSans = Geist({
1013
variable: '--font-geist-sans',
@@ -52,10 +55,12 @@ export default function RootLayout({
5255
<div className="relative flex min-h-screen flex-col bg-white dark:bg-neutral-950">
5356
<header className="sticky top-0 z-50 w-full border-b border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950">
5457
<div className="container flex h-16 items-center px-4 sm:px-6 lg:px-8">
55-
<MainNav />
58+
{isComingSoon ? <EmptyNav /> : <MainNav />}
5659
</div>
5760
</header>
58-
<main className="flex-1">{children}</main>
61+
<main className="flex-1">
62+
{isComingSoon ? <ComingSoonContent /> : children}
63+
</main>
5964
<SiteFooter />
6065
</div>
6166
</ThemeProvider>

site/app/page.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ export default function Home() {
1212
<h1 className="text-4xl font-bold tracking-tight sm:text-5xl leading-tight xl:mt-2">
1313
Zero-configuration JSON logging for Ruby on Rails
1414
</h1>
15-
<h2 className="text-2xl font-bold tracking-tight sm:text-3xl leading-tight text-neutral-600 dark:text-neutral-400">
16-
(Coming soon!)
17-
</h2>
1815
<p className="text-lg text-neutral-600 dark:text-neutral-400 my-10">
19-
LogStruct adds structured JSON logging to any Rails app. Just add
20-
the gem to your Gemfile, and your Rails app will print beautiful
21-
JSON logs that are easy to search, filter, and visualize.
16+
LogStruct is a new way to add type-safe, structured JSON logging to
17+
any Rails app. Just add the gem to your Gemfile, and your Rails app
18+
will print beautiful JSON logs that are easy to search, filter, and
19+
visualize.
2220
</p>
2321
<div className="flex flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0 mt-6">
2422
<Button asChild size="lg">

site/components/empty-nav.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use client';
2+
3+
import Link from 'next/link';
4+
5+
export function EmptyNav() {
6+
return (
7+
<div className="mr-4 flex w-full items-center justify-between">
8+
<div className="flex items-end space-x-2">
9+
<Link href="/" className="font-bold text-xl leading-none">
10+
LogStruct
11+
</Link>
12+
<a
13+
href="https://docspring.com"
14+
target="_blank"
15+
rel="noopener noreferrer"
16+
className="text-xs text-neutral-500 hover:text-neutral-700 dark:hover:text-neutral-300"
17+
>
18+
by DocSpring
19+
</a>
20+
</div>
21+
</div>
22+
);
23+
}

site/components/site-footer.tsx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
DropdownMenuItem,
1111
DropdownMenuTrigger,
1212
} from '@/components/ui/dropdown-menu';
13+
import { isComingSoon } from '@/lib/config';
1314

1415
function ThemeToggle() {
1516
const { setTheme } = useTheme();
@@ -76,22 +77,24 @@ export function SiteFooter() {
7677
</p>
7778
</div>
7879
<div className="flex items-center space-x-4 mt-6 md:mt-0">
79-
<Link
80-
href="https://github.com/DocSpring/logstruct"
81-
target="_blank"
82-
rel="noreferrer"
83-
className="rounded-md p-1 text-neutral-600 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100"
84-
>
85-
<svg
86-
xmlns="http://www.w3.org/2000/svg"
87-
viewBox="0 0 24 24"
88-
className="h-5 w-5"
89-
fill="currentColor"
80+
{isComingSoon ? null : (
81+
<Link
82+
href="https://github.com/DocSpring/logstruct"
83+
target="_blank"
84+
rel="noreferrer"
85+
className="rounded-md p-1 text-neutral-600 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100"
9086
>
91-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
92-
</svg>
93-
<span className="sr-only">GitHub</span>
94-
</Link>
87+
<svg
88+
xmlns="http://www.w3.org/2000/svg"
89+
viewBox="0 0 24 24"
90+
className="h-5 w-5"
91+
fill="currentColor"
92+
>
93+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
94+
</svg>
95+
<span className="sr-only">GitHub</span>
96+
</Link>
97+
)}
9598
<ThemeToggle />
9699
</div>
97100
</div>

site/lib/config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Site configuration
2+
3+
/**
4+
* Determines if the site should show the "coming soon" page
5+
* - In production: always true
6+
* - In development: controlled by NEXT_PUBLIC_SHOW_COMING_SOON env variable
7+
*/
8+
export const isComingSoon =
9+
// Always show coming soon page in production
10+
process.env.NODE_ENV === 'production' ||
11+
// In development, use the environment variable to toggle
12+
process.env.NEXT_PUBLIC_SHOW_COMING_SOON === 'true';

0 commit comments

Comments
 (0)