mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:14:58 +08:00
FIX: Only use full slugs when compiling category backgrounds. (#11353)
If a category and a sub-category have the same slug, adding a background to one of them will also show it on the other one. This was introduced in 8e3f667 to fix a discrepancy, which was later fixed in 214b4c3.
This commit is contained in:
@ -287,7 +287,7 @@ module Stylesheet
|
||||
|
||||
def category_css(category)
|
||||
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"
|
||||
"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