Skip to content

Commit

Permalink
feat: improve mobile paper cover style
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Jan 2, 2024
1 parent 9ff456b commit 2092aa2
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/components/widgets/note/NoteHeadCover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,29 @@ const NoteHeadCoverImpl = ({ image }: { image: string }) => {

return (
<>
<AutoResizeHeight>
{imageBlob && (
{!!imageBlob && (
<div
data-hide-print
className={clsx(
'z-1 absolute left-0 right-0 top-0',
imageBlob ? 'h-[224px]' : '0',
'top-[-6.5rem] md:top-0',
)}
>
<div
data-hide-print
className={clsx(
'z-1 absolute left-0 right-0 top-0',
imageBlob ? 'h-[224px]' : '0',
)}
>
<div
style={{
backgroundImage: `url(${imageBlob})`,
}}
className="cover-mask-b h-full w-full bg-cover bg-center bg-no-repeat"
/>
</div>
)}
</AutoResizeHeight>
style={{
backgroundImage: `url(${imageBlob})`,
}}
className="cover-mask-b h-full w-full bg-cover bg-center bg-no-repeat"
/>
</div>
)}

<AutoResizeHeight>
<div data-hide-print className={imageBlob ? 'h-[120px]' : 'h-0'} />
<div
data-hide-print
className={clsx(imageBlob ? 'h-[120px]' : 'h-0', 'hidden md:block')}
/>
</AutoResizeHeight>
</>
)
Expand Down

1 comment on commit 2092aa2

@vercel
Copy link

@vercel vercel bot commented on 2092aa2 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-git-main-innei.vercel.app
shiro-innei.vercel.app
innei.in

Please sign in to comment.