From 7e9b2289bd9737e3672c111c0c137a70c0669c7c Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 15 Aug 2017 12:15:56 +0530 Subject: [PATCH] UX: make 404 page look better on dark theme --- lib/category_badge.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/category_badge.rb b/lib/category_badge.rb index 2d50963e9ae..4f172aa762e 100644 --- a/lib/category_badge.rb +++ b/lib/category_badge.rb @@ -77,27 +77,20 @@ module CategoryBadge description = category.description_text ? "title='#{category.description_text.html_safe}'" : '' category_url = opts[:absolute_url] ? "#{Discourse.base_url_no_prefix}#{category.url}" : category.url - text_color = - if (SiteSetting.category_style || :box).to_sym == :box - "##{category.text_color}" - else - "#222222" - end - extra_span_classes = if opts[:inline_style] case (SiteSetting.category_style || :box).to_sym when :bar - 'padding: 3px; vertical-align: text-top; margin-top: -3px; display: inline-block;' + 'color: #222222; padding: 3px; vertical-align: text-top; margin-top: -3px; display: inline-block;' when :box - "#{show_parent ? 'margin-left: 5px; ' : ''} position: relative; padding: 0 5px; margin-top: 2px;" + "color: #{category.text_color}; #{show_parent ? 'margin-left: 5px; ' : ''} position: relative; padding: 0 5px; margin-top: 2px;" when :bullet - 'vertical-align: text-top; line-height: 1; margin-left: 4px; padding-left: 2px; display: inline;' + 'color: #222222; vertical-align: text-top; line-height: 1; margin-left: 4px; padding-left: 2px; display: inline;' end + 'max-width: 150px; overflow: hidden; text-overflow: ellipsis;' else '' end - result << "" result << category.name.html_safe << ''