mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
UX: make 404 page look better on dark theme
This commit is contained in:
parent
dd665c62f2
commit
7e9b2289bd
|
@ -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 << "<span style='color: #{text_color};#{extra_span_classes}' data-drop-close='true' class='#{class_names}'
|
||||
result << "<span style='#{extra_span_classes}' data-drop-close='true' class='#{class_names}'
|
||||
#{description}>"
|
||||
|
||||
result << category.name.html_safe << '</span>'
|
||||
|
|
Loading…
Reference in New Issue
Block a user