Skip to content

Commit

Permalink
Merge branch 'release/6.3.24'
Browse files Browse the repository at this point in the history
  • Loading branch information
artistro08 committed Apr 25, 2023
2 parents e1c83b5 + 9cf1134 commit 7977047
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 3 deletions.
13 changes: 12 additions & 1 deletion partials/assets.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@
js[] = "bootstrap.bundle.js"
css[] = "bootstrap.css"
==
{# Use this file to include your resources in your theme #}
{# Use this file to include your resources in your theme #}

{# bootstrap icon variable fonts #}
<style>
.bi {
width: 1em;
height: 1em;
display: inline-block;
vertical-align: -0.125em;
fill: currentcolor;
}
</style>
30 changes: 30 additions & 0 deletions partials/builder/columns/faqs.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[collection faqs]
handle = "Content\FAQ"

[collection icons]
handle = "Content\Icon"
==
{% if faqs|length %}
<div class="row row-cols-1 row-cols-lg-{{ column.per_row }} mb-4">
{% set default_icon = icons.find(1485).svg_code|raw %}
{% for faq in faqs %}
<div class="col">
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-12 col-lg-2 text-left text-lg-center">
<div class="fs-1">
{{ faq.icon.svg_code|default(default_icon)|raw }}
</div>
</div>
<div class="col-12 col-lg-9">
<h6 class="card-title fs-4"><strong>{{ faq.question }}</strong></h6>
<p class="card-text">{{ faq.answer|nl2br }}</p>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
4 changes: 4 additions & 0 deletions partials/builder/items.htm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
{% if section.content_group == 'posts' %}
{% partial 'builder/sections/posts' section=section %}
{% endif %}
{# FAQs #}
{% if section.content_group == 'faqs' %}
{% partial 'builder/sections/faqs' section=section %}
{% endif %}
{# Products #}
{% if section.content_group == 'products' %}
{% partial 'builder/sections/products' section=section %}
Expand Down
51 changes: 51 additions & 0 deletions partials/builder/sections/faqs.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[collection faqs]
handle = "Content\FAQ"

[collection icons]
handle = "Content\Icon"
==
<{{ section.html_tag == "default" ? "section" : section.html_tag }}
{{ section.html_anchor|length ? 'id="' ~ section.html_anchor ~ '"' }}
class="{% if section.css_classes|length %}
{% for class in section.css_classes|split(',') %}
{{ class ~ ' ' }}
{% endfor %}
{% endif %}
{{ section.style == 'light' ? 'bg-light' }}
{{ section.style == 'dark' ? 'bg-dark text-white' }}
{{ section.disable_top_spacing == true ? 'pt-0' : "pt-4" }}
{{ section.disable_bottom_spacing == true ? 'pb-0' : "pb-4" }}
position-relative"
>
<div class="{{ section.container_style }}">
{% if faqs|length %}
<div class="row row-cols-1 row-cols-lg-{{ section.per_row }} mb-4">
{% set default_icon = icons.find(1485).svg_code|raw %}
{% for faq in faqs %}
<div class="col">
<div class="card mb-4">
<div class="card-body">
<div class="row">
<div class="col-12 col-lg-2 text-left text-lg-center">
<div class="fs-1">
{{ faq.icon.svg_code|default(default_icon)|raw }}
</div>
</div>
<div class="col-12 col-lg-9">
<h6 class="card-title fs-4"><strong>{{ faq.question }}</strong></h6>
<p class="card-text">{{ faq.answer|nl2br }}</p>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% if section.image|length %}
<div class="hero-media position-absolute bg-dark position-absolute top-0 start-0 bottom-0 end-0 w-100" style="z-index: -1">
<img class="w-100 h-100 opacity-25" style="object-fit: cover; object-position: center" src="{{ section.image|media|resize(1920) }}" alt="{{ section.image_description }}">
</div>
{% endif %}
</{{ section.html_tag == "default" ? "section" : section.html_tag }}>
5 changes: 5 additions & 0 deletions partials/builder/sections/section.htm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
{% endif %}
{% endif %}

{# Form Column Group #}
{% if column.content_group == "faqs" %}
{% partial 'builder/columns/faqs' column = column %}
{% endif %}

{# Shop Column Group #}
{% if settings.enable_shop == true %}
{% if column.content_group == "products" %}
Expand Down
6 changes: 6 additions & 0 deletions partials/columns/_list_icon.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
if(!empty($value)) {
$icon_code = json_decode($value, true);
echo $icon_code['svg_code'];
}
?>
42 changes: 42 additions & 0 deletions seeds/blueprints/content/faq/faq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
uuid: 84e05424-d4a1-11ed-a494-ddf0a211cbca
handle: Content\FAQ
type: structure
name: FAQs
drafts: false
multisite: sync
pagefinder: false

primaryNavigation:
label: FAQs
icon: icon-question-circle-o
order: 145

structure:
maxDepth: 2

customMessages:
buttonCreate: New Question

fields:
icon:
label: Icon
type: entries
maxItems: 1
displayMode: recordfinder
span: full
source: Content\Icon
commentAbove: The icon related to the question/answer pair
scope: false
column:
type: partial
path: "#/artistro08-tailorstartertheme/partials/columns/_list_icon"
question:
label: Question
commentAbove: The question that's frequently asked
type: textarea
span: left
answer:
label: Answer
commentAbove: The answer of the question
type: textarea
span: right
2 changes: 1 addition & 1 deletion seeds/blueprints/content/icons/icons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pagefinder: false
primaryNavigation:
label: Icons
icon: icon-bookmark
order: 146
order: 147

fields:
svg_code:
Expand Down
10 changes: 10 additions & 0 deletions seeds/blueprints/content/mixins/builder/blog_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ fields:
type: mixin
source: Content\Products
tab: General
faqs:
name: FAQs
icon: icon-question-circle-o
description: Section with Frequently Asked Questions.
titleFrom: title
useTabs: true
fields:
search:
type: mixin
source: Content\FAQs
form:
name: Form
icon: icon-list-alt
Expand Down
10 changes: 10 additions & 0 deletions seeds/blueprints/content/mixins/builder/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ fields:
type: mixin
source: Content\Products
tab: General
faqs:
name: FAQs
icon: icon-question-circle-o
description: Section with Frequently Asked Questions.
titleFrom: title
useTabs: true
fields:
search:
type: mixin
source: Content\FAQs
form:
name: Form
icon: icon-list-alt
Expand Down
16 changes: 16 additions & 0 deletions seeds/blueprints/content/mixins/builder/faqs/faqs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
uuid: a0a0b68c-d4c9-11ed-8cf6-94b3c242168d
handle: Content\FAQs
type: mixin
name: Frequently Asked Questions
fields:
section_header:
type: mixin
source: Content\SectionHeader
common_fields:
type: mixin
source: Content\FAQsCommonFields
advanced_content:
type: mixin
source: Content\AdvancedFields
label: Advanced Settings
tab: Advanced
20 changes: 20 additions & 0 deletions seeds/blueprints/content/mixins/builder/faqs/faqs_column.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: a000701a-d4c9-11ed-9ab0-83463553e4b9
handle: Content\FAQsColumn
type: mixin
name: Frequently Asked Questions Column
fields:
column_header:
type: mixin
label: Column Header
source: Content\ColumnHeader
common_fields:
type: mixin
source: Content\FAQsCommonFields
column_options:
type: mixin
source: Content\ColumnOptions
advanced_content:
type: mixin
source: Content\AdvancedFieldsColumn
label: Advanced Settings
tab: Advanced
17 changes: 17 additions & 0 deletions seeds/blueprints/content/mixins/builder/faqs/faqs_common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
uuid: a0162173-d4c9-11ed-b361-b220a3e8a205
handle: Content\FAQsCommonFields
type: mixin
name: Frequently Asked Questions Fields
fields:
per_row:
type: dropdown
tab: Style
label: FAQs per Row
commentAbove: The number of FAQs that appear in a Row
span: full
options:
'1': '1 Per Row'
'2': '2 Per Row'
'3': '3 Per Row'
'4': '4 Per Row'
'5': '5 Per Row'
10 changes: 10 additions & 0 deletions seeds/blueprints/content/mixins/builder/section/section.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ fields:
products:
type: mixin
source: Content\ProductsColumn
faqs:
name: FAQs
icon: icon-question-circle-o
description: Column with Frequently Asked Questions
titleFrom: title
useTabs: true
fields:
search:
type: mixin
source: Content\FAQsColumn
form:
name: Form
icon: icon-list-alt
Expand Down
3 changes: 2 additions & 1 deletion version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ v6.3.19: Fix locale being stuck in url if there is more than one site.
v6.3.20: fix issue where navbar container style isn't set.
v6.3.21: Added extra sitemap options for tailor entries.
v6.3.22: Setup pagefinder to only use front facing page types. Requires October CMS v3.3.3
v6.3.23: Added permissions to settings switches
v6.3.23: Added permissions to settings switches
v6.3.24: Added Frequently Asked Questions

0 comments on commit 7977047

Please sign in to comment.