Skip to content

Commit 2f6264d

Browse files
authored
Merge pull request #5 from ashishjha-96/mobile-friendly
CSS Update
2 parents 43b9233 + 9535b7e commit 2f6264d

8 files changed

Lines changed: 292 additions & 27 deletions

File tree

frontend/src/components/Editor.tsx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ export function Editor({ docId }: EditorProps) {
392392
>
393393
{/* Header */}
394394
<div
395+
className="mobile-header"
395396
style={{
396397
backgroundColor: "var(--header-bg)",
397398
borderBottom: "1px solid var(--header-border)",
@@ -400,16 +401,20 @@ export function Editor({ docId }: EditorProps) {
400401
}}
401402
>
402403
<div
404+
className="mobile-header-content"
403405
style={{
404406
maxWidth: "1200px",
405407
margin: "0 auto",
406408
display: "flex",
407409
justifyContent: "space-between",
408410
alignItems: "center",
411+
flexWrap: "wrap",
412+
gap: "12px",
409413
}}
410414
>
411415
<div>
412416
<h1
417+
className="mobile-logo"
413418
style={{
414419
display: "flex",
415420
alignItems: "center",
@@ -419,9 +424,9 @@ export function Editor({ docId }: EditorProps) {
419424
color: "var(--page-text)",
420425
}}
421426
>
422-
<span style={{ fontWeight: 800, fontSize:"28px", color: "#646cff"}}>[</span>
427+
<span className="mobile-logo-bracket" style={{ fontWeight: 800, fontSize:"28px", color: "#646cff"}}>[</span>
423428
<span>MarkDoc </span>
424-
<span style={{ fontWeight: 800, fontSize:"28px", color: "#646cff"}}>]</span>
429+
<span className="mobile-logo-bracket" style={{ fontWeight: 800, fontSize:"28px", color: "#646cff"}}>]</span>
425430
</h1>
426431
<p
427432
style={{
@@ -430,21 +435,23 @@ export function Editor({ docId }: EditorProps) {
430435
fontSize: "13px"
431436
}}
432437
>
433-
Document:{" "}
434-
<code
435-
style={{
436-
background: mode === "dark" ? "#21262d" : "#f5f5f5",
437-
padding: "2px 6px",
438-
borderRadius: "3px",
439-
fontSize: "12px",
440-
color: mode === "dark" ? "#e6edf3" : "#24292f",
441-
}}
442-
>
443-
{docId}
444-
</code>
438+
<span className="mobile-hide">
439+
Document:{" "}
440+
<code
441+
style={{
442+
background: mode === "dark" ? "#21262d" : "#f5f5f5",
443+
padding: "2px 6px",
444+
borderRadius: "3px",
445+
fontSize: "12px",
446+
color: mode === "dark" ? "#e6edf3" : "#24292f",
447+
}}
448+
>
449+
{docId}
450+
</code>
451+
{" · "}
452+
</span>
445453
{userInfo && (
446454
<>
447-
{" · "}
448455
Logged in as:{" "}
449456
<span style={{ fontWeight: 500 }}>{userInfo.name}</span>
450457
</>
@@ -453,6 +460,7 @@ export function Editor({ docId }: EditorProps) {
453460
</div>
454461

455462
<div
463+
className="mobile-header-actions"
456464
style={{
457465
display: "flex",
458466
alignItems: "center",
@@ -483,6 +491,7 @@ export function Editor({ docId }: EditorProps) {
483491

484492
{/* Editor Container */}
485493
<div
494+
className="mobile-editor-container editor-wrapper"
486495
style={{
487496
maxWidth: "1200px",
488497
margin: "0 auto",

frontend/src/components/ExportMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export function ExportMenu({ editor, docId, onNewDocument, yDoc }: ExportMenuPro
145145

146146
{/* Menu Content */}
147147
<div
148+
className="mobile-dropdown"
148149
style={{
149150
position: "absolute",
150151
top: "calc(100% + 8px)",

frontend/src/components/KeyboardShortcutsMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export function KeyboardShortcutsMenu() {
129129

130130
{/* Content - Compact Grid */}
131131
<div
132+
className="mobile-shortcuts-grid"
132133
style={{
133134
padding: "20px",
134135
display: "grid",

frontend/src/components/Landing.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export function Landing() {
4646
}}
4747
>
4848
<div
49+
className="mobile-modal"
4950
style={{
5051
backgroundColor: "white",
5152
borderRadius: "12px",

frontend/src/components/NamePrompt.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function NamePrompt({ onSubmit, docId }: NamePromptProps) {
3535
}}
3636
>
3737
<div
38+
className="mobile-modal"
3839
style={{
3940
backgroundColor: "white",
4041
borderRadius: "12px",

frontend/src/components/SearchBar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ export function SearchBar({ editor }: SearchBarProps) {
224224
<>
225225
{/* Main search bar */}
226226
<div
227+
className="mobile-search-bar"
227228
style={{
228229
position: "fixed",
229230
top: "80px",
@@ -234,7 +235,7 @@ export function SearchBar({ editor }: SearchBarProps) {
234235
border: `2px solid ${mode === "dark" ? "#30363d" : "#e0e0e0"}`,
235236
borderRadius: "8px",
236237
boxShadow: "0 8px 24px rgba(0, 0, 0, 0.2)",
237-
minWidth: "500px",
238+
width: "90%",
238239
maxWidth: "700px",
239240
animation: "slideDown 0.2s ease-out",
240241
}}
@@ -347,6 +348,7 @@ export function SearchBar({ editor }: SearchBarProps) {
347348
{/* Results list */}
348349
{results.length > 0 && searchQuery && (
349350
<div
351+
className="mobile-search-results"
350352
style={{
351353
maxHeight: "400px",
352354
overflowY: "auto",

frontend/src/components/UserPresence.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function UserPresence({ channel }: UserPresenceProps) {
5050
{overflowCount > 0 && (
5151
<div style={{ position: "relative", marginLeft: "4px" }}>
5252
<div
53+
className="mobile-avatar-overflow"
5354
onClick={() => setShowOverflow(!showOverflow)}
5455
style={{
5556
width: "36px",
@@ -206,6 +207,7 @@ function UserAvatar({
206207
}}
207208
>
208209
<div
210+
className="mobile-avatar"
209211
style={{
210212
width: "36px",
211213
height: "36px",

0 commit comments

Comments
 (0)