Skip to content

Commit 981d1b0

Browse files
committed
style: update component layout, add quote styling, and improve responsiveness
- Adjusted padding and grid layout in HeroWithSlot component for better spacing - Added a styled quote block with hover effects and responsive typography - Enhanced quote container margins and max-width for clarity and mobile support - Included styling for quote link hover states and attribution text - Minor layout tweaks to improve visual separation and consistency across components
1 parent 5764ac6 commit 981d1b0

File tree

7 files changed

+161
-31
lines changed

7 files changed

+161
-31
lines changed

pkgs/website/astro.config.mjs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,6 @@ export default defineConfig({
121121
content: 'website',
122122
},
123123
},
124-
{
125-
tag: 'script',
126-
content: `
127-
document.addEventListener('DOMContentLoaded', function() {
128-
if (!window.location.pathname.startsWith('/author')) {
129-
const sticker = document.createElement('a');
130-
sticker.href = '/author/';
131-
sticker.className = 'hire-sticker';
132-
sticker.textContent = 'Chat with Author';
133-
document.body.appendChild(sticker);
134-
135-
// Trigger one-time attention nudge after 5 seconds
136-
setTimeout(function() {
137-
sticker.classList.add('nudge');
138-
// Remove the class after animation completes
139-
setTimeout(function() {
140-
sticker.classList.remove('nudge');
141-
}, 800);
142-
}, 5000);
143-
}
144-
});
145-
`,
146-
},
147124
],
148125
plugins: [
149126
starlightBlog({
@@ -468,6 +445,7 @@ export default defineConfig({
468445
],
469446
components: {
470447
Hero: './src/components/ConditionalHero.astro',
448+
PageFrame: './src/components/PageFrame.astro',
471449
},
472450
}),
473451
robotsTxt({
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading

pkgs/website/src/components/HeroWithSlot.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const { title = data.title, tagline, actions = [] } = data.hero || {};
5252
order: 2;
5353
justify-content: center;
5454
}
55-
55+
5656
.stack {
5757
order: 1;
5858
flex-direction: column;
@@ -93,7 +93,8 @@ const { title = data.title, tagline, actions = [] } = data.hero || {};
9393
.hero {
9494
grid-template-columns: 4fr 5fr;
9595
gap: 3%;
96-
padding-block: clamp(1.5rem, calc(0.5rem + 8vmin), 8rem);
96+
padding-top: clamp(1.5rem, calc(0.5rem + 8vmin), 8rem);
97+
padding-bottom: 0;
9798
}
9899

99100
.hero > .hero-html {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
import type { Props } from '@astrojs/starlight/props';
3+
import Default from '@astrojs/starlight/components/PageFrame.astro';
4+
5+
const isAuthorPage = Astro.url.pathname.startsWith('/author');
6+
---
7+
8+
<Default {...Astro.props}>
9+
<slot slot="header" name="header" />
10+
<slot slot="sidebar" name="sidebar" />
11+
<slot />
12+
</Default>
13+
14+
{!isAuthorPage && (
15+
<a href="/author/" class="hire-sticker">
16+
Chat with Author
17+
</a>
18+
)}

pkgs/website/src/content/docs/index.mdx

Lines changed: 107 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ hero:
1111
icon: right-arrow
1212
variant: primary
1313
attrs:
14-
class: plausible-event-name=home:cta-get-started
15-
- text: How It Works
14+
class: call-to-action plausible-event-name=home:cta-get-started
15+
- text: Try Demo
16+
link: https://demo.pgflow.dev/
17+
variant: secondary
18+
attrs:
19+
class: plausible-event-name=home:cta-try-demo
20+
- text: How It Works?
1621
link: /concepts/how-pgflow-works/
17-
icon: information
1822
variant: minimal
1923
attrs:
2024
class: plausible-event-name=home:cta-how-it-works
@@ -24,6 +28,19 @@ editUrl: false
2428
import { Card, CardGrid, LinkCard, Aside, Tabs, TabItem } from '@astrojs/starlight/components';
2529
import TestimonialCarousel from '../../components/TestimonialCarousel.astro';
2630
import CodeOverlay from '../../components/CodeOverlay.astro';
31+
import QuoteIcon from '../../assets/quote-left.svg';
32+
33+
<div class="copplestone-quote">
34+
<a href="https://x.com/kiwicopple/status/1990686524229181856" target="_blank" rel="noopener" class="quote-link plausible-event-name=home:copplestone-quote-click">
35+
<div class="quote-content">
36+
<img src={QuoteIcon.src} alt="" class="quote-icon" aria-hidden="true" />
37+
<div class="quote-text-wrapper">
38+
<p class="quote-text">"A workflow engine built on Supabase primitives."</p>
39+
<p class="quote-attribution">— Paul Copplestone, CEO, Supabase <span class="quote-source">(via&nbsp;X)</span></p>
40+
</div>
41+
</div>
42+
</a>
43+
</div>
2744

2845
<div class="comparison-container">
2946

@@ -408,6 +425,93 @@ Zero boilerplate required."
408425
</div>
409426

410427
<style>{`
428+
/* Copplestone quote styling */
429+
.copplestone-quote {
430+
margin-top: 3.25rem; /* 52px - clear separation from hero metadata */
431+
margin-bottom: 4.25rem; /* 68px - increased ~40% for clear separation from comparison */
432+
max-width: 640px; /* Expanded to fit quote on one line (~42-48 chars) */
433+
}
434+
435+
.copplestone-quote .quote-link {
436+
display: block;
437+
text-decoration: none;
438+
transition: opacity 0.2s ease;
439+
}
440+
441+
.copplestone-quote .quote-link:hover .quote-text {
442+
text-decoration: underline;
443+
text-decoration-color: var(--sl-color-white);
444+
}
445+
446+
.copplestone-quote .quote-content {
447+
display: flex;
448+
align-items: flex-start;
449+
gap: 1.875rem; /* 30px - reduced 2px to keep icon connected */
450+
}
451+
452+
.copplestone-quote .quote-icon {
453+
width: 1.875rem; /* 30px - reduced 15% on desktop */
454+
height: 1.875rem;
455+
flex-shrink: 0;
456+
margin-top: -0.6875rem; /* Shifted up ~3px to align center with x-height */
457+
filter: brightness(0) saturate(100%) invert(100%);
458+
opacity: 0.8; /* 80% - darker for more visibility */
459+
}
460+
461+
.copplestone-quote .quote-text-wrapper {
462+
flex: 1;
463+
}
464+
465+
.copplestone-quote .quote-text {
466+
font-size: 1.25rem; /* 20px on desktop */
467+
font-style: italic;
468+
font-weight: 550; /* Between medium and semibold */
469+
line-height: 1.6;
470+
margin: 0 0 0.75rem 0; /* 0.75-1rem gap to attribution */
471+
color: var(--sl-color-white);
472+
}
473+
474+
.copplestone-quote .quote-attribution {
475+
font-size: 1rem; /* 16px */
476+
font-style: normal;
477+
font-weight: 400;
478+
line-height: 1.6;
479+
margin: 0;
480+
color: var(--sl-color-white);
481+
opacity: 0.8;
482+
}
483+
484+
.copplestone-quote .quote-source {
485+
opacity: 0.6; /* Further reduced opacity for "(via X)" */
486+
}
487+
488+
@media (max-width: 768px) {
489+
.copplestone-quote {
490+
margin-top: 2.625rem; /* 42px - added 10px breathing room on mobile */
491+
margin-bottom: 3rem; /* 48px on mobile - proportionally larger */
492+
max-width: 100%;
493+
}
494+
495+
.copplestone-quote .quote-content {
496+
gap: 1.625rem; /* 26px - reduced 2px to keep icon connected to quote */
497+
}
498+
499+
.copplestone-quote .quote-icon {
500+
width: 1.6rem; /* 25.6px - reduced ~10% for better balance on mobile */
501+
height: 1.6rem;
502+
margin-top: -0.5rem; /* Shifted up ~3px to align center with x-height */
503+
}
504+
505+
.copplestone-quote .quote-text {
506+
font-size: 1.125rem; /* 18px on mobile */
507+
margin-bottom: 0.625rem; /* Proportional spacing */
508+
}
509+
510+
.copplestone-quote .quote-attribution {
511+
font-size: 0.9375rem; /* 15px on mobile */
512+
}
513+
}
514+
411515
.cta-card {
412516
transform: scale(1.35);
413517
margin-top: 3rem;

pkgs/website/src/styles/global.css

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ svg .secondary {
7070
}
7171

7272
@keyframes breathing-glow {
73+
7374
0%,
7475
100% {
7576
filter: drop-shadow(0 0 0 transparent);
@@ -84,7 +85,7 @@ svg .secondary {
8485
.call-to-action {
8586
font-weight: bold;
8687
box-shadow: 0 0 10px var(--logo-glow-color), 0 0 15px var(--logo-glow-color);
87-
filter: brightness(1.15);
88+
filter: brightness(1.05);
8889
transition: all 0.3s ease;
8990

9091
&:hover {
@@ -93,6 +94,11 @@ svg .secondary {
9394
}
9495
}
9596

97+
/* Bold hero primary CTA */
98+
.hero .actions .sl-link-button.primary {
99+
font-weight: bold;
100+
}
101+
96102
/* HERO QUICKSTART */
97103
.hero-quickstart {
98104
text-align: center;
@@ -329,10 +335,23 @@ svg .secondary {
329335
}
330336
}
331337

332-
/* Hide on small screens */
338+
/* Mobile: Convert to fixed footer bar */
333339
@media (max-width: 768px) {
334340
.hire-sticker {
335-
display: none;
341+
bottom: 0;
342+
right: 0;
343+
left: 0;
344+
width: 100%;
345+
border-radius: 0;
346+
padding: 10px 20px;
347+
text-align: center;
348+
justify-content: center;
349+
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
350+
font-size: 0.9rem;
351+
}
352+
353+
.hire-sticker:hover {
354+
transform: none;
336355
}
337356
}
338357

0 commit comments

Comments
 (0)