预加载和适配屏幕修复
This commit is contained in:
@@ -16,6 +16,8 @@ const ProxyImage: React.FC<ProxyImageProps> = ({
|
||||
displaySrc,
|
||||
retryDelay = 2000,
|
||||
retryOnError = true,
|
||||
loading = 'lazy',
|
||||
decoding = 'async',
|
||||
onError,
|
||||
src: _src,
|
||||
...props
|
||||
@@ -41,6 +43,8 @@ const ProxyImage: React.FC<ProxyImageProps> = ({
|
||||
<img
|
||||
{...props}
|
||||
src={displaySrc || processImageUrl(originalSrc)}
|
||||
loading={loading}
|
||||
decoding={decoding}
|
||||
onError={handleError}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -151,8 +151,10 @@ export default function MangaLayout({ children }: MangaLayoutProps) {
|
||||
</header>
|
||||
|
||||
<main
|
||||
className={`mx-auto max-w-7xl px-3 pt-20 sm:px-6 sm:pt-24 ${
|
||||
isReadingPage ? 'pb-24 sm:pb-28 lg:pb-10' : 'pb-[calc(5rem+env(safe-area-inset-bottom))] sm:pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-10'
|
||||
className={`mx-auto max-w-7xl pt-20 sm:pt-24 ${
|
||||
isReadingPage
|
||||
? 'px-0 pb-24 sm:px-0 sm:pb-28 lg:pb-10'
|
||||
: 'px-3 pb-[calc(5rem+env(safe-area-inset-bottom))] sm:px-6 sm:pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-10'
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user