Minor fixes

This commit is contained in:
Elia Bieri 2023-05-17 13:04:53 +02:00
parent e69004c1f2
commit 849e49c433
4 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
<div class="container-medium"> <div class="container-medium">
<div v-html="props.content.text"></div> <div class="default-wagtail-rich-text" v-html="props.content.text"></div>
</div> </div>
</template> </template>

View File

@ -32,6 +32,11 @@ body {
margin-left: 24px; margin-left: 24px;
} }
.default-wagtail-rich-text ol {
list-style-type: decimal;
margin-left: 24px;
}
svg { svg {
@apply fill-current; @apply fill-current;
} }
@ -98,8 +103,7 @@ textarea {
} }
.filter-blue-900 { .filter-blue-900 {
filter: invert(9%) sepia(38%) saturate(5684%) hue-rotate(200deg) brightness(95%) filter: invert(9%) sepia(38%) saturate(5684%) hue-rotate(200deg) brightness(95%) contrast(105%);
contrast(105%);
} }
} }

View File

@ -1,8 +1,4 @@
DEFAULT_RICH_TEXT_FEATURES = [ DEFAULT_RICH_TEXT_FEATURES = ["ul", "bold", "italic", "h2"]
"ul",
"bold",
"italic",
]
# ids for cypress test data # ids for cypress test data
ADMIN_USER_ID = -1 ADMIN_USER_ID = -1

View File

@ -6,6 +6,7 @@ from wagtail.admin.panels import FieldPanel, PageChooserPanel
from wagtail.fields import RichTextField from wagtail.fields import RichTextField
from wagtail.models import Page from wagtail.models import Page
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES
from vbv_lernwelt.core.model_utils import find_available_slug from vbv_lernwelt.core.model_utils import find_available_slug
from vbv_lernwelt.course.models import CourseBasePage, CoursePage from vbv_lernwelt.course.models import CourseBasePage, CoursePage
@ -306,9 +307,12 @@ class LearningContentTest(LearningContent):
class LearningContentRichText(LearningContent): class LearningContentRichText(LearningContent):
text = RichTextField(blank=True) text = RichTextField(blank=True, features=DEFAULT_RICH_TEXT_FEATURES)
parent_page_types = ["learnpath.Circle"] parent_page_types = ["learnpath.Circle"]
serialize_field_names = LearningContent.serialize_field_names + [
"text",
]
subpage_types = [] subpage_types = []
content_panels = LearningContent.content_panels + [ content_panels = LearningContent.content_panels + [
FieldPanel("text", classname="Text"), FieldPanel("text", classname="Text"),