mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Remove category id from category class name (#10712)
The generated class name included ID (parent_slug-child_slug-child_id), but the client side did not expect it (parent_slug-child_slug).
This commit is contained in:
@@ -257,7 +257,8 @@ module Stylesheet
|
||||
end
|
||||
|
||||
def category_css(category)
|
||||
"body.category-#{category.slug}, body.category-#{category.full_slug} { background-image: url(#{upload_cdn_path(category.uploaded_background.url)}) }\n"
|
||||
full_slug = category.full_slug.split("-")[0..-2].join("-")
|
||||
"body.category-#{category.slug}, body.category-#{full_slug} { background-image: url(#{upload_cdn_path(category.uploaded_background.url)}) }\n"
|
||||
end
|
||||
|
||||
def font_css(font)
|
||||
|
||||
Reference in New Issue
Block a user