-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/configurable page heights #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cdec3e4
78ea8cd
65c7772
7dcb1c1
c963c21
69024da
cac622a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,5 +31,8 @@ venv.bak/ | |
| # Javascript stuff | ||
| node_modules/ | ||
|
|
||
| # Build outputs | ||
| dist-gdocs/ | ||
|
|
||
| # Data | ||
| *.db | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,28 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1.0" | ||
| /> | ||
| <title>Editor</title> | ||
| <style> | ||
| body, html { | ||
| font-family: Arial, sans-serif; | ||
| margin: 0; | ||
| padding: 0; | ||
| height: 100%; | ||
| overflow: hidden; | ||
| } | ||
| #container { | ||
| height: 100%; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div id="container"></div> | ||
| </body> | ||
| </html> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Editor</title> | ||
| <style> | ||
| body, | ||
| html { | ||
| font-family: Arial, sans-serif; | ||
| margin: 0; | ||
| padding: 0; | ||
| min-height: 100vh; | ||
| overflow: auto; | ||
| } | ||
|
|
||
| #container { | ||
| min-height: 100vh; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div id="container"></div> | ||
| </body> | ||
|
|
||
| </html> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,11 +22,13 @@ export function EditorScreen({ | |||||
| editorPreamble, | ||||||
| contextData, | ||||||
| falseContextData, | ||||||
| doneButton, | ||||||
| }: { | ||||||
| taskID?: string; | ||||||
| editorPreamble?: JSX.Element; | ||||||
| contextData?: ContextSection[]; | ||||||
| falseContextData?: ContextSection[]; | ||||||
| doneButton?: JSX.Element; | ||||||
| }) { | ||||||
| const mode = useAtomValue(overallModeAtom); | ||||||
| const username = useAtomValue(usernameAtom); | ||||||
|
|
@@ -158,12 +160,19 @@ export function EditorScreen({ | |||||
| ) : null} | ||||||
| </div> | ||||||
|
|
||||||
| <div | ||||||
| className={isDemo ? classes.demosidebar : classes.sidebar} | ||||||
| > | ||||||
| <EditorContext.Provider value={editorAPI}> | ||||||
| <Sidebar /> | ||||||
| </EditorContext.Provider> | ||||||
| <div className={`flex flex-col overflow-hidden ${isDemo ? 'w-[28rem] min-w-[28rem] flex-shrink-0 mx-5' : 'flex-[0_1_28rem] min-w-[14rem]'}`}> | ||||||
| <div | ||||||
| className={isDemo ? classes.demosidebar : classes.sidebar} | ||||||
|
||||||
| className={isDemo ? classes.demosidebar : classes.sidebar} | |
| className={`flex-1 overflow-y-auto min-h-0 ${isDemo ? classes.demosidebar : classes.sidebar}`} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,20 +4,24 @@ | |
| font-family: 'Segoe UI', sans-serif, Arial, Helvetica; | ||
| display: flex; | ||
| flex-direction: row; | ||
| height: 100vh; | ||
| overflow: hidden; | ||
|
Comment on lines
+7
to
+8
|
||
| } | ||
|
|
||
| .editor { | ||
| flex: 1; | ||
| min-width: 15rem; | ||
| max-width: 60rem; | ||
| overflow-y: auto; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| /* Sidebar for editor and study page */ | ||
| .sidebar { | ||
| flex: 0 1 28rem; | ||
| min-width: 14rem; | ||
| flex: 1; | ||
| margin: 20px 0px 20px 0px; | ||
| height: 80vh; | ||
| min-height: 0; | ||
|
Comment on lines
+22
to
+24
|
||
| box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3); | ||
| font-family: 'Segoe UI', sans-serif, Arial, Helvetica; | ||
| right: 0; | ||
|
|
@@ -39,21 +43,24 @@ | |
| display: flex; | ||
| justify-content: center; | ||
| font-family: 'Segoe UI', sans-serif, Arial, Helvetica; | ||
| height: 100vh; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .demoeditor { | ||
| min-width: 40rem; | ||
| max-width: 40rem; | ||
| width: 100%; | ||
| position: relative; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| /* Sidebar for demo page */ | ||
| .demosidebar { | ||
| margin: 20px; | ||
| height: 80vh; | ||
| width: 28rem; | ||
| min-width: 28rem; | ||
| margin: 20px 0; | ||
| flex: 1; | ||
| min-height: 0; | ||
| box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); | ||
| font-family: 'Segoe UI', sans-serif, Arial, Helvetica; | ||
| background-color: white; | ||
|
|
@@ -132,14 +139,9 @@ | |
| background-color: #0078d4; | ||
| color: white; | ||
| border: none; | ||
| padding: 0.5rem 1rem; | ||
| padding: 0.75rem 2rem; | ||
| border-radius: 0.25rem; | ||
| cursor: pointer; | ||
| font-size: 1rem; | ||
| position: fixed; | ||
| bottom: 1rem; | ||
| right: 1rem; | ||
| z-index: 1000; | ||
| transform: translateX(-2rem); | ||
| /* border: #d32f2f 1px solid; */ | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inline
classNamestring mixes multiple layout responsibilities with a long conditional tailwind expression, making future tweaks error-prone. Consider extracting these computed class names into a small helper (e.g.,sidebarWrapperClass) or using a classnames utility so layout decisions are easier to read and maintain.