fix: Add Split Section template

This commit is contained in:
Faris Ansari 2020-05-19 00:45:12 +05:30
parent 2ca6802e8e
commit 7234b4b7fa
4 changed files with 66 additions and 0 deletions

View file

@ -278,3 +278,7 @@
content: ''
}
}
.split-section-content {
margin-top: 2rem;
}

View file

@ -0,0 +1,24 @@
<div class="split-section-with-image row">
{%- if not image_on_right -%}
<div class="col-12 col-sm-6">
{{ frappe.render_template('templates/includes/image_with_blur.html', {
"src": image,
"alt": title,
"class": "split-section-image"
}) }}
</div>
{%- endif -%}
<div class="split-section-content col-12 col-sm-6">
<h2>{{ title }}</h2>
<p>{{ content }}</p>
</div>
{%- if image_on_right -%}
<div class="col-12 col-sm-6">
{{ frappe.render_template('templates/includes/image_with_blur.html', {
"src": image,
"alt": title,
"class": "split-section-image"
}) }}
</div>
{%- endif -%}
</div>

View file

@ -0,0 +1,38 @@
{
"creation": "2020-05-17 06:37:27.461722",
"docstatus": 0,
"doctype": "Web Template",
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"label": "Title",
"reqd": 0
},
{
"fieldname": "content",
"fieldtype": "Small Text",
"label": "Content",
"reqd": 0
},
{
"fieldname": "image",
"fieldtype": "Attach Image",
"label": "Image",
"reqd": 0
},
{
"fieldname": "image_on_right",
"fieldtype": "Check",
"label": "Image on Right",
"reqd": 0
}
],
"idx": 0,
"modified": "2020-05-17 06:37:27.461722",
"modified_by": "Administrator",
"name": "Split Section with Image",
"owner": "Administrator",
"standard": 1,
"template": ""
}