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:
Roman Rizzi
2020-11-25 15:40:16 -03:00
committed by GitHub
parent 059e9cb1d2
commit c9df679ba1
2 changed files with 3 additions and 3 deletions

View File

@ -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)