mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Apply the category class on initial page load
This commit is contained in:
@@ -59,6 +59,12 @@ module ApplicationHelper
|
||||
"#{mobile_view? ? 'mobile-view' : 'desktop-view'} #{mobile_device? ? 'mobile-device' : 'not-mobile-device'} #{rtl_class} #{current_user ? '' : 'anon'}"
|
||||
end
|
||||
|
||||
def body_classes
|
||||
if @category && @category.url.present?
|
||||
"category-#{@category.url.sub(/^\/c\//, '').gsub(/\//, '-')}"
|
||||
end
|
||||
end
|
||||
|
||||
def rtl_class
|
||||
rtl? ? 'rtl' : ''
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user