Skip to content

Commit b79371e

Browse files
refactor(ui): simplify section anchor handling
1 parent a688c3b commit b79371e

File tree

4 files changed

+19
-75
lines changed

4 files changed

+19
-75
lines changed

apps/web/src/routes/_view/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,10 @@ function HeroSection({
289289
return (
290290
<div className="bg-linear-to-b from-stone-50/30 to-stone-100/30">
291291
<div className="flex flex-col items-center text-center">
292-
<section className="relative flex flex-col items-center text-center gap-12 py-24 px-4 laptop:px-0">
293-
<div
294-
id="hero"
295-
className="absolute top-[-69px] h-[69px] pointer-events-none"
296-
/>
292+
<section
293+
id="hero"
294+
className="flex flex-col items-center text-center gap-12 py-24 px-4 laptop:px-0"
295+
>
297296
<div className="space-y-6 max-w-4xl">
298297
<h1 className="text-4xl sm:text-5xl font-serif tracking-tight text-stone-600">
299298
The AI notepad for <br className="block sm:hidden" />

apps/web/src/routes/_view/product/ai-assistant.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ function HeroSection() {
7575

7676
function BeforeMeetingSection() {
7777
return (
78-
<section className="relative">
79-
<div
80-
id="before-meeting"
81-
className="absolute top-[-69px] h-[69px] pointer-events-none"
82-
/>
78+
<section id="before-meeting">
8379
<div className="text-center font-medium text-neutral-600 uppercase tracking-wide py-6 font-serif">
8480
Before meetings
8581
</div>
@@ -193,11 +189,7 @@ function BeforeMeetingSection() {
193189

194190
function DuringMeetingSection() {
195191
return (
196-
<section className="relative">
197-
<div
198-
id="during-meeting"
199-
className="absolute top-[-69px] h-[69px] pointer-events-none"
200-
/>
192+
<section id="during-meeting">
201193
<div className="text-center font-medium text-neutral-600 uppercase tracking-wide py-6 font-serif">
202194
During meetings
203195
</div>
@@ -303,11 +295,7 @@ function DuringMeetingSection() {
303295

304296
function AfterMeetingSection() {
305297
return (
306-
<section className="relative">
307-
<div
308-
id="after-meeting"
309-
className="absolute top-[-69px] h-[69px] pointer-events-none"
310-
/>
298+
<section id="after-meeting">
311299
<div className="text-center font-medium text-neutral-600 uppercase tracking-wide py-6 font-serif">
312300
After meetings
313301
</div>

apps/web/src/routes/_view/product/ai-notetaking.tsx

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,7 @@ function HeroSection() {
185185

186186
function EditorSection() {
187187
return (
188-
<section className="bg-stone-50/30 relative">
189-
<div
190-
id="editor"
191-
className="absolute top-[-69px] h-[69px] pointer-events-none"
192-
/>
188+
<section id="editor" className="bg-stone-50/30">
193189
<div className="hidden sm:grid sm:grid-cols-2">
194190
<div className="flex items-center p-8">
195191
<div className="flex flex-col gap-4">
@@ -667,11 +663,7 @@ function AnimatedMarkdownDemo({ isMobile = false }: { isMobile?: boolean }) {
667663

668664
function TranscriptionSection() {
669665
return (
670-
<section className="border-y border-neutral-100 relative">
671-
<div
672-
id="transcription"
673-
className="absolute top-[-69px] h-[69px] pointer-events-none"
674-
/>
666+
<section id="transcription" className="border-y border-neutral-100">
675667
<div className="text-center py-12 px-4 lg:px-0">
676668
<h2 className="text-3xl font-serif text-stone-600 mb-4">
677669
Transcription
@@ -840,11 +832,7 @@ function SummariesSection() {
840832
}, []);
841833

842834
return (
843-
<section className="relative">
844-
<div
845-
id="summaries"
846-
className="absolute top-[-69px] h-[69px] pointer-events-none"
847-
/>
835+
<section id="summaries">
848836
<div className="text-center py-12 px-4 lg:px-0">
849837
<h2 className="text-3xl font-serif text-stone-600 mb-4">
850838
AI summaries
@@ -1108,15 +1096,12 @@ function SearchSection() {
11081096

11091097
return (
11101098
<section
1111-
className="bg-stone-50/30 bg-cover bg-center relative"
1099+
id="search"
1100+
className="bg-stone-50/30 bg-cover bg-center"
11121101
style={{
11131102
backgroundImage: "url(/api/images/texture/bg-stars.jpg)",
11141103
}}
11151104
>
1116-
<div
1117-
id="search"
1118-
className="absolute top-[-69px] h-[69px] pointer-events-none"
1119-
/>
11201105
<div className="py-20 px-6">
11211106
<div className="text-center space-y-12">
11221107
<div>
@@ -1952,11 +1937,7 @@ TrackProtectCell.displayName = "TrackProtectCell";
19521937

19531938
function SharingSection() {
19541939
return (
1955-
<section className="relative">
1956-
<div
1957-
id="sharing"
1958-
className="absolute top-[-69px] h-[69px] pointer-events-none"
1959-
/>
1940+
<section id="sharing">
19601941
<div className="text-center py-12 px-4 lg:px-0">
19611942
<div className="inline-block px-4 py-1.5 bg-linear-to-t from-neutral-200 to-neutral-100 text-neutral-900 rounded-full shadow-sm text-xs font-medium mb-4">
19621943
Coming Soon
@@ -2180,11 +2161,7 @@ const AUTO_ADVANCE_DURATION = 5000;
21802161

21812162
function FloatingPanelSection() {
21822163
return (
2183-
<section className="border-y border-neutral-100 relative">
2184-
<div
2185-
id="floating-panel"
2186-
className="absolute top-[-69px] h-[69px] pointer-events-none"
2187-
/>
2164+
<section id="floating-panel" className="border-y border-neutral-100">
21882165
<FloatingPanelHeader />
21892166
<FloatingPanelContent />
21902167
</section>

apps/web/src/routes/_view/product/mini-apps.tsx

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ function HeroSection() {
7575

7676
function ContactsSection() {
7777
return (
78-
<section className="bg-stone-50/30 relative">
79-
<div
80-
id="contacts"
81-
className="absolute top-[-69px] h-[69px] pointer-events-none"
82-
/>
78+
<section id="contacts" className="bg-stone-50/30">
8379
<div className="hidden sm:grid sm:grid-cols-2">
8480
<div className="flex items-center p-8">
8581
<div className="flex flex-col gap-4">
@@ -255,11 +251,7 @@ function ContactsSection() {
255251

256252
function CalendarSection() {
257253
return (
258-
<section className="bg-stone-50/30 relative">
259-
<div
260-
id="calendar"
261-
className="absolute top-[-69px] h-[69px] pointer-events-none"
262-
/>
254+
<section id="calendar" className="bg-stone-50/30">
263255
<div className="hidden sm:grid sm:grid-cols-2">
264256
<div className="flex items-center p-8">
265257
<div className="flex flex-col gap-4">
@@ -419,11 +411,7 @@ function CalendarSection() {
419411

420412
function DailyNotesSection() {
421413
return (
422-
<section className="bg-stone-50/30 relative">
423-
<div
424-
id="daily-notes"
425-
className="absolute top-[-69px] h-[69px] pointer-events-none"
426-
/>
414+
<section id="daily-notes" className="bg-stone-50/30">
427415
<div className="hidden sm:grid sm:grid-cols-2">
428416
<div className="flex items-center p-8">
429417
<div className="flex flex-col gap-4">
@@ -521,11 +509,7 @@ function DailyNotesSection() {
521509

522510
function NoteshelfSection() {
523511
return (
524-
<section className="bg-stone-50/30 relative">
525-
<div
526-
id="noteshelf"
527-
className="absolute top-[-69px] h-[69px] pointer-events-none"
528-
/>
512+
<section id="noteshelf" className="bg-stone-50/30">
529513
<div className="hidden sm:grid sm:grid-cols-2">
530514
<div className="flex items-center p-8">
531515
<div className="flex flex-col gap-4">
@@ -643,11 +627,7 @@ function AdvancedSearchSection() {
643627
];
644628

645629
return (
646-
<section className="bg-stone-50/30 relative">
647-
<div
648-
id="advanced-search"
649-
className="absolute top-[-69px] h-[69px] pointer-events-none"
650-
/>
630+
<section id="advanced-search" className="bg-stone-50/30">
651631
<div>
652632
<div className="text-center">
653633
<div className="py-12 px-6">

0 commit comments

Comments
 (0)