made it sticky

This commit is contained in:
zmeyer44 2023-10-14 19:03:44 -04:00
parent e210351578
commit edb8ea7c9f
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import { ReactElement } from "react";
export default function ModalLayout({ children }: { children: ReactElement }) {
return (
<div className="z-overlay fixed inset-y-[10px] left-[10px] right-[10px] rounded-lg border bg-background px-4 sm:left-[calc(10px_+_var(--sidebar-closed-width))] xl:left-[calc(10px_+_var(--sidebar-open-width))]">
<div className="z-overlay fixed inset-y-[10px] left-[10px] right-[10px] overflow-hidden overflow-y-auto rounded-lg border bg-background px-4 sm:left-[calc(10px_+_var(--sidebar-closed-width))] xl:left-[calc(10px_+_var(--sidebar-open-width))]">
{children}
</div>
);

View File

@ -43,7 +43,7 @@ export default function ArticlePage() {
return (
<div className="relative @container">
<div className="absolute inset-x-0 top-0 flex items-center justify-between border-b pb-4 pt-4">
<div className="sticky inset-x-0 top-0 z-10 flex items-center justify-between border-b bg-background pb-4 pt-4">
<div className="center gap-x-3">
<Avatar className="center h-8 w-8 overflow-hidden rounded-sm bg-muted">
<AvatarImage
@ -73,8 +73,8 @@ export default function ArticlePage() {
<RiCloseFill className="h-5 w-5" />
</Button>
</div>
<div className="h-[70px] w-full"></div>
<div className="max-h-[calc(100vh_-_100px)] overflow-y-auto">
<div className="h-[20px] w-full"></div>
<div className="vmax-h-[calc(100vh_-_100px)] overflow-y-auto">
<article className="prose dark:prose-invert prose-zinc relative mx-auto max-w-3xl pt-7">
<div className="">
<div className="flex items-center justify-between gap-1 lg:mb-2">