Skip to content

Commit

Permalink
Merge branch 'release/v1.2.9' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
artistro08 committed Jul 20, 2022
2 parents eb5e0db + 572abac commit f6ee8eb
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 6 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ To get started with this theme, you'll need the following
- A knowledge of [Tailor](https://docs.octobercms.com/3.x/tailor/introduction.html)
- Some knowledge of PHP

#### Plugin Dependencies
This theme depends on the following plugins:
- [Artistro08.TailorStarter](https://github.com/artistro08/tailor-starter-plugin)
- For Order Email management with the [Shop Feature](#shop)
- [JanVince.SmallContactForm](https://github.com/jan-vince/smallcontactform)
- For Contact form blocks in the builder

The theme will attempt to automatically install the plugins when you install it.

### Get Started
Clone or download this theme in the October CMS themes directory or install it via `artisan`:
```bash
Expand Down
2 changes: 2 additions & 0 deletions layouts/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[resources]
js[] = "bootstrap.min.js"
css[] = "bootstrap.min.css"

[contactForm]
==
<?php
function onStart() {
Expand Down
2 changes: 2 additions & 0 deletions layouts/page.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[resources]
js[] = "bootstrap.min.js"
css[] = "bootstrap.min.css"

[contactForm]
==
<!DOCTYPE html>
<html lang="en">
Expand Down
6 changes: 5 additions & 1 deletion pages/index.htm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ <h1 class="text-uppercase">{{ page.title }}</h1>
{% if section.content_group == 'events' %}
{% partial 'builder/events' section=section %}
{% endif %}
{# Products #}
{# Products #}
{% if section.content_group == 'products' %}
{% partial 'builder/products' section=section %}
{% endif %}
{# Form #}
{% if section.content_group == 'form' %}
{% partial 'builder/form' section=section %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
4 changes: 4 additions & 0 deletions pages/page.htm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ <h1 class="text-uppercase">{{ page.title }}</h1>
{% if section.content_group == 'products' %}
{% partial 'builder/products' section=section %}
{% endif %}
{# Form #}
{% if section.content_group == 'form' %}
{% partial 'builder/form' section=section %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
13 changes: 13 additions & 0 deletions partials/builder/form.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<section class="{{ section.style }} {{ section.fade_out == true ? 'fade-out-white' }}">
<div class="container">
<div class="row">
<div class="col-12 col-lg-8 mx-auto">
<div class="card">
<div class="card-body">
{% component "contactForm" %}
</div>
</div>
</div>
</div>
</div>
</section>
7 changes: 7 additions & 0 deletions partials/builder/section.htm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ <h3 class="text-decoration-none text-dark fs-5">{{ product.title }}</h3>
{% endfor %}
</div>
{% endif %}
{% if column.content_group == "form" %}
<div class="card">
<div class="card-body">
{% component "contactForm" %}
</div>
</div>
{% endif %}
</div>
{% endfor %}
</div>
Expand Down
41 changes: 39 additions & 2 deletions seeds/blueprints/content/mixins/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,34 @@ fields:
me-auto: Left
mx-auto: Center
ms-auto: Right
form:
name: Form
icon: icon-list-alt
description: Section with a form.
titleFrom: title
fields:
events:
type: mixin
source: Content\FormColumn
hr_1:
type: ruler
width:
label: Column Width
type: number
comment: The width of the column. Based on a 12 column layout. Leave at 0 to automatically adjust
span: left
min: 0
max: 12
default: 0
position:
label: Position
type: dropdown
comment: The position of the column.
span: right
options:
me-auto: Left
mx-auto: Center
ms-auto: Right
events:
name: Events
icon: icon-calendar
Expand All @@ -267,6 +295,15 @@ fields:
description: Section with products.
titleFrom: title
fields:
events:
products:
type: mixin
source: Content\Products
form:
name: Form
icon: icon-list-alt
description: Section with a form.
titleFrom: title
fields:
form:
type: mixin
source: Content\Products
source: Content\Form
2 changes: 1 addition & 1 deletion seeds/blueprints/content/mixins/events/events_column.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fields:
label: Title
type: text
span: full
comment: Title of the section. Used for organizational purposes.
comment: Title of the column. Used for organizational purposes.
show:
type: dropdown
span: full
Expand Down
19 changes: 19 additions & 0 deletions seeds/blueprints/content/mixins/form/form.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: ed7df322-083f-11ed-a233-11166f9cffdf
handle: Content\Form
type: mixin
name: Form
fields:
title:
label: Title
type: text
span: left
comment: Title of the section. Title of the section. Used for organizational purposes.
style:
label: Style
type: dropdown
span: right
comment: Style of the background
options:
none: None
light: Light
dark: Dark
12 changes: 12 additions & 0 deletions seeds/blueprints/content/mixins/form/form_column.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uuid: 1a55cbd0-0840-11ed-900b-0e02148bcfbe
handle: Content\FormColumn
type: mixin
name: Form
fields:
title:
label: Title
type: text
span: full
comment: Title of the column. Title of the section. Used for organizational purposes.
hr_1:
type: ruler
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fields:
label: Title
type: text
span: full
comment: Title of the section. Used for organizational purposes.
comment: Title of the column. Used for organizational purposes.
limit:
type: number
span: full
Expand Down
1 change: 1 addition & 0 deletions theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ code: TailorStarter
database: '0'
require:
- "Artistro08.TailorStarter"
- "JanVince.SmallContactForm"
3 changes: 2 additions & 1 deletion version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ v1.2.4: Moved all globals to one file. Fixed some product logic in the event tha
v1.2.5: Added orders to shop. Cleaned up code. Added plugin dependency via git for mail partials.
v1.2.6: Disabled shop if Stripe Keys are not set.
v1.2.7: Added new menu item types to theme.
v1.2.8: Updated section columns to have events and products.
v1.2.8: Updated section columns to have events and products.
v1.2.9: Added contact form to builder and builder > section > columns.

0 comments on commit f6ee8eb

Please sign in to comment.