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}'" : ''
|
description = category.description_text ? "title='#{category.description_text.html_safe}'" : ''
|
||||||
category_url = opts[:absolute_url] ? "#{Discourse.base_url_no_prefix}#{category.url}" : category.url
|
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 =
|
extra_span_classes =
|
||||||
if opts[:inline_style]
|
if opts[:inline_style]
|
||||||
case (SiteSetting.category_style || :box).to_sym
|
case (SiteSetting.category_style || :box).to_sym
|
||||||
when :bar
|
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
|
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
|
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;'
|
end + 'max-width: 150px; overflow: hidden; text-overflow: ellipsis;'
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
end
|
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}>"
|
#{description}>"
|
||||||
|
|
||||||
result << category.name.html_safe << '</span>'
|
result << category.name.html_safe << '</span>'
|
||||||
|
|
Loading…
Reference in New Issue