From e1d8dbc28177ca810d917a5e9d31bdd1a089525a Mon Sep 17 00:00:00 2001 From: riggraz Date: Fri, 27 Sep 2019 11:40:33 +0200 Subject: [PATCH] Improve style consistency --- app/controllers/posts_controller.rb | 1 + .../stylesheets/components/Board.scss | 2 +- .../stylesheets/components/Comments.scss | 2 +- .../stylesheets/components/Post.scss | 2 +- .../stylesheets/constants/_colors.scss | 1 + .../stylesheets/general/_components.scss | 4 +- .../stylesheets/general/_custom_texts.scss | 2 +- app/javascript/stylesheets/general/_form.scss | 2 +- .../stylesheets/general/_header.scss | 6 ++- .../stylesheets/general/_icons.scss | 47 ------------------- .../stylesheets/general/_index.scss | 5 ++ app/javascript/stylesheets/main.scss | 1 - 12 files changed, 19 insertions(+), 56 deletions(-) delete mode 100644 app/javascript/stylesheets/general/_icons.scss diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 621b874c..b67d7388 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -29,6 +29,7 @@ class PostsController < ApplicationController def show @post = Post.find(params[:id]) @post_statuses = PostStatus.select(:id, :name, :color).order(order: :asc) + @board = @post.board respond_to do |format| format.html diff --git a/app/javascript/stylesheets/components/Board.scss b/app/javascript/stylesheets/components/Board.scss index 720c5826..81e69c06 100644 --- a/app/javascript/stylesheets/components/Board.scss +++ b/app/javascript/stylesheets/components/Board.scss @@ -77,7 +77,7 @@ @extend .my-3; display: block; - color: black; + color: $astuto-black; &:hover { text-decoration: none; } } diff --git a/app/javascript/stylesheets/components/Comments.scss b/app/javascript/stylesheets/components/Comments.scss index c3bf8e4b..8a7807fe 100644 --- a/app/javascript/stylesheets/components/Comments.scss +++ b/app/javascript/stylesheets/components/Comments.scss @@ -55,7 +55,7 @@ font-size: 14px; .commentReplyButton { - color: #333; + color: $astuto-black; &:hover { text-decoration: underline; diff --git a/app/javascript/stylesheets/components/Post.scss b/app/javascript/stylesheets/components/Post.scss index 24a9a977..aa8f3c2c 100644 --- a/app/javascript/stylesheets/components/Post.scss +++ b/app/javascript/stylesheets/components/Post.scss @@ -54,7 +54,7 @@ @extend .my-3; - color: #333; + color: $astuto-black; } } } \ No newline at end of file diff --git a/app/javascript/stylesheets/constants/_colors.scss b/app/javascript/stylesheets/constants/_colors.scss index 2893fabb..a40c59a7 100644 --- a/app/javascript/stylesheets/constants/_colors.scss +++ b/app/javascript/stylesheets/constants/_colors.scss @@ -1,2 +1,3 @@ +$astuto-black: #333; $astuto-grey: rgba(178, 178, 178, 0.15); $muted-text-color: #6c757d; \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_components.scss b/app/javascript/stylesheets/general/_components.scss index 478bb5b6..e67c9b50 100644 --- a/app/javascript/stylesheets/general/_components.scss +++ b/app/javascript/stylesheets/general/_components.scss @@ -1,5 +1,5 @@ a { - color: #333; + color: $astuto-black; &:hover { color: inherit; } } @@ -10,7 +10,7 @@ a { box-shadow: 0 1px 1px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.15); transition: all 0.3s cubic-bezier(.25,.8,.25,1); - color: #333; + color: $astuto-black; padding: 8px; } diff --git a/app/javascript/stylesheets/general/_custom_texts.scss b/app/javascript/stylesheets/general/_custom_texts.scss index 52016505..0c0c303a 100644 --- a/app/javascript/stylesheets/general/_custom_texts.scss +++ b/app/javascript/stylesheets/general/_custom_texts.scss @@ -22,7 +22,7 @@ @extend .text-secondary, .text-uppercase, - .font-weight-lighter; + .font-weight-light; font-size: 13px; } diff --git a/app/javascript/stylesheets/general/_form.scss b/app/javascript/stylesheets/general/_form.scss index 2abed6fc..075f5b53 100644 --- a/app/javascript/stylesheets/general/_form.scss +++ b/app/javascript/stylesheets/general/_form.scss @@ -33,5 +33,5 @@ margin-top: 24px; - a { color: #333; } + a { color: $astuto-black; } } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_header.scss b/app/javascript/stylesheets/general/_header.scss index d2fd8ff5..ee6bf41c 100644 --- a/app/javascript/stylesheets/general/_header.scss +++ b/app/javascript/stylesheets/general/_header.scss @@ -45,7 +45,7 @@ .fullname { vertical-align: middle; - color: black; + color: $astuto-black; } .dropdown-toggle::after { @@ -59,4 +59,8 @@ .navbar-toggler[aria-expanded="true"] { background-color: $astuto-grey; } + + .dropdown-item:active { + background-color: $astuto-black; + } } diff --git a/app/javascript/stylesheets/general/_icons.scss b/app/javascript/stylesheets/general/_icons.scss deleted file mode 100644 index 71f50adc..00000000 --- a/app/javascript/stylesheets/general/_icons.scss +++ /dev/null @@ -1,47 +0,0 @@ -/* General setup */ -span.icon { - margin: 4px; - background-color: white; - border: 2px solid black; - display: inline-block; - position: relative; - vertical-align: top; -} -span.icon:after, -span.icon:before { - background: white; - border: 2px solid black; - content: ''; - position: absolute; -} - -/* Comment icon */ -span.comment { - border-radius: 4px; - width: 22px; - height: 14px; -} -span.comment:after, -span.comment:before { - background: none; - border-bottom: 6px solid transparent; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid black; - bottom: -14px; - height: 0; - left: 4px; - width: 0; -} -span.comment:before { - border-top-color: white; - bottom: -11px; - z-index: 1; -} -span.comment:hover:after { - background: none; -} -span.comment:hover:before { - background: none; - border-top-color: #ffe; -} \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_index.scss b/app/javascript/stylesheets/general/_index.scss index fea8515e..c1ec7eb2 100644 --- a/app/javascript/stylesheets/general/_index.scss +++ b/app/javascript/stylesheets/general/_index.scss @@ -7,6 +7,11 @@ max-width: 920px; } +.turbolinks-progress-bar { + background-color: $astuto-black; + height: 2px; +} + .gravatar { border-radius: 16px; } diff --git a/app/javascript/stylesheets/main.scss b/app/javascript/stylesheets/main.scss index c6bfe320..7fc7fd5c 100644 --- a/app/javascript/stylesheets/main.scss +++ b/app/javascript/stylesheets/main.scss @@ -6,7 +6,6 @@ @import 'general/custom_texts'; @import 'general/form'; @import 'general/header'; -@import 'general/icons'; @import 'general/index'; /* Components */