Skip to content

Commit 6fe40b5

Browse files
authored
Website Update
1 parent 2cd5629 commit 6fe40b5

2 files changed

Lines changed: 3 additions & 121 deletions

File tree

docs/assets/css/style.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
--home-next-layer-overlap: clamp(34rem, 68vh, 46rem);
5454
--site-atmosphere-opacity: 1;
5555

56-
--site-atmosphere-top: clamp(4.75rem, 10svh, 8.25rem);
57-
--site-atmosphere-box-height: clamp(15rem, 33svh, 23rem);
56+
--site-atmosphere-top: 10svh;
57+
--site-atmosphere-box-height: 36svh;
5858
--site-atmosphere-width: 152vw;
5959
}
6060

@@ -89,6 +89,7 @@ body.page-home {
8989
.site-atmosphere {
9090
position: absolute;
9191
inset: 0 0 auto;
92+
height: 100svh;
9293
z-index: 0;
9394
pointer-events: none;
9495
isolation: isolate;
@@ -2443,8 +2444,6 @@ body.page-home #about {
24432444
@media (max-width: 980px) {
24442445
:root {
24452446
--page-top-offset: calc(env(safe-area-inset-top, 0px) + 5.35rem);
2446-
--site-atmosphere-top: clamp(4.2rem, 9.5svh, 7rem);
2447-
--site-atmosphere-box-height: clamp(13.5rem, 32svh, 20.5rem);
24482447
--site-atmosphere-width: 160vw;
24492448
}
24502449

@@ -2500,8 +2499,6 @@ body.page-home #about {
25002499
@media (max-width: 980px) and (orientation: portrait) {
25012500
:root {
25022501
--page-top-offset: calc(env(safe-area-inset-top, 0px) + 8px + var(--nav-pill-height-mobile) + 14px);
2503-
--site-atmosphere-top: clamp(4.9rem, 10svh, 7.6rem);
2504-
--site-atmosphere-box-height: clamp(13rem, 31svh, 19rem);
25052502
--site-atmosphere-width: 182vw;
25062503
}
25072504

@@ -2690,8 +2687,6 @@ body.page-home #about {
26902687

26912688
@media (max-width: 980px) and (orientation: landscape) {
26922689
:root {
2693-
--site-atmosphere-top: clamp(3.9rem, 10svh, 6rem);
2694-
--site-atmosphere-box-height: clamp(11.5rem, 30svh, 16.5rem);
26952690
--site-atmosphere-width: 156vw;
26962691
}
26972692

docs/assets/js/shell.js

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,118 +1235,6 @@
12351235
root.style.setProperty('--hero-initial-viewport-height', `${viewportHeight}px`);
12361236
}
12371237

1238-
function initSiteAtmosphereLock() {
1239-
const atmosphere = document.querySelector('.site-atmosphere');
1240-
const layer = document.querySelector('.site-atmosphere__layer');
1241-
const root = document.documentElement;
1242-
1243-
if (!atmosphere || !layer) {
1244-
return;
1245-
}
1246-
1247-
let rafId = 0;
1248-
1249-
const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
1250-
1251-
const clearInlineOverrides = () => {
1252-
atmosphere.style.removeProperty('transform');
1253-
atmosphere.style.removeProperty('translate');
1254-
atmosphere.style.removeProperty('left');
1255-
atmosphere.style.removeProperty('right');
1256-
atmosphere.style.removeProperty('bottom');
1257-
atmosphere.style.removeProperty('margin-top');
1258-
atmosphere.style.removeProperty('margin-bottom');
1259-
atmosphere.style.removeProperty('min-height');
1260-
atmosphere.style.removeProperty('height');
1261-
atmosphere.style.removeProperty('top');
1262-
1263-
layer.style.removeProperty('transform');
1264-
layer.style.removeProperty('translate');
1265-
layer.style.removeProperty('left');
1266-
layer.style.removeProperty('right');
1267-
layer.style.removeProperty('bottom');
1268-
layer.style.removeProperty('margin-top');
1269-
layer.style.removeProperty('margin-bottom');
1270-
layer.style.removeProperty('min-height');
1271-
layer.style.removeProperty('max-height');
1272-
layer.style.removeProperty('transition');
1273-
layer.style.removeProperty('animation');
1274-
};
1275-
1276-
const sync = () => {
1277-
rafId = 0;
1278-
clearInlineOverrides();
1279-
1280-
const viewportHeight = Math.max(
1281-
1,
1282-
Math.round(window.innerHeight || document.documentElement.clientHeight || 0)
1283-
);
1284-
const viewportWidth = Math.max(
1285-
1,
1286-
Math.round(window.innerWidth || document.documentElement.clientWidth || 0)
1287-
);
1288-
const portraitMobile = window.matchMedia('(max-width: 980px) and (orientation: portrait)').matches;
1289-
const landscapeMobile = window.matchMedia('(max-width: 980px) and (orientation: landscape)').matches;
1290-
1291-
const totalEffectHeight = portraitMobile
1292-
? clamp(viewportHeight * 0.44, 260, 430)
1293-
: landscapeMobile
1294-
? clamp(viewportHeight * 0.4, 210, 320)
1295-
: clamp(viewportHeight * 0.41, 240, 390);
1296-
1297-
const topOffset = portraitMobile
1298-
? clamp(viewportHeight * 0.028, 12, 26)
1299-
: landscapeMobile
1300-
? clamp(viewportHeight * 0.045, 14, 26)
1301-
: clamp(viewportHeight * 0.05, 18, 34);
1302-
1303-
const boxHeight = Math.max(160, Math.round(totalEffectHeight - topOffset));
1304-
const width = portraitMobile
1305-
? clamp(viewportWidth * 1.88, 580, 1200)
1306-
: landscapeMobile
1307-
? clamp(viewportWidth * 1.58, 900, 1800)
1308-
: clamp(viewportWidth * 1.52, 1100, 2200);
1309-
1310-
root.style.setProperty('--site-atmosphere-top', `${Math.round(topOffset)}px`);
1311-
root.style.setProperty('--site-atmosphere-box-height', `${Math.round(boxHeight)}px`);
1312-
root.style.setProperty('--site-atmosphere-width', `${Math.round(width)}px`);
1313-
1314-
atmosphere.style.top = '0px';
1315-
atmosphere.style.height = `${Math.round(topOffset + boxHeight)}px`;
1316-
1317-
body.dataset.siteAtmosphereLocked = '1';
1318-
};
1319-
1320-
const requestSync = () => {
1321-
if (rafId) return;
1322-
rafId = requestAnimationFrame(sync);
1323-
};
1324-
1325-
const settledSync = createSettledScheduler(sync);
1326-
1327-
sync();
1328-
1329-
window.addEventListener('resize', () => {
1330-
requestSync();
1331-
settledSync.schedule(80);
1332-
});
1333-
1334-
window.addEventListener('orientationchange', () => {
1335-
requestSync();
1336-
settledSync.schedule(140);
1337-
});
1338-
1339-
window.addEventListener('pageshow', () => {
1340-
requestSync();
1341-
settledSync.schedule(80);
1342-
});
1343-
1344-
window.addEventListener('load', () => {
1345-
requestSync();
1346-
settledSync.schedule(120);
1347-
});
1348-
}
1349-
13501238
function initHomeScrollTransition() {
13511239
const root = document.documentElement;
13521240
const hero = document.querySelector("#hero");
@@ -2429,7 +2317,6 @@
24292317

24302318
async function boot() {
24312319
initHeroViewportLock();
2432-
initSiteAtmosphereLock();
24332320

24342321
await Promise.all([
24352322
injectPartial('#nav-slot', 'nav.html'),

0 commit comments

Comments
 (0)