fix: style
This commit is contained in:
@@ -391,15 +391,15 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
? Number.POSITIVE_INFINITY
|
? Number.POSITIVE_INFINITY
|
||||||
: portfolioEyebrow.getBoundingClientRect().top + window.scrollY;
|
: portfolioEyebrow.getBoundingClientRect().top + window.scrollY;
|
||||||
const isMobileViewport: boolean = window.innerWidth <= 700;
|
const isMobileViewport: boolean = window.innerWidth <= 700;
|
||||||
const mobileRevealDistance: number = Math.max(window.innerHeight * 0.38, 180);
|
const mobileRevealDistance: number = window.innerHeight / 25;
|
||||||
const triggerDistance: number = isMobileViewport
|
const triggerDistance: number = isMobileViewport
|
||||||
? mobileRevealDistance
|
? mobileRevealDistance
|
||||||
: Math.max(portfolioTriggerY, 1);
|
: Math.max(portfolioTriggerY, 1);
|
||||||
const rawProgress: number = Math.min(window.scrollY / triggerDistance, 1);
|
const rawProgress: number = Math.min(window.scrollY / triggerDistance, 1);
|
||||||
const acceleratedProgress: number = Math.pow(rawProgress, isMobileViewport ? 0.62 : 0.66);
|
const acceleratedProgress: number = Math.pow(rawProgress, isMobileViewport ? 0.48 : 0.66);
|
||||||
const progress: number =
|
const progress: number =
|
||||||
window.scrollY > 0
|
window.scrollY > 0
|
||||||
? Math.max(acceleratedProgress, isMobileViewport ? 0.06 : 0.05)
|
? Math.max(acceleratedProgress, isMobileViewport ? 0.18 : 0.05)
|
||||||
: acceleratedProgress;
|
: acceleratedProgress;
|
||||||
|
|
||||||
root.style.setProperty('--name-pride-progress', progress.toFixed(4));
|
root.style.setProperty('--name-pride-progress', progress.toFixed(4));
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
@@ -44,6 +45,7 @@ html {
|
|||||||
body {
|
body {
|
||||||
font-family: 'Outfit', Arial, sans-serif;
|
font-family: 'Outfit', Arial, sans-serif;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
|
overflow-x: clip;
|
||||||
background:
|
background:
|
||||||
radial-gradient(circle at top left, rgba(217, 162, 140, 0.22), transparent 26%),
|
radial-gradient(circle at top left, rgba(217, 162, 140, 0.22), transparent 26%),
|
||||||
radial-gradient(circle at bottom right, rgba(127, 78, 63, 0.28), transparent 28%),
|
radial-gradient(circle at bottom right, rgba(127, 78, 63, 0.28), transparent 28%),
|
||||||
|
|||||||
Reference in New Issue
Block a user