Skip to content

Commit 637da96

Browse files
author
Shannon Anahata
committed
more polish on the banner and the product dropdown
1 parent 71f95df commit 637da96

File tree

2 files changed

+66
-19
lines changed

2 files changed

+66
-19
lines changed

src/components/TopNavClient.tsx

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,32 @@ import platformSelectorStyles from './platformSelector/style.module.scss';
1111
import {PlatformSelector} from './platformSelector';
1212

1313
const productSections = [
14-
{label: 'Sentry', href: '/product/sentry/'},
15-
{label: 'Sentry Prevent', href: '/product/sentry-prevent/'},
16-
{label: 'Seer', href: '/product/seer/'},
14+
{label: 'Sentry Basics', href: '/product/sentry-basics/'},
15+
{label: 'AI in Sentry', href: '/product/ai-in-sentry/'},
16+
{label: 'Insights', href: '/product/insights/'},
17+
{label: 'User Feedback', href: '/product/user-feedback/'},
18+
{label: 'Uptime Monitoring', href: '/product/uptime-monitoring/'},
19+
{label: 'Dashboards', href: '/product/dashboards/'},
20+
{label: 'Projects', href: '/product/projects/'},
21+
{label: 'Explore', href: '/product/explore/'},
22+
{label: 'Issues', href: '/product/issues/'},
23+
{label: 'Alerts', href: '/product/alerts/'},
24+
{label: 'Crons', href: '/product/crons/'},
25+
{label: 'Releases', href: '/product/releases/'},
26+
{label: 'Relay', href: '/product/relay/'},
27+
{label: 'Sentry MCP', href: '/product/sentry-mcp/'},
28+
{label: 'Sentry Toolbar', href: '/product/sentry-toolbar/'},
29+
{label: 'Stats', href: '/product/stats/'},
30+
{label: 'Codecov', href: '/product/codecov/'},
31+
{label: 'Onboarding', href: '/product/onboarding/'},
1732
];
1833

1934
const mainSections = [
20-
{label: 'Products', href: '/product/'},
35+
{
36+
label: 'Products',
37+
href: '/product/',
38+
dropdown: productSections,
39+
},
2140
{label: 'SDKs', href: '/platforms/'},
2241
{
2342
label: 'Concepts & Reference',
@@ -240,16 +259,41 @@ export default function TopNavClient({platforms}: {platforms: Platform[]}) {
240259
{mainSections.map(section => (
241260
<li key={section.href} className="list-none relative">
242261
{section.label === 'Products' ? (
243-
<Link
244-
href={section.href}
245-
className={`text-[var(--gray-12)] transition-colors duration-150 inline-block py-2 px-1 rounded-t-md text-[0.875rem] font-normal ${
246-
pathname?.startsWith(section.href)
247-
? 'border-b-2 border-[var(--accent-purple)]'
248-
: 'hover:text-[var(--accent)]'
249-
}`}
250-
>
251-
{section.label}
252-
</Link>
262+
<div style={{display: 'inline-block'}}>
263+
<button
264+
ref={productsBtnRef}
265+
className={`text-[var(--gray-12)] transition-colors duration-150 inline-block py-2 px-1 rounded-t-md flex items-center gap-1 text-[0.875rem] font-normal ${
266+
productsDropdownOpen || pathname?.startsWith(section.href)
267+
? 'border-b-2 border-[var(--accent-purple)]'
268+
: 'hover:text-[var(--accent)]'
269+
}`}
270+
onClick={() => {
271+
setProductsDropdownOpen(v => !v);
272+
setConceptsDropdownOpen(false);
273+
setAdminDropdownOpen(false);
274+
}}
275+
aria-haspopup="true"
276+
aria-expanded={productsDropdownOpen}
277+
>
278+
{section.label}
279+
<svg
280+
className={`ml-1 transition-transform duration-150 ${productsDropdownOpen ? 'rotate-180' : ''}`}
281+
width="16"
282+
height="16"
283+
viewBox="0 0 16 16"
284+
fill="none"
285+
xmlns="http://www.w3.org/2000/svg"
286+
>
287+
<path
288+
d="M4 6L8 10L12 6"
289+
stroke="currentColor"
290+
strokeWidth="1.5"
291+
strokeLinecap="round"
292+
strokeLinejoin="round"
293+
/>
294+
</svg>
295+
</button>
296+
</div>
253297
) : section.label === 'SDKs' ? (
254298
<div style={{display: 'inline-block'}}>
255299
<button

src/components/home.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,18 @@ export default async function Home() {
5252
<div className="mt-[var(--header-height)]">
5353
<Banner />
5454
</div>
55-
{/* Centered Welcome Header and Subheader at the top */}
55+
{/* Slanted Banner with Welcome Header and Subheader */}
5656
<div
57-
className="flex flex-col items-center justify-center w-full"
57+
className="flex flex-col items-center justify-center w-full relative"
5858
style={{
59-
height: '250px',
59+
height: '270px',
6060
backgroundImage: `url(${BgLinkedin.src})`,
6161
backgroundSize: 'cover',
6262
backgroundPosition: 'center',
6363
backgroundRepeat: 'no-repeat',
6464
width: '100%',
65+
clipPath: 'polygon(0 0, 100% 0, 100% 85%, 0 100%)',
66+
marginBottom: 0,
6567
}}
6668
>
6769
<h1 className="text-4xl font-bold mb-2 text-center" style={{color: '#fff', textShadow: '0 4px 16px #000, 0 0 8px #000, 0 0 2px #000'}}>
@@ -78,9 +80,10 @@ export default async function Home() {
7880
</p>
7981
</div>
8082
{/* Search + SDKs row, same width as Sentry Products */}
81-
<div className="max-w-screen-xl mx-auto px-6 lg:px-8 w-full">
83+
<div className="max-w-screen-xl mx-auto px-6 lg:px-8 w-full" style={{marginTop: 0, paddingTop: 0}}>
8284
<div
83-
className="w-full flex flex-col md:flex-row items-stretch mb-3 justify-between relative"
85+
className="w-full flex flex-col md:flex-row items-stretch justify-between relative"
86+
style={{marginTop: 0, marginBottom: 0}}
8487
>
8588
{/* Left column: Search Bar, left-aligned */}
8689
<div className="flex-1 flex flex-col items-start justify-center w-full max-w-full relative">

0 commit comments

Comments
 (0)