Skip to content

Commit

Permalink
Darkmode fix (#849)
Browse files Browse the repository at this point in the history
* postview darkmode fix

* postview darkmode fix

* postview no-img darkmode fix

* darkmode fix in createpost

* merge fix

* comment readmore

* formatting

* post bg color

* comment input col

* row toggle col

* hehehehe

---------

Co-authored-by: narayan soni <narayansoni854@gmail.com>
  • Loading branch information
anamika7153 and narayan954 committed Jul 18, 2023
1 parent 4c5c7fe commit 46b962f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
4 changes: 3 additions & 1 deletion src/components/ImgUpload/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export default function ImgUpload(props) {
</>
)}
</div>
<TextField
<TextField className="create-post-input"
onChange={(e) => setCaption(e.target.value)}
value={caption}
variant="filled"
Expand All @@ -305,8 +305,10 @@ export default function ImgUpload(props) {
},
"& .MuiFilledInput-root": {
background: "transparent",
color: "var(--color)"
},
}}
style={{color: "var(--color) !important"}}
/>
<button
onClick={handleUpload}
Expand Down
10 changes: 6 additions & 4 deletions src/components/Post/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
transition: all;
transition-duration: 200ms;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
box-shadow:
rgba(86, 238, 218, 0.8) 0px 3px 6px,
box-shadow: rgba(86, 238, 218, 0.8) 0px 3px 6px,
rgba(108, 190, 186, 0.8) 0px 3px 6px;
}

Expand Down Expand Up @@ -82,7 +81,7 @@
padding: 8px;
font-weight: 400;
font-size: 15px;
color: var(--text-secondary);
color: var(--text-black-only);
white-space: pre-line;
}

Expand Down Expand Up @@ -142,6 +141,9 @@
background: lightgray;
border-radius: 10px;
}
.commentCard .comment span {
color: var(--text-black-only) !important;
}

.comment-box-title-style {
display: inline-block;
Expand Down Expand Up @@ -200,7 +202,7 @@
}

.comment-input {
background-color: var(--bg-color) !important;
background-color: var(--dark-post-bg) !important;
color: var(--color);
border-radius: 22px;
margin-top: 4px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/postView/PostDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const PostDetails = ({
{tempLikeCount.indexOf(user?.uid) !== -1 ? (
<FavoriteOutlined sx={{ color: "red" }} />
) : (
<FavoriteBorderOutlined />
<FavoriteBorderOutlined style={{ color: "var(--post-nav-icons)" }} />
)}
</IconButton>
<Typography fontSize={14}>
Expand All @@ -58,7 +58,7 @@ const PostDetails = ({
}}
>
<IconButton>
<ShareOutlined color={"#FFF"} />
<ShareOutlined style={{ color: "var(--post-nav-icons)" }} />
</IconButton>
<Typography fontSize={14}>Share</Typography>
</Flexbetween>
Expand Down
23 changes: 22 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
--page-over-color: #5ec3fd;
--slide-color: #9be5ea;
--label-color: rgb(200, 246, 248);
--text-light: rgba(0, 0, 0, 0.6);
--post-error-boundary: rgba(0, 0, 0, 0.54);
--text-black-only: black;
--dark-post-bg: rgb(255, 255, 255);;
}

.darkmode {
Expand All @@ -42,6 +46,11 @@
--page-over-color: #3a3e44;
--slide-color: #524a54;
--label-color: #6a656b;
--text-black-only: black;
--text-light: rgba(255, 255, 255, 0.6);
--post-error-boundary: rgba(255, 255, 255, 0.54);
--darkmode-white: white;
--dark-post-bg: #2a323c;
}

* {
Expand Down Expand Up @@ -117,7 +126,7 @@ input:focus {
}

.rowConvert {
color: var(--btn-color);
color: var(--text-secondary);
display: flex;
margin-right: 12px;
transition: all;
Expand Down Expand Up @@ -511,6 +520,15 @@ input {
background: var(--btn-color-hover);
}

.no-comments,
.light-text,
.post-page-caption span {
color: var(--text-light);
}
.create-post-input label {
color: var(--darkmode-white);
}

/* end */

/* login sign up forms */
Expand Down Expand Up @@ -589,3 +607,6 @@ input {
padding: 0;
}
}

.post,
.postColumn{background-color: var(--dark-post-bg);}
1 change: 1 addition & 0 deletions src/reusableComponents/ErrorBoundary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const ErrorFallBack = ({ error, info, resetErrorBoundary, inApp }) => {
className={"error-boundary-button"}
onClick={resetErrorBoundary}
aria-label={"Refresh"}
style={{ color: "var(--post-error-boundary)" }}
>
<AutorenewIcon />
</IconButton>
Expand Down
3 changes: 1 addition & 2 deletions src/reusableComponents/Logo/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
}

.sparkle-icon {
color: #ea18cb;
color: #0cc;
background: none;
text-shadow: none;
text-shadow: var(--logo-text-shadow);
filter: drop-shadow(1px 1px 2px #59afc7);
}

0 comments on commit 46b962f

Please sign in to comment.