From fa1ad02690f26b92817812b56712f109a4e7d250 Mon Sep 17 00:00:00 2001 From: William Tran Date: Mon, 24 May 2021 20:52:25 -0400 Subject: [PATCH] Start mobile changes --- components/OrganizedContent.module.css | 2 +- components/OrganizedContent.tsx | 77 +++++++++++++++++++++++++- pages/playground.mdx | 2 +- 3 files changed, 77 insertions(+), 4 deletions(-) diff --git a/components/OrganizedContent.module.css b/components/OrganizedContent.module.css index 8a1c772f..f0839419 100644 --- a/components/OrganizedContent.module.css +++ b/components/OrganizedContent.module.css @@ -45,7 +45,7 @@ .selectedMarker { background-color: var(--blue-2); - width: 0.22rem; + width: calc(4rem / 16); margin-right: 0.5rem; } diff --git a/components/OrganizedContent.tsx b/components/OrganizedContent.tsx index af22a0cb..f83f55fa 100644 --- a/components/OrganizedContent.tsx +++ b/components/OrganizedContent.tsx @@ -37,7 +37,7 @@ export const OrganizedContent: React.FC = ({ ? headings[currentIndex + 1] : undefined; - const isMobile = true; + const isMobile = false; if (!isMobile) { return ( @@ -146,6 +146,79 @@ export const OrganizedContent: React.FC = ({ ); } else { - return
Test
; + return ( +
+ {!isReadAll ? ( +

+ {headings[currentIndex].name} +

+ ) : ( +
+ {headings + .filter( + (heading: { name: string }) => heading.name !== "Read All" + ) + .map((heading) => ( +
+

{heading.name}

+ {heading.content} +
+ ))} +
+ )} + {children} +
+ {prevHeading && ( +
+ +
+ + + +
+
Previous
+
+ {prevHeading.name} +
+
+
+ +
+ )} +
+ {nextHeading && ( +
+ +
+
+
+ Next +
+
+ {nextHeading.name} +
+
+ + + +
+ +
+ )} +
+
+ ); } }; diff --git a/pages/playground.mdx b/pages/playground.mdx index ef893953..603f70f0 100644 --- a/pages/playground.mdx +++ b/pages/playground.mdx @@ -67,6 +67,6 @@ display information about the execs: prez, VP, trez, AVP, and syscom overlord. ## `` -Works without JS! +Codey is supposed to say something here...