don’t wrap included sections by default

readwriteweb
Jaap Joris Vens 2019-04-24 20:17:36 +02:00
rodzic b106d740a0
commit 10e90052f7
2 zmienionych plików z 32 dodań i 30 usunięć

Wyświetl plik

@ -18,9 +18,7 @@
{% for section in object.sections.all %}
<section class="{{section.type}} color{{section.color}}">
<div class="wrapper">
{% include 'cms/sections/'|add:section.type|add:'.html' %}
</div>
{% include 'cms/sections/'|add:section.type|add:'.html' %}
</section>
{% endfor %}
{% endblock %}

Wyświetl plik

@ -1,33 +1,37 @@
{% load thumbnail embed_video_tags %}
{% if section.image %}
<div class="image">
<img alt="" src="{% thumbnail section.image 800x800 %}">
</div>
{% endif %}
<div class="wrapper">
<div class="title">
<h1>
{{section.title}}
</h1>
</div>
{% if section.content %}
<div class="content">
{{section.content|safe}}
</div>
{% endif %}
{% if section.video %}
<div class="video">
<div class="iframe">
{% video section.video '800x600' %}
{% if section.image %}
<div class="image">
<img alt="" src="{% thumbnail section.image 800x800 %}">
</div>
</div>
{% endif %}
{% endif %}
{% if section.button_text and section.button_link %}
<div class="button">
<a href="{{section.button_link}}">{{section.button_text}}</a>
<div class="title">
<h1>
{{section.title}}
</h1>
</div>
{% endif %}
{% if section.content %}
<div class="content">
{{section.content|safe}}
</div>
{% endif %}
{% if section.video %}
<div class="video">
<div class="iframe">
{% video section.video '800x600' %}
</div>
</div>
{% endif %}
{% if section.button_text and section.button_link %}
<div class="button">
<a href="{{section.button_link}}">{{section.button_text}}</a>
</div>
{% endif %}
</div>