Skip to content

Commit 3cfb91f

Browse files
committed
Docs: Fix mobile responsiveness
1 parent 26635f1 commit 3cfb91f

File tree

5 files changed

+329
-283
lines changed

5 files changed

+329
-283
lines changed

apps/sequelize-guard-docs/content/blogs/2024/12/five-years-typescript-rewrite-with-ai.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ By emitting events at key points, the library became extensible without modifica
6767

6868
**The Lesson**: Invest in strong abstractions early. They make migrations painless and keep your code relevant for years.
6969

70-
## Maintainability = Survival in Open Source
70+
## Maintainability in Open Source
7171

72-
JavaScript evolves at breakneck speed. What was cutting-edge in 2019 became legacy by 2024.
72+
JavaScript moves quickly. What felt state-of-the-art in 2019 looked a bit dated by 2024.
7373

74-
The v6 rewrite wasn't just about adding types—it was about **ensuring the project's survival**:
74+
The v6 rewrite wasn't just about adding types—it was about **setting the project up for the next several years**.
7575

7676
### The Modernization Checklist
7777

@@ -84,15 +84,15 @@ The v6 rewrite wasn't just about adding types—it was about **ensuring the proj
8484

8585
### Why This Matters
8686

87-
Open source isn't "set it and forget it." Projects that don't evolve become abandonware. Users move on. Contributors disappear. The ecosystem leaves you behind.
87+
Open source projects thrive when they keep evolving at a sustainable pace. A modern toolchain makes it easier for maintainers and contributors to keep improving things without constant friction.
8888

89-
By modernizing the toolchain, I ensured that:
89+
By modernizing the toolchain, I aimed to make sure that:
9090
- New contributors can jump in with familiar tools
91-
- The library works with modern Node.js projects (ESM)
91+
- The library works smoothly with modern Node.js projects (ESM)
9292
- TypeScript users get first-class support
9393
- The documentation stays fresh and accurate
9494

95-
**The Lesson**: Evolve or fade. Maintenance isn't glamorous, but it's what keeps projects alive.
95+
**The Lesson**: A little ongoing maintenance goes a long way. Investing in your tooling and architecture makes it much easier for your project to keep growing over time.
9696

9797
## LLMs as Open-Source Superchargers
9898

@@ -104,14 +104,14 @@ I approached this massive rewrite by treating Claude and GPT-4 as my **co-pilots
104104
105105
### What AI Crushed
106106

107-
**The Grunt Work:**
107+
**The Repetitive Work:**
108108
- Type definitions across hundreds of lines of code
109109
- Converting modules from CommonJS to ESM
110110
- Migrating test suites from Jest to Vitest
111111
- Generating boilerplate for generic types
112112
- Updating configuration files for modern tooling
113113

114-
This is the stuff that's tedious, error-prone, and soul-crushing. AI handled it with remarkable accuracy.
114+
This is the kind of work that's tedious, error-prone, soul-crushing and easy to get wrong when you're tired. AI handled it with remarkable consistency.
115115

116116
### What I Still Owned
117117

@@ -133,7 +133,7 @@ Think of it like this:
133133

134134
The work became more intellectually engaging. I spent less time typing boilerplate and more time thinking about design.
135135

136-
**The Lesson**: AI is a force multiplier for maintainers. It doesn't eliminate the need for expertise—it amplifies it.
136+
**The Lesson**: AI is a helpful force multiplier for maintainers. It doesn't replace expertise—it gives you more space to use it.
137137

138138
## The Result: Battle-Tested, Type-Safe, Future-Proof
139139

@@ -160,7 +160,7 @@ user.assignRole('admin'); // Autocomplete works perfectly
160160

161161
## A Message to Open-Source Maintainers
162162

163-
If you have a dusty open-source gem sitting in your GitHub repos, **it's never too late to modernize**.
163+
If you have an open-source gem sitting quietly in your GitHub repos, **it's never too late to modernize**.
164164

165165
The tools are better than ever:
166166
- TypeScript makes refactoring safer
@@ -170,7 +170,7 @@ The tools are better than ever:
170170

171171
The community is here. People still care about well-designed libraries that solve real problems.
172172

173-
Don't let your project fade because the tooling aged. Give it new life.
173+
If your project feels a bit behind on tooling, that's okay—it happens to every codebase. A small round of improvements can give it new life.
174174

175175
## Try It Out
176176

apps/sequelize-guard-docs/src/app/blogs/components/BlogIndexPage.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { blogSource } from '@/lib/source';
22
import Link from 'next/link';
3-
import { Calendar, User, Tag } from 'lucide-react';
3+
import { Calendar, User, Tag, ShieldCheck } from 'lucide-react';
44

55
export function BlogIndexPage() {
66
const allBlogs = [...blogSource.getPages()].sort((a, b) => {
@@ -11,7 +11,16 @@ export function BlogIndexPage() {
1111

1212
return (
1313
<div className="min-h-screen bg-gradient-to-b from-slate-50 to-white">
14-
<div className="max-w-5xl mx-auto px-6 py-16">
14+
<div className="max-w-5xl mx-auto px-4 py-10 sm:px-6 sm:py-16">
15+
<header className="mb-10 flex items-center justify-between gap-4">
16+
<Link href="/" className="flex items-center gap-3 group">
17+
<ShieldCheck className="w-8 h-8 text-emerald-600 group-hover:text-emerald-700 transition" />
18+
<span className="text-xl font-bold text-slate-900 group-hover:text-slate-950 transition">
19+
Sequelize Guard
20+
</span>
21+
</Link>
22+
</header>
23+
1524
<div className="mb-12">
1625
<Link
1726
href="/"

apps/sequelize-guard-docs/src/app/blogs/components/BlogPostPage.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { blogSource } from '@/lib/source';
22
import { DocsBody } from 'fumadocs-ui/page';
3-
import { Calendar, User, Tag, ArrowLeft } from 'lucide-react';
3+
import { Calendar, User, Tag, ArrowLeft, ShieldCheck } from 'lucide-react';
44
import Link from 'next/link';
55
import { notFound } from 'next/navigation';
66

@@ -16,7 +16,16 @@ export function BlogPostPage({ slug }: BlogPostPageProps) {
1616

1717
return (
1818
<div className="min-h-screen bg-gradient-to-b from-slate-50 to-white">
19-
<div className="max-w-4xl mx-auto px-6 py-16">
19+
<div className="max-w-4xl mx-auto px-4 py-10 sm:px-6 sm:py-16">
20+
<header className="mb-10 flex items-center justify-between gap-4">
21+
<Link href="/" className="flex items-center gap-3 group">
22+
<ShieldCheck className="w-8 h-8 text-emerald-600 group-hover:text-emerald-700 transition" />
23+
<span className="text-xl font-bold text-slate-900 group-hover:text-slate-950 transition">
24+
Sequelize Guard
25+
</span>
26+
</Link>
27+
</header>
28+
2029
<Link
2130
href="/blogs"
2231
className="inline-flex items-center gap-2 text-emerald-600 hover:text-emerald-700 font-medium mb-8"
@@ -25,7 +34,7 @@ export function BlogPostPage({ slug }: BlogPostPageProps) {
2534
Back to Blog
2635
</Link>
2736

28-
<article className="bg-white rounded-xl shadow-lg p-8 md:p-12 border border-slate-200">
37+
<article className="bg-white rounded-xl shadow-lg p-4 sm:p-6 md:p-10 border border-slate-200">
2938
<header className="mb-8 pb-8 border-b border-slate-200">
3039
<h1 className="text-4xl md:text-5xl font-bold text-slate-900 mb-4">
3140
{page.data.title}
@@ -74,7 +83,7 @@ export function BlogPostPage({ slug }: BlogPostPageProps) {
7483
)}
7584
</header>
7685

77-
<DocsBody className="prose prose-slate max-w-none prose-headings:text-slate-900 prose-p:text-slate-700 prose-p:leading-relaxed prose-li:text-slate-700 prose-strong:text-slate-900 prose-a:text-emerald-600 prose-a:font-medium hover:prose-a:text-emerald-700 prose-code:text-emerald-600 prose-code:font-semibold prose-pre:bg-slate-900 prose-h2:text-slate-900 prose-h3:text-slate-800">
86+
<DocsBody className="prose prose-sm sm:prose-base prose-slate max-w-none prose-headings:text-slate-900 prose-p:text-slate-700 prose-p:leading-relaxed prose-li:text-slate-700 prose-strong:text-slate-900 prose-a:text-emerald-600 prose-a:font-medium hover:prose-a:text-emerald-700 prose-code:text-emerald-600 prose-code:font-semibold prose-pre:bg-slate-900 prose-pre:text-sm sm:prose-pre:text-base prose-pre:overflow-x-auto prose-pre:rounded-lg prose-pre:p-4 prose-h2:text-slate-900 prose-h3:text-slate-800">
7887
<MDX />
7988
</DocsBody>
8089
</article>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
@import 'tailwindcss';
22
@import 'fumadocs-ui/css/neutral.css';
33
@import 'fumadocs-ui/css/preset.css';
4+
5+
/* Remove boxed background from inline code inside prose content */
6+
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
7+
background: transparent;
8+
border: none;
9+
padding: 0;
10+
border-radius: 0;
11+
}
12+
13+

0 commit comments

Comments
 (0)