fix: Add confetti and CTA description to CTA Section

This commit is contained in:
Faris Ansari 2020-04-24 22:02:39 +05:30
parent 422f8d2123
commit ec79595b69
3 changed files with 43 additions and 13 deletions

View file

@ -31,7 +31,7 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Fieldtype",
"options": "Attach Image\nCheckbox\nData\nInt\nSelect\nSmall Text\nText\nMarkdown Editor",
"options": "Attach Image\nCheck\nData\nInt\nSelect\nSmall Text\nText\nMarkdown Editor",
"reqd": 1
},
{
@ -48,7 +48,7 @@
],
"istable": 1,
"links": [],
"modified": "2020-04-21 20:54:56.199695",
"modified": "2020-04-24 17:05:25.322767",
"modified_by": "Administrator",
"module": "Website",
"name": "Web Template Field",

View file

@ -1,7 +1,21 @@
<div class="px-8 py-12 text-center sm:px-12 md:py-20 bg-primary-100 rounded-xl">
<h2 class="max-w-xl mx-auto text-2xl font-bold leading-tight md:text-3xl xl:text-4xl">{{ title }}</h2>
<p class="max-w-xl mx-auto mt-2 text-base text-gray-900 sm:text-lg">{{ subtitle }}</p>
<p class="mt-8">
{{ c('button', label=cta_label, url=cta_url, variant="primary", size="large") }}
</p>
<div class="relative">
<div class="px-8 py-12 text-center sm:px-12 md:py-20 bg-primary-100 rounded-xl">
<h2 class="max-w-xl mx-auto text-2xl font-bold leading-tight md:text-3xl xl:text-4xl">{{ title }}</h2>
<p class="max-w-xl mx-auto mt-2 text-base text-gray-900 sm:text-lg">{{ subtitle }}</p>
<p class="mt-8">
{{ c('button', label=cta_label, url=cta_url, variant="primary", size="large") }}
</p>
{%- if cta_description -%}
<div class="max-w-xl mx-auto mt-2 text-sm text-gray-900">
{{ cta_description }}
</div>
{%- endif -%}
</div>
{%- if show_confetti -%}
<div>
<div class="absolute top-0 w-5 h-5 -mt-2 bg-green-300 rounded-full left-1/4"></div>
<div class="absolute w-4 h-4 bg-orange-300 rounded-full top-2/3 right-1/6"></div>
<div class="absolute bottom-0 w-4 h-4 -mb-2 bg-red-300 rounded-full left-1/6"></div>
</div>
{%- endif -%}
</div>

View file

@ -6,26 +6,42 @@
{
"fieldname": "title",
"fieldtype": "Data",
"label": "Title"
"label": "Title",
"reqd": 0
},
{
"fieldname": "subtitle",
"fieldtype": "Small Text",
"label": "Subtitle"
"label": "Subtitle",
"reqd": 0
},
{
"fieldname": "cta_label",
"fieldtype": "Data",
"label": "CTA Label"
"label": "CTA Label",
"reqd": 0
},
{
"fieldname": "cta_url",
"fieldtype": "Data",
"label": "CTA URL"
"label": "CTA URL",
"reqd": 0
},
{
"fieldname": "cta_description",
"fieldtype": "Small Text",
"label": "CTA Description",
"reqd": 0
},
{
"fieldname": "show_confetti",
"fieldtype": "Check",
"label": "Show Confetti",
"reqd": 0
}
],
"idx": 0,
"modified": "2020-04-17 19:57:40.534914",
"modified": "2020-04-24 22:01:17.098158",
"modified_by": "Administrator",
"name": "Section with CTA",
"owner": "Administrator",