diff --git a/static/src/scss/_homepage.scss b/static/src/scss/_homepage.scss index 6d71195..1236cb1 100644 --- a/static/src/scss/_homepage.scss +++ b/static/src/scss/_homepage.scss @@ -1,4 +1,4 @@ -body.page-home-homepage { +body.page-homepage { main { background-repeat: no-repeat; background-size: cover; diff --git a/website/common/models.py b/website/common/models.py index 169e295..09a444e 100644 --- a/website/common/models.py +++ b/website/common/models.py @@ -4,6 +4,7 @@ from typing import Any, Optional from django.db import models from django.http.request import HttpRequest from django.utils.functional import cached_property, classproperty +from django.utils.text import slugify from wagtail.admin.panels import FieldPanel from wagtail.fields import StreamField from wagtail.images import get_image_model_string @@ -26,7 +27,7 @@ class BasePage(Page): @classproperty def body_class(cls) -> str: - return "page-" + cls._meta.db_table.replace("_", "-") + return "page-" + slugify(cls.__name__) def get_parent_pages(self) -> PageQuerySet: """