Skip to content

Commit 7e83f62

Browse files
fix: styling on landing page
1 parent 9acbda7 commit 7e83f62

File tree

4 files changed

+86
-28
lines changed

4 files changed

+86
-28
lines changed

.storybook/manager.ts

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,38 @@ const theme = create({
99
fontCode: 'monospace',
1010

1111
brandTitle: '⚛️ React Design Patterns',
12-
brandUrl: 'https://example.com',
13-
brandTarget: '_self',
14-
colorPrimary: '#ffffff',
15-
colorSecondary: '#A599E9',
16-
17-
// UI
18-
appBg: '#1E1E3F',
19-
appContentBg: '#2D2B55',
12+
brandUrl:
13+
'https://github.com/code-mattclaffey/react-design-patterns',
14+
brandTarget: '_blank',
15+
colorPrimary: '#3b82f6', // blue-500
16+
colorSecondary: '#A599E9', // code-500 from tailwind config
17+
18+
// UI - matching main page blue-950 theme
19+
appBg: '#172554', // blue-950
20+
appContentBg: '#1e3a8a', // blue-900
2021
appPreviewBg: '#ffffff',
21-
appBorderColor: '#2D2B55',
22-
appBorderRadius: 4,
22+
appBorderColor: '#1e40af', // blue-800
23+
appBorderRadius: 8,
2324

24-
// Text colors
25+
// Text colors - matching main page
2526
textColor: '#ffffff',
26-
textInverseColor: '#ffffff',
27+
textInverseColor: '#1e293b', // slate-800
2728

28-
// Toolbar default and active colors
29-
barTextColor: '#ffffff',
29+
// Toolbar colors - matching header
30+
barTextColor: '#cbd5e1', // slate-300
3031
barSelectedColor: '#ffffff',
3132
barHoverColor: '#ffffff',
32-
barBg: '#1E1E3F',
33+
barBg: '#172554', // blue-950
3334

3435
// Form colors
35-
inputBg: '#ffffff',
36-
inputBorder: '#35356b',
37-
inputTextColor: '#1E1E3F',
38-
inputBorderRadius: 2,
39-
40-
// Buttons
41-
buttonBg: '#35356b',
42-
buttonBorder: '#35356b',
36+
inputBg: '#1e40af', // blue-800
37+
inputBorder: '#3b82f6', // blue-500
38+
inputTextColor: '#ffffff',
39+
inputBorderRadius: 6,
40+
41+
// Buttons - matching CTA buttons
42+
buttonBg: '#2563eb', // blue-600
43+
buttonBorder: '#2563eb', // blue-600
4344
gridCellSize: 24
4445
});
4546

.storybook/styles/docs.styles.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
/* Main content styling to match landing page */
12
.sbdocs-content p,
23
.sbdocs-content li,
34
.sbdocs-content a {
45
font-size: 1.125rem;
56
line-height: 1.6;
7+
font-weight: 500;
68
}
79

810
.sbdocs-content h1,
@@ -14,20 +16,67 @@
1416
font-weight: 700;
1517
font-style: normal;
1618
margin-top: 1.5rem !important;
19+
line-height: 1.2;
1720
}
1821

1922
.sbdocs-content h1 {
2023
font-size: 2.5rem;
24+
color: #3b82f6; /* blue-500 accent */
2125
}
2226

2327
.sbdocs-content h2 {
2428
font-size: 2rem;
29+
color: #2563eb; /* blue-600 */
2530
}
2631

2732
.sbdocs-content h3 {
2833
font-size: 1.75rem;
34+
color: #1d4ed8; /* blue-700 */
2935
}
3036

3137
.sbdocs-content ol {
3238
list-style: decimal;
3339
}
40+
41+
/* Code blocks styling */
42+
.sbdocs-content pre {
43+
background-color: #172554 !important; /* blue-950 */
44+
border: 1px solid #1e40af; /* blue-800 */
45+
border-radius: 8px;
46+
}
47+
48+
/* Links styling to match main page */
49+
.sbdocs-content a {
50+
color: #3b82f6; /* blue-500 */
51+
text-decoration: none;
52+
transition: color 0.2s ease;
53+
}
54+
55+
.sbdocs-content a:hover {
56+
color: #2563eb; /* blue-600 */
57+
text-decoration: underline;
58+
}
59+
60+
/* Badge/tag styling */
61+
.sbdocs-content .docblock-code-toggle {
62+
background-color: #1e40af; /* blue-800 */
63+
color: white;
64+
border-radius: 6px;
65+
}
66+
67+
/* Table styling */
68+
.sbdocs-content table {
69+
border-collapse: collapse;
70+
border-radius: 8px;
71+
overflow: hidden;
72+
}
73+
74+
.sbdocs-content th {
75+
background-color: #1e40af; /* blue-800 */
76+
color: white;
77+
font-weight: 600;
78+
}
79+
80+
.sbdocs-content td {
81+
border-color: #cbd5e1; /* slate-300 */
82+
}

src/app/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const Footer = () => {
66
<div className="border-t border-blue-800 mb-4"></div>
77
<div className="grid md:grid-cols-3 gap-8">
88
<div className="md:col-span-2">
9-
<div className="flex items-center space-x-3 mb-4">
9+
<div className="flex items-center space-x-3 mb-8">
1010
<div className="text-2xl">⚛️</div>
1111
<div className="text-xl font-bold text-white">
1212
React Design Patterns

src/app/components/Header.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Header = () => {
1616

1717
<div className="hidden md:flex items-center space-x-8">
1818
<a
19-
href="#course"
19+
href="/storybook"
2020
className="text-slate-300 hover:text-white transition-colors duration-200"
2121
>
2222
Course
@@ -37,9 +37,13 @@ export const Header = () => {
3737
</a>
3838
</div>
3939

40-
<button
40+
<button
4141
className="md:hidden text-white"
42-
aria-label={isMenuOpen ? 'Close navigation menu' : 'Open navigation menu'}
42+
aria-label={
43+
isMenuOpen
44+
? 'Close navigation menu'
45+
: 'Open navigation menu'
46+
}
4347
aria-expanded={isMenuOpen}
4448
onClick={() => setIsMenuOpen(!isMenuOpen)}
4549
>
@@ -53,7 +57,11 @@ export const Header = () => {
5357
strokeLinecap="round"
5458
strokeLinejoin="round"
5559
strokeWidth={2}
56-
d={isMenuOpen ? "M6 18L18 6M6 6l12 12" : "M4 6h16M4 12h16M4 18h16"}
60+
d={
61+
isMenuOpen
62+
? 'M6 18L18 6M6 6l12 12'
63+
: 'M4 6h16M4 12h16M4 18h16'
64+
}
5765
/>
5866
</svg>
5967
</button>

0 commit comments

Comments
 (0)