lineheight fix and line break filter
This commit is contained in:
parent
3484b75d8b
commit
dfe47e43a2
4 changed files with 16 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
from djangocms_text_ckeditor.fields import HTMLField
|
||||
from cms.models.pluginmodel import CMSPlugin
|
||||
from django.db import models
|
||||
from django.utils.safestring import mark_safe
|
||||
from djangocms_text_ckeditor.fields import HTMLField
|
||||
from filer.fields.image import FilerImageField
|
||||
|
||||
# Models for CMS Plugins
|
||||
|
|
|
@ -1298,6 +1298,7 @@ footer .dcl-link-separator::before {
|
|||
|
||||
.promo-section p {
|
||||
font-size: 18px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.promo-section.text-center p {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% load custom_tags %}
|
||||
|
||||
<section class="promo-section {{instance.get_extra_classes}}" {% if instance.background_image %}style="background-image:url({{ instance.background_image.url }})"{% endif %}>
|
||||
<div class="container">
|
||||
{% if instance.heading %}
|
||||
<h3>{{instance.heading}}</h3>
|
||||
<h3>{{instance.heading|escaped_line_break|linebreaksbr}}</h3>
|
||||
{% endif %}
|
||||
{% if instance.subheading %}
|
||||
<h4>{{instance.subheading}}</h4>
|
||||
|
|
|
@ -42,3 +42,13 @@ def multiply(value, arg):
|
|||
:return:
|
||||
"""
|
||||
return value * arg
|
||||
|
||||
|
||||
@register.filter('escaped_line_break')
|
||||
def escaped_line_break(value):
|
||||
"""
|
||||
usage: {{ text|escaped_line_break }}
|
||||
:param value:
|
||||
:return:
|
||||
"""
|
||||
return value.replace("\\n", "\n")
|
||||
|
|
Loading…
Reference in a new issue