Skip to content

Commit

Permalink
fix: toolbar not sticky anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Clovis committed Nov 5, 2024
1 parent 1b5ce5a commit fc827fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cms/src/layout/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Base = ({ write = false }: { write?: boolean }) => {
</div>
</div>
<Line />
<div className='max-w-[1300px] mx-auto overflow-x-hidden'>
<div className='max-w-[1300px] mx-auto'>
<Outlet />
</div>
{
Expand Down
15 changes: 11 additions & 4 deletions cms/src/views/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ import { HTMLAdd } from '../bits/HTMLAdd';

const useStyle = createUseStyles({
editorCSS: {
borderLeft: "1px solid var(--grey-25)",
borderRight: "1px solid var(--grey-25)",
borderTop: "2px solid var(--grey-100)",
borderBottom: "2px solid var(--grey-100)",

"&>.mdxeditor-toolbar": {
maxWidth: "800px",
marginLeft: "auto",
Expand All @@ -37,12 +42,14 @@ const useStyle = createUseStyles({
},

"&::before": {
borderBottom: "2px solid var(--grey-100)",
content: "''",
position: "absolute",
width: "1vw",
height: "1%",
width: "100vw",
maxWidth: "1300px",
height: "100%",
transformOrigin: "0 0",
transform: "scale(100, 100) translateX(-50%)",
transform: "translateX(-50%)",
backgroundColor: "inherit",
top: 0,
left: "50%",
Expand Down Expand Up @@ -219,7 +226,7 @@ const Post = ({ blank = false }: { blank?: boolean }) => {
</div>
<div ref={editorWrapper}>
<MDXEditor
className={`${editorCSS} grow border-solid border-0 border-t-2 border-b-2 border-grey-100 bg-white text-[22px] leading-[135%] px-5`}
className={`${editorCSS} grow bg-white text-[22px] leading-[135%] px-5`}
contentEditableClassName='min-h-[450px] max-w-[800px] mx-auto'
markdown={post?.content as string || ""}
ref={editor}
Expand Down

0 comments on commit fc827fe

Please sign in to comment.