mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Change category badge style to use stripes
This commit is contained in:
@@ -71,15 +71,8 @@ module UserNotificationsHelper
|
||||
|
||||
category_url = "#{Discourse.base_url}#{category.url}"
|
||||
|
||||
if opts[:only_stripe]
|
||||
result << "<a href='#{category_url}' style='background-color: ##{category.color}; font-size: 12px; padding: 2px 1px; font-weight: bold; margin: 0; width: 2px; white-space:nowrap;'> </a>"
|
||||
result << "<a href='#{category_url}' style='font-size: 12px; font-weight: bold; margin-left: 3px; color: #222;'>#{category.name}</a>"
|
||||
else
|
||||
if category.parent_category.present?
|
||||
result << "<a href='#{category_url}' style='background-color: ##{category.parent_category.color}; font-size: 12px; padding: 4px 2px; font-weight: bold; margin: 0; width: 2px; white-space:nowrap;'> </a>"
|
||||
end
|
||||
result << "<a href='#{category_url}' style='background-color: ##{category.color}; color: ##{category.text_color}; font-size: 12px; padding: 4px 6px; font-weight: bold; margin: 0; white-space:nowrap;'>#{category.name}</a>"
|
||||
end
|
||||
result << "<a href='#{category_url}' style='background-color: ##{category.color}; font-size: 12px; padding: 2px 1px; font-weight: bold; margin: 0; width: 2px; white-space:nowrap;'> </a>"
|
||||
result << "<a href='#{category_url}' style='font-size: 12px; font-weight: bold; margin-left: 3px; color: #222;'>#{category.name}</a>"
|
||||
|
||||
result.html_safe
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user