-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
236 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
seeds/blueprints/content/mixins/builder/faqs/faqs_column.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
17
seeds/blueprints/content/mixins/builder/faqs/faqs_common.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters