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:
Bianca Nenciu
2020-09-23 19:22:07 +03:00
committed by GitHub
parent 9f73e8779d
commit 214b4c3910
2 changed files with 7 additions and 5 deletions

View File

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