From 88594840b65e638c10fd380df5e87c0ca7d0e447 Mon Sep 17 00:00:00 2001 From: Mikayla Dobson Date: Sun, 6 Feb 2022 12:48:52 -0600 Subject: [PATCH] color scheme and visual style improved --- src/App.css | 10 +++++---- src/features/discussion/Discussion.js | 19 +++++++++------- src/features/posts/Feed.js | 2 ++ src/features/posts/Post.css | 21 ++++++++++++++++++ src/features/posts/Post.js | 31 +++++++++++++++++++-------- 5 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/App.css b/src/App.css index a791397..795b920 100644 --- a/src/App.css +++ b/src/App.css @@ -23,11 +23,13 @@ align-items: center; margin: 0; padding: 0; + overflow-y: hidden; } .loading-message { - color:rgb(111, 30, 151); + color:white; font-family: 'Indie Flower', sans-serif; + font-size: 2.5rem; height: 100vh; } @@ -138,6 +140,8 @@ width: 90vw; } +/* Page handling */ + .page-handling { display: inline-flex; flex-direction: row; @@ -175,9 +179,7 @@ } #bottom-page-handling { - margin-top: 5rem; - position: relative; - bottom: 6rem; + margin-bottom: 10rem; } /* Media queries (tablet) */ diff --git a/src/features/discussion/Discussion.js b/src/features/discussion/Discussion.js index b2dc6e2..89502c2 100644 --- a/src/features/discussion/Discussion.js +++ b/src/features/discussion/Discussion.js @@ -55,13 +55,14 @@ export default function Discussion({permalink, isVisible}) { console.log(comment.data.replies.data.children[0].data.author) return ( - <> -

THIS IS A REPLY:

-

Nested {comment.data.replies.data.children[0].data.depth} layers deep

-

{comment.data.replies.data.children[0].data.is_submitter ? 'OP posted' : ''}

-

u/{comment.data.replies.data.children[0].data.author}

-

{comment.data.replies.data.children[0].data.body}

- +
+

+ u/{comment.data.replies.data.children[0].data.author} + {comment.data.replies.data.children[0].data.is_submitter ? ' (OP)' : ''} + {comment.data.replies.data.children ? ' replied:' : ''} +

+

{comment.data.replies.data.children[0].data.body}

+
) } else { return; @@ -72,11 +73,13 @@ export default function Discussion({permalink, isVisible}) { setThread(comments.map((comment) => { return ( + <>

u/{comment.data.author}

{comment.data.body}

- {getReplies(comment)}
+ {getReplies(comment)} + ) })) } diff --git a/src/features/posts/Feed.js b/src/features/posts/Feed.js index 951823b..1852296 100644 --- a/src/features/posts/Feed.js +++ b/src/features/posts/Feed.js @@ -82,6 +82,8 @@ export default function Feed() { let sortedPosts = extractedPosts.sort(comparePosts); // implements sorting function + console.log(sortedPosts); + let newFeed = sortedPosts.map((post) => { return ( - -

Crosspost from {data.crosspost_parent_list[0].subreddit_name_prefixed}

+ +

Crosspost from {data.crosspost_parent_list[0].subreddit_name_prefixed}

); + } else if (data.crosspost_parent_list[0].url && !data.url) { + return ( + <> + {title} +

Crosspost from {data.crosspost_parent_list[0].subreddit_name_prefixed}

+ + ) } else { return; } @@ -90,18 +101,20 @@ export default function Post({data, key}) { {media ? {title} : ''} {data.crosspost_parent_list ? handleCrosspost() : ''} - {data.crosspost_parent_list ? - (data.crosspost_parent_list[0].is_video ? - - : null) - : null} {data.gallery_data ?

View the gallery of photos corresponding to this post here.

: null} {video ? - + : ''} {body ?