Skip to content

Commit

Permalink
Use the prose templex for the introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrlpld committed Oct 11, 2023
1 parent 99948b4 commit 3d24799
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lpld/home/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
from wagtail import fields
from wagtail import images as wagtail_images
from wagtail.admin import panels
from wagtail.templatetags import wagtailcore_tags

from lpld.core import models as core_models
from lpld.templates.atoms.heading import heading
from lpld.templates.molecules import section
from lpld.templates.organisms import prose
from lpld.templates.organisms.teaser_grid import teaser_grid


Expand Down Expand Up @@ -37,7 +39,9 @@ def get_context(self, request):

extra_context = {
"title": heading.Heading(text=self.title),
"introduction": self.introduction,
"introduction": prose.Prose(
children=wagtailcore_tags.richtext(self.introduction),
),
"profile_image": self.profile_image,
"projects": self.get_projects_section(),
}
Expand Down
4 changes: 1 addition & 3 deletions lpld/templates/pages/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
max-w-sm md:max-w-md lg:max-w-lg
mt-8 lg:mt-16
">
{% #prose large=True %}
{{ page.introduction|richtext }}
{% /prose %}
{% templex introduction large=True %}
</div>
</section>

Expand Down

0 comments on commit 3d24799

Please sign in to comment.