forked from hazem/yslootahrobotics
feat: update overlay positioning and styles for improved CTA visibility
This commit is contained in:
parent
1788df79e1
commit
90a43c4312
@ -12,7 +12,7 @@ export default function ConfigurePage() {
|
|||||||
style={{
|
style={{
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
top: '1rem',
|
top: '1rem',
|
||||||
left: '1rem',
|
right: '1rem',
|
||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|||||||
@ -468,6 +468,16 @@ html {
|
|||||||
.overlay-scroll-hint {
|
.overlay-scroll-hint {
|
||||||
bottom: 1.5rem !important;
|
bottom: 1.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.overlay-cta-section {
|
||||||
|
bottom: 3vh !important;
|
||||||
|
top: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-cta-btn {
|
||||||
|
padding: 0.85rem 2rem !important;
|
||||||
|
font-size: 0.85rem !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Small phones */
|
/* Small phones */
|
||||||
|
|||||||
@ -126,7 +126,7 @@ const SECTION_CONFIGS = [
|
|||||||
{ id: 'hero', startAt: 0.10, peakAt: 0.22, endAt: 0.35, align: 'left' as const, verticalAlign: 'center' as const },
|
{ id: 'hero', startAt: 0.10, peakAt: 0.22, endAt: 0.35, align: 'left' as const, verticalAlign: 'center' as const },
|
||||||
{ id: 'headReveal', startAt: 0.35, peakAt: 0.46, endAt: 0.53, align: 'right' as const, verticalAlign: 'center' as const },
|
{ id: 'headReveal', startAt: 0.35, peakAt: 0.46, endAt: 0.53, align: 'right' as const, verticalAlign: 'center' as const },
|
||||||
{ id: 'customization', startAt: 0.55, peakAt: 0.66, endAt: 0.77, align: 'left' as const, verticalAlign: 'center' as const },
|
{ id: 'customization', startAt: 0.55, peakAt: 0.66, endAt: 0.77, align: 'left' as const, verticalAlign: 'center' as const },
|
||||||
{ id: 'mobility', startAt: 0.80, peakAt: 0.90, endAt: 1.0, align: 'right' as const, verticalAlign: 'center' as const },
|
{ id: 'mobility', startAt: 0.75, peakAt: 0.82, endAt: 0.90, align: 'right' as const, verticalAlign: 'center' as const },
|
||||||
];
|
];
|
||||||
|
|
||||||
export function ScrollOverlays() {
|
export function ScrollOverlays() {
|
||||||
@ -255,23 +255,19 @@ export function ScrollOverlays() {
|
|||||||
</OverlaySection>
|
</OverlaySection>
|
||||||
|
|
||||||
{/* Configure CTA — appears at the very end of scroll */}
|
{/* Configure CTA — appears at the very end of scroll */}
|
||||||
<motion.div
|
<OverlaySection
|
||||||
style={{
|
progress={scrollYProgress}
|
||||||
position: 'absolute',
|
startAt={0.90}
|
||||||
bottom: '8vh',
|
peakAt={0.95}
|
||||||
left: '50%',
|
endAt={1.0}
|
||||||
transform: 'translateX(-50%)',
|
align="center"
|
||||||
display: 'flex',
|
verticalAlign="center"
|
||||||
flexDirection: 'column',
|
className="overlay-cta-section"
|
||||||
alignItems: 'center',
|
|
||||||
gap: '1rem',
|
|
||||||
opacity: useTransform(scrollYProgress, [0.88, 0.95], [0, 1]),
|
|
||||||
pointerEvents: 'auto',
|
|
||||||
zIndex: 20,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.75rem', pointerEvents: 'auto' }}>
|
||||||
<Link
|
<Link
|
||||||
href="/configure/"
|
href="/configure/"
|
||||||
|
className="overlay-cta-btn"
|
||||||
style={{
|
style={{
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@ -297,7 +293,8 @@ export function ScrollOverlays() {
|
|||||||
<span style={{ fontSize: '0.7rem', color: '#94a3b8', letterSpacing: '0.15em', textTransform: 'uppercase' }}>
|
<span style={{ fontSize: '0.7rem', color: '#94a3b8', letterSpacing: '0.15em', textTransform: 'uppercase' }}>
|
||||||
Build & Order Your Robot
|
Build & Order Your Robot
|
||||||
</span>
|
</span>
|
||||||
</motion.div>
|
</div>
|
||||||
|
</OverlaySection>
|
||||||
|
|
||||||
{/* Scroll indicator mapped to vanish rapidly when scrolled */}
|
{/* Scroll indicator mapped to vanish rapidly when scrolled */}
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user