diff --git a/app/javascript/components/Board/NewPost.tsx b/app/javascript/components/Board/NewPost.tsx index 744a2638..b8743c69 100644 --- a/app/javascript/components/Board/NewPost.tsx +++ b/app/javascript/components/Board/NewPost.tsx @@ -156,7 +156,7 @@ class NewPost extends React.Component { { showForm ? 'Cancel' : 'Submit feedback' } : - + Log in / Sign up } diff --git a/app/javascript/components/Comments/Comment.tsx b/app/javascript/components/Comments/Comment.tsx index ca44fe91..3dfc7cc7 100644 --- a/app/javascript/components/Comments/Comment.tsx +++ b/app/javascript/components/Comments/Comment.tsx @@ -68,10 +68,11 @@ const Comment = ({ { 'Post update: ' + (isPostUpdate ? 'yes' : 'no') } - Edit + Edit Delete diff --git a/app/javascript/stylesheets/components/Board.scss b/app/javascript/stylesheets/components/Board.scss index 10659509..22eab0b7 100644 --- a/app/javascript/stylesheets/components/Board.scss +++ b/app/javascript/stylesheets/components/Board.scss @@ -118,4 +118,11 @@ @extend .mr-2; } } +} + +@media (prefers-color-scheme: dark) { + .postTitle { + color: white; + } + } \ No newline at end of file diff --git a/app/javascript/stylesheets/components/Comments.scss b/app/javascript/stylesheets/components/Comments.scss index bafc52d6..15c29eaa 100644 --- a/app/javascript/stylesheets/components/Comments.scss +++ b/app/javascript/stylesheets/components/Comments.scss @@ -84,4 +84,11 @@ } } } +} + +@media (prefers-color-scheme: dark) { + .commentList .comment .commentFooter .commentLink { + color: white; + } + } \ No newline at end of file diff --git a/app/javascript/stylesheets/components/LikeButton.scss b/app/javascript/stylesheets/components/LikeButton.scss index c60b271d..c7b4b46c 100644 --- a/app/javascript/stylesheets/components/LikeButton.scss +++ b/app/javascript/stylesheets/components/LikeButton.scss @@ -28,4 +28,24 @@ text-align: center; font-size: 17px; } +} + +@media (prefers-color-scheme: dark) { + .likeButtonContainer { + .likeButton { + border-bottom-color: white; + + &:hover { + border-bottom-color: black; + } + } + + .likeButton.liked { + border-bottom-color: black; + } + + .likesCountLabel { + color: white; + } + } } \ No newline at end of file diff --git a/app/javascript/stylesheets/components/Post.scss b/app/javascript/stylesheets/components/Post.scss index fd09f565..e1b4d59b 100644 --- a/app/javascript/stylesheets/components/Post.scss +++ b/app/javascript/stylesheets/components/Post.scss @@ -118,4 +118,26 @@ color: $astuto-black; } } +} + +@media (prefers-color-scheme: dark) { + + .postDescription { + color: white !important; + } + + .badgeLight { + color: white; + } + + .postAndCommentsContainer .postSettings .selectPicker { + background-color: #282828 !important; + color: white !important; + } + + .postAndCommentsContainer .postHeader a { + color: white; + } + + } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_components.scss b/app/javascript/stylesheets/general/_components.scss index c1194aae..1c85633e 100644 --- a/app/javascript/stylesheets/general/_components.scss +++ b/app/javascript/stylesheets/general/_components.scss @@ -71,4 +71,22 @@ a { @extend .badge-light; background-color: $astuto-grey; +} + +@media (prefers-color-scheme: dark) { + .card { + color: white; + background-color: $astuto-black; + } + + .alert-primary { + background-color: #00bc8c; + border-color: #fff; + } + + .alert-danger { + background-color: #E74C3C; + border-color: #fff; + } + } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_form.scss b/app/javascript/stylesheets/general/_form.scss index 075f5b53..ac6168c1 100644 --- a/app/javascript/stylesheets/general/_form.scss +++ b/app/javascript/stylesheets/general/_form.scss @@ -34,4 +34,23 @@ margin-top: 24px; a { color: $astuto-black; } +} + +@media (prefers-color-scheme: dark) { + .deviseLinks { + a { color: white; } + } + + .form-control, .form-control:focus { + color: white; + background-color: $astuto-grey; + } + + .form-control { + border-color: grey; + } + + .form-control:focus { + border-color: white; + } } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_header.scss b/app/javascript/stylesheets/general/_header.scss index ee6bf41c..fb864230 100644 --- a/app/javascript/stylesheets/general/_header.scss +++ b/app/javascript/stylesheets/general/_header.scss @@ -64,3 +64,73 @@ background-color: $astuto-black; } } + +@media (prefers-color-scheme: dark) { + .navbar { + background-color: $astuto-black; + + .fullname { + color: $navbar-dark-brand-color; + } + + .navbar-brand { + color: $navbar-dark-brand-color; + + @include hover-focus { + color: $navbar-dark-brand-hover-color; + } + } + + .dropdown-menu { + background-color: #363636; + } + + .dropdown-item { + color: white; + &:hover { + background-color: black; + } + } + + .navbar-nav { + .nav-link { + color: $navbar-dark-color; + + @include hover-focus { + color: $navbar-dark-hover-color; + } + + &.disabled { + color: $navbar-dark-disabled-color; + } + } + + .show > .nav-link, + .active > .nav-link, + .nav-link.show, + .nav-link.active { + color: $navbar-dark-active-color; + } + } + + .navbar-toggler { + color: $navbar-dark-color; + border-color: $navbar-dark-toggler-border-color; + } + + .navbar-toggler-icon { + background-image: $navbar-dark-toggler-icon-bg; + } + + .navbar-text { + color: $navbar-dark-color; + a { + color: $navbar-dark-active-color; + + @include hover-focus { + color: $navbar-dark-active-color; + } + } + } + } +} diff --git a/app/javascript/stylesheets/general/_index.scss b/app/javascript/stylesheets/general/_index.scss index 57ea335a..421ce607 100644 --- a/app/javascript/stylesheets/general/_index.scss +++ b/app/javascript/stylesheets/general/_index.scss @@ -28,4 +28,30 @@ .loginInfo { text-decoration: underline; +} + +.btn { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} + +@media (prefers-color-scheme: dark) { + html, body { + background-color: #242424; + } + + .container, h2 { + color: white; + } + + .loginInfo { + color: white; + } + + .btn { + color: #212529; + background-color: #f8f9fa; + border-color: #f8f9fa; + } } \ No newline at end of file diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 0a209990..8678fd23 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -9,7 +9,7 @@
- <%= f.submit "Resend confirmation instructions", class: "btn btn-dark btn-block" %> + <%= f.submit "Resend confirmation instructions", class: "btn btn-block" %>
<% end %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 2b8e8ba6..c4793312 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -9,7 +9,7 @@
- <%= f.submit "Send me reset password instructions", class: "btn btn-dark btn-block" %> + <%= f.submit "Send me reset password instructions", class: "btn btn-block" %>
<% end %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index b925b846..862eb5b1 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -47,7 +47,7 @@
- <%= f.submit "Update profile", class: "btn btn-dark btn-block" %> + <%= f.submit "Update profile", class: "btn btn-block" %>
<% end %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index ba099dd7..b7e0b4ca 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -24,7 +24,7 @@
- <%= f.submit "Sign up", class: "btn btn-dark btn-block" %> + <%= f.submit "Sign up", class: "btn btn-block" %>
<% end %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index ed241070..08a26bf1 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -19,7 +19,7 @@ <% end %>
- <%= f.submit "Log in", class: "btn btn-dark btn-block" %> + <%= f.submit "Log in", class: "btn btn-block" %>
<% end %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 1ac2366d..270a20a3 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,4 +1,4 @@ -