Skip to content

Commit 6a467ff

Browse files
committed
feat(website): add starlight-contextual-menu integration and update dependencies (#264)
- Import and configure starlight-contextual-menu with specific actions - Update package.json to include starlight-contextual-menu dependency - Enhance website configuration with new contextual menu feature
1 parent 5502a50 commit 6a467ff

File tree

5 files changed

+68
-20
lines changed

5 files changed

+68
-20
lines changed

pkgs/website/astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import starlightLinksValidator from 'starlight-links-validator';
66
import starlightSidebarTopics from 'starlight-sidebar-topics';
77
import robotsTxt from 'astro-robots-txt';
88
import starlightLlmsTxt from 'starlight-llms-txt';
9+
import starlightContextualMenu from 'starlight-contextual-menu';
910
import { fileURLToPath } from 'url';
1011
import path from 'path';
1112

@@ -149,6 +150,9 @@ export default defineConfig({
149150
readingTime: true,
150151
},
151152
}),
153+
starlightContextualMenu({
154+
actions: ['copy', 'view', 'chatgpt', 'claude'],
155+
}),
152156
starlightLlmsTxt({
153157
exclude: [
154158
'index',

pkgs/website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"react-dom": "^19.1.1",
3333
"sharp": "^0.32.6",
3434
"starlight-blog": "^0.24.0",
35+
"starlight-contextual-menu": "^0.1.5",
3536
"starlight-links-validator": "^0.14.3",
3637
"starlight-llms-txt": "^0.4.1",
3738
"starlight-sidebar-topics": "^0.6.0",

pkgs/website/src/components/CodeOverlay.astro

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
🔗 Manual step coordination
1414
</div>
1515
<button class="reveal-button sl-button-primary" aria-label="Reveal 250+ lines of traditional code">
16-
Click to review code ↓
16+
Show me the boilerplate code ↓
1717
</button>
1818
</div>
1919
</div>
@@ -55,10 +55,13 @@
5555
font-weight: 900;
5656
color: var(--sl-color-text);
5757
margin-bottom: 1.5rem;
58-
text-shadow: 0 4px 20px var(--sl-color-bg),
58+
text-shadow: 0 12px 60px var(--sl-color-bg),
59+
0 10px 50px var(--sl-color-bg),
60+
0 8px 40px var(--sl-color-bg),
61+
0 6px 30px var(--sl-color-bg),
62+
0 4px 20px var(--sl-color-bg),
5963
0 2px 12px var(--sl-color-bg),
60-
0 1px 6px var(--sl-color-bg),
61-
0 0 40px rgba(0, 123, 110, 0.6);
64+
0 0 80px rgba(0, 123, 110, 1);
6265
}
6366

6467
.overlay-list {
@@ -67,10 +70,14 @@
6770
color: var(--sl-color-text);
6871
margin-bottom: 2rem;
6972
text-align: left;
70-
text-shadow: 0 4px 20px var(--sl-color-bg),
73+
font-weight: 600;
74+
text-shadow: 0 12px 60px var(--sl-color-bg),
75+
0 10px 50px var(--sl-color-bg),
76+
0 8px 40px var(--sl-color-bg),
77+
0 6px 30px var(--sl-color-bg),
78+
0 4px 20px var(--sl-color-bg),
7179
0 2px 12px var(--sl-color-bg),
72-
0 1px 6px var(--sl-color-bg),
73-
0 0 40px rgba(0, 123, 110, 0.6);
80+
0 0 80px rgba(0, 123, 110, 1);
7481
}
7582

7683
/* Base button styling following Starlight's pattern */
@@ -91,8 +98,8 @@
9198
text-decoration: none;
9299

93100
/* Glow and animation effects */
94-
box-shadow: 0 8px 32px rgba(0, 123, 110, 0.6),
95-
0 0 60px rgba(0, 123, 110, 0.4);
101+
box-shadow: 0 8px 32px rgba(0, 123, 110, 0.4),
102+
0 0 60px rgba(0, 123, 110, 0.25);
96103
animation: pulse-glow 2s ease-in-out infinite;
97104
position: relative;
98105
overflow: hidden;
@@ -105,12 +112,12 @@
105112

106113
@keyframes pulse-glow {
107114
0%, 100% {
108-
box-shadow: 0 8px 32px rgba(0, 123, 110, 0.6),
109-
0 0 60px rgba(0, 123, 110, 0.4);
115+
box-shadow: 0 8px 32px rgba(0, 123, 110, 0.4),
116+
0 0 60px rgba(0, 123, 110, 0.25);
110117
}
111118
50% {
112-
box-shadow: 0 8px 40px rgba(0, 123, 110, 0.8),
113-
0 0 80px rgba(0, 123, 110, 0.6);
119+
box-shadow: 0 8px 40px rgba(0, 123, 110, 0.55),
120+
0 0 80px rgba(0, 123, 110, 0.4);
114121
}
115122
}
116123

@@ -131,8 +138,8 @@
131138
.reveal-button.sl-button-primary:hover {
132139
color: var(--sl-color-black);
133140
transform: scale(1.08);
134-
box-shadow: 0 12px 48px rgba(0, 123, 110, 0.7),
135-
0 0 80px rgba(0, 123, 110, 0.6);
141+
box-shadow: 0 8px 32px rgba(0, 123, 110, 0.4),
142+
0 0 60px rgba(0, 123, 110, 0.25);
136143
animation: none;
137144
}
138145

@@ -218,6 +225,12 @@
218225
display: none;
219226
}
220227

228+
.reveal-button.sl-button-primary {
229+
font-size: 0.9rem;
230+
padding: 0.8rem 1rem;
231+
margin-bottom: 2rem;
232+
}
233+
221234
.reset-overlay-button {
222235
display: none !important;
223236
}

pkgs/website/src/styles/global.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/* Prevent horizontal overflow */
2+
html, body {
3+
overflow-x: hidden;
4+
max-width: 100vw;
5+
}
6+
17
/* Dark mode colors. */
28
:root {
39
--sl-color-accent-low: #002b26;
@@ -249,23 +255,26 @@ svg .secondary {
249255
position: fixed;
250256
bottom: 20px;
251257
right: 20px;
252-
background: var(--sl-color-gray-4);
253-
color: var(--sl-color-white) !important;
254-
padding: 12px 16px;
258+
background: var(--sl-color-accent);
259+
color: #ffffff !important;
260+
padding: 16px 20px;
255261
border-radius: 25px;
256262
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
257263
text-decoration: none;
258264
font-weight: bold;
259265
font-size: 1rem;
260266
z-index: 1000;
261267
transition: transform 0.4s ease, box-shadow 0.2s ease;
268+
display: inline-flex;
269+
align-items: center;
270+
line-height: 1;
262271
}
263272

264273
/* Force white text in both light and dark modes */
265274
:root .hire-sticker,
266275
:root[data-theme='light'] .hire-sticker,
267276
:root[data-theme='dark'] .hire-sticker {
268-
color: var(--sl-color-white) !important;
277+
color: #ffffff !important;
269278
}
270279

271280
.hire-sticker::before {
@@ -278,7 +287,7 @@ svg .secondary {
278287
transform: translateY(-2px) scale(1.05);
279288
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
280289
text-decoration: none;
281-
color: var(--sl-color-white) !important;
290+
color: #ffffff !important;
282291
transition: transform 0.4s ease, box-shadow 0.2s ease;
283292
}
284293

pnpm-lock.yaml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)