Files
ComfyUI_frontend/apps/website/src/composables/scrollLock.ts
Yourz bbb043c9cc feat(website): Polish and fix UI (#11363)
## Summary

<!-- One sentence describing what changed and why. -->

Polish and fix UI for new website

## Changes

- **What**: <!-- Core functionality added/modified -->
  - [x] update about video
  - [x] update Moment factory story content
  - [x] update homepage visual
  - [x] update customer story visual
  - [x] put images and videos to bucket

## Review Focus

<!-- Critical design decisions or edge cases that need attention -->

<!-- If this PR fixes an issue, uncomment and update the line below -->
<!-- Fixes #ISSUE_NUMBER -->

## Screenshots (if applicable)

<!-- Add screenshots or video recording to help explain your changes -->

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11363-feat-website-Polish-and-fix-UI-3466d73d365081f895aff84b594450c9)
by [Unito](https://www.unito.io)

---------

Co-authored-by: DrJKL <DrJKL0424@gmail.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: github-actions <github-actions@github.com>
2026-04-22 18:45:27 -07:00

40 lines
725 B
TypeScript

import { scrollTo, stopScroller, startScroller } from '../scripts/smoothScroll'
let savedScrollY = 0
let lockCount = 0
export function lockScroll() {
lockCount++
if (lockCount > 1) return
savedScrollY = window.scrollY
stopScroller()
Object.assign(document.body.style, {
position: 'fixed',
top: `-${savedScrollY}px`,
left: '0',
right: '0'
})
}
export function unlockScroll(options?: { skipRestore?: boolean }) {
if (lockCount <= 0) return
lockCount--
if (lockCount > 0) return
Object.assign(document.body.style, {
position: '',
top: '',
left: '',
right: ''
})
if (!options?.skipRestore) {
scrollTo(savedScrollY, { immediate: true })
}
startScroller()
}