From 751f229665ac0311bae13dc77b7afba9a17369a5 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Fri, 3 Apr 2020 15:09:01 -0500 Subject: [PATCH] UX: removes color on categories if no style chosen (#9346) * UX: removes color on categories if no style chosen * Update app/assets/javascripts/discourse/templates/components/categories-only.hbs * Update messages.hbs Co-authored-by: Robin Ward --- .../javascripts/discourse/components/categories-only.js | 5 ++++- .../discourse/templates/components/categories-only.hbs | 2 +- app/assets/stylesheets/desktop/category-list.scss | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/categories-only.js b/app/assets/javascripts/discourse/components/categories-only.js index 89720fbbe80..d218d696438 100644 --- a/app/assets/javascripts/discourse/components/categories-only.js +++ b/app/assets/javascripts/discourse/components/categories-only.js @@ -1,4 +1,7 @@ import Component from "@ember/component"; +import { equal } from "@ember/object/computed"; + export default Component.extend({ - tagName: "" + tagName: "", + noCategoryStyle: equal("siteSettings.category_style", "none") }); diff --git a/app/assets/javascripts/discourse/templates/components/categories-only.hbs b/app/assets/javascripts/discourse/templates/components/categories-only.hbs index 24d02fea278..6c02050bbdb 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-only.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-only.hbs @@ -12,7 +12,7 @@ {{#each categories as |c|}} - + {{category-title-link category=c}} {{#unless c.isMuted}} {{#if c.description_excerpt}} diff --git a/app/assets/stylesheets/desktop/category-list.scss b/app/assets/stylesheets/desktop/category-list.scss index 50801d9d340..c5774106abc 100644 --- a/app/assets/stylesheets/desktop/category-list.scss +++ b/app/assets/stylesheets/desktop/category-list.scss @@ -94,6 +94,11 @@ tbody { .category { + &.no-category-style { + border-color: transparent; + border-left: 0px; + padding-left: 0px; + } border-left: 6px solid; h3, h4 {