Skip to content

Commit d661f7e

Browse files
authored
Website Update
1 parent 85f2ece commit d661f7e

2 files changed

Lines changed: 20 additions & 42 deletions

File tree

docs/assets/css/style.css

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
--site-atmosphere-opacity: 1;
5656

5757
/* simplified static atmosphere box */
58-
--site-atmosphere-top: clamp(4.5rem, 10svh, 8rem);
59-
--site-atmosphere-box-height: clamp(14rem, 34svh, 24rem);
60-
--site-atmosphere-width: 148vw;
58+
--site-atmosphere-top: clamp(4.75rem, 10.5svh, 8.25rem);
59+
--site-atmosphere-box-height: clamp(15rem, 35svh, 25rem);
60+
--site-atmosphere-width: 152vw;
6161
}
6262

6363
* {
@@ -106,14 +106,13 @@ body.page-home {
106106
left: 50%;
107107
width: 100vw;
108108
height: var(--site-atmosphere-box-height);
109-
margin-left: -50vw;
109+
transform: translateX(-50%) translateZ(0);
110+
-webkit-transform: translateX(-50%) translateZ(0);
110111
opacity: var(--site-atmosphere-opacity);
111112
will-change: opacity;
112113
isolation: isolate;
113114
pointer-events: none;
114115
overflow: clip;
115-
transform: translateZ(0);
116-
-webkit-transform: translateZ(0);
117116
backface-visibility: hidden;
118117
background:
119118
radial-gradient(74% 58% at 37% 30%, rgba(255, 157, 77, 0.13) 0%, rgba(255, 157, 77, 0.094) 28%, rgba(255, 157, 77, 0.03) 52%, rgba(255, 157, 77, 0) 72%),
@@ -997,7 +996,7 @@ a {
997996
}
998997

999998
.site-atmosphere__layer {
1000-
--site-atmosphere-width: 170vw;
999+
--site-atmosphere-width: 174vw;
10011000
background:
10021001
radial-gradient(78% 62% at 39% 31%, rgba(255, 157, 77, 0.13) 0%, rgba(255, 157, 77, 0.094) 28%, rgba(255, 157, 77, 0.03) 52%, rgba(255, 157, 77, 0) 72%),
10031002
radial-gradient(72% 58% at 61% 34%, rgba(82, 104, 255, 0.12) 0%, rgba(82, 104, 255, 0.086) 28%, rgba(82, 104, 255, 0.026) 52%, rgba(82, 104, 255, 0) 72%);
@@ -2435,9 +2434,9 @@ body.page-home #about {
24352434
@media (max-width: 980px) {
24362435
:root {
24372436
--page-top-offset: calc(env(safe-area-inset-top, 0px) + 5.35rem);
2438-
--site-atmosphere-top: clamp(4rem, 9.5svh, 6.8rem);
2439-
--site-atmosphere-box-height: clamp(12.5rem, 32svh, 20rem);
2440-
--site-atmosphere-width: 156vw;
2437+
--site-atmosphere-top: clamp(4.2rem, 9.5svh, 7rem);
2438+
--site-atmosphere-box-height: clamp(13rem, 32svh, 21rem);
2439+
--site-atmosphere-width: 160vw;
24412440
}
24422441

24432442
.page-wrap {
@@ -2492,9 +2491,9 @@ body.page-home #about {
24922491
@media (max-width: 980px) and (orientation: portrait) {
24932492
:root {
24942493
--page-top-offset: calc(env(safe-area-inset-top, 0px) + 8px + var(--nav-pill-height-mobile) + 14px);
2495-
--site-atmosphere-top: clamp(4.6rem, 10.5svh, 7.2rem);
2496-
--site-atmosphere-box-height: clamp(12rem, 31svh, 18rem);
2497-
--site-atmosphere-width: 178vw;
2494+
--site-atmosphere-top: clamp(4.9rem, 11svh, 7.6rem);
2495+
--site-atmosphere-box-height: clamp(12.75rem, 30svh, 18.5rem);
2496+
--site-atmosphere-width: 182vw;
24982497
}
24992498

25002499
.nav {
@@ -2682,9 +2681,9 @@ body.page-home #about {
26822681

26832682
@media (max-width: 980px) and (orientation: landscape) {
26842683
:root {
2685-
--site-atmosphere-top: clamp(3.8rem, 8.5svh, 5.8rem);
2686-
--site-atmosphere-box-height: clamp(11rem, 29svh, 16rem);
2687-
--site-atmosphere-width: 154vw;
2684+
--site-atmosphere-top: clamp(3.95rem, 8.6svh, 6rem);
2685+
--site-atmosphere-box-height: clamp(11.5rem, 28svh, 16.5rem);
2686+
--site-atmosphere-width: 156vw;
26882687
}
26892688

26902689
.nav-toggle {
@@ -2831,7 +2830,8 @@ body.page-home #about {
28312830
.site-atmosphere__layer {
28322831
animation: none !important;
28332832
transition: none !important;
2834-
transform: none !important;
2833+
transform: translateX(-50%) !important;
2834+
-webkit-transform: translateX(-50%) !important;
28352835
}
28362836

28372837
.stack-loading-overlay {

docs/assets/js/shell.js

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,10 @@
415415
const root = document.documentElement;
416416
if (!isPortraitMobile()) return null;
417417

418-
const vv = window.visualViewport;
419418
const scrollTop = Math.round(window.scrollY || window.pageYOffset || 0);
420-
const viewportTop = Math.round(vv?.offsetTop ?? 0);
421-
const viewportHeight = Math.round(vv?.height ?? window.innerHeight);
422-
const viewportWidth = Math.round(vv?.width ?? window.innerWidth);
419+
const viewportTop = 0;
420+
const viewportHeight = Math.round(window.innerHeight || document.documentElement.clientHeight || 0);
421+
const viewportWidth = Math.round(window.innerWidth || document.documentElement.clientWidth || 0);
423422
const viewportBottom = viewportTop + viewportHeight;
424423

425424
root.style.setProperty('--menu-blur-top', `${scrollTop + viewportTop}px`);
@@ -914,20 +913,6 @@
914913
window.addEventListener('resize', syncMobileNavState);
915914
window.addEventListener('orientationchange', syncMobileNavState);
916915
window.addEventListener('pageshow', syncMobileNavState);
917-
918-
if (window.visualViewport){
919-
let viewportSyncRaf = 0;
920-
const syncViewportLayout = () => {
921-
if (!isPortraitMenuActive(nav) || !nav.classList.contains('nav--opening')) return;
922-
if (viewportSyncRaf) return;
923-
viewportSyncRaf = requestAnimationFrame(() => {
924-
viewportSyncRaf = 0;
925-
syncPortraitMenuBlurViewport();
926-
});
927-
};
928-
window.visualViewport.addEventListener('resize', syncViewportLayout);
929-
window.visualViewport.addEventListener('scroll', syncViewportLayout);
930-
}
931916
}
932917

933918
const brand = document.querySelector('.brand');
@@ -1299,13 +1284,6 @@
12991284
layer.style.removeProperty('transition');
13001285
layer.style.removeProperty('animation');
13011286

1302-
const viewportWidth = Math.max(
1303-
1,
1304-
Math.round(window.innerWidth || document.documentElement.clientWidth || 0)
1305-
);
1306-
1307-
root.style.setProperty('--site-atmosphere-viewport-width', `${viewportWidth}px`);
1308-
root.style.setProperty('--site-atmosphere-render-width', `${viewportWidth}px`);
13091287
body.dataset.siteAtmosphereLocked = '1';
13101288
}
13111289

0 commit comments

Comments
 (0)