Skip to content

Commit b0586b7

Browse files
authored
Merge pull request #15 from uicrooks/dev
v2.2.0
2 parents cd6fedd + b3149eb commit b0586b7

File tree

7 files changed

+62
-15
lines changed

7 files changed

+62
-15
lines changed

.config/plugins/shopify/theme.init.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,17 @@ const initTheme = async () => {
8383
const settingsData = {
8484
current: 'Default',
8585
presets: {
86-
Default: {}
86+
Default: {
87+
sections: {
88+
'dynamic-section': {
89+
type: 'dynamic-section',
90+
category: 'Text'
91+
}
92+
},
93+
content_for_index: [
94+
'dynamic-section'
95+
]
96+
}
8797
}
8898
}
8999

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "shopify-theme-lab",
33
"description": "Customizable modular development environment for blazing-fast Shopify theme creation",
44
"author": "Sergej Samsonenko <contact@sergej.codes>",
5-
"version": "2.1.5",
5+
"version": "2.2.0",
66
"license": "MIT",
77
"repository": {
88
"type": "git",

shopify/config/settings_schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
"theme_support_url": "https://THEME_SUPPORT_URL.com"
99
},
1010
{
11-
"name": "name",
11+
"name": "Custom settings",
1212
"settings": [
1313
{
1414
"type": "header",
15-
"content": "Header"
15+
"content": "About JSON settings"
16+
},
17+
{
18+
"type": "paragraph",
19+
"content": "This file controls the organization and content of the Theme settings area of the theme editor. The settings in this file can be referenced by any other files in your theme. [Learn more](https://shopify.dev/docs/themes/settings)"
1620
}
1721
]
1822
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<div class="container">
2+
<div>
3+
<div>
4+
<strong>Dynamic section</strong>
5+
</div>
6+
7+
<div>
8+
Text field value: <strong>{{ section.settings['my-text-field'] }}</strong>
9+
</div>
10+
</div>
11+
</div>
12+
13+
{% schema %}
14+
{
15+
"name": "Dynamic section",
16+
"settings": [
17+
{
18+
"type": "paragraph",
19+
"content": "Add custom settings for this section. [Learn more](https://shopify.dev/docs/themes/settings)"
20+
},
21+
{
22+
"type": "text",
23+
"id": "my-text-field",
24+
"label": "Text field",
25+
"default": "This is a default text"
26+
}
27+
],
28+
"presets": [
29+
{
30+
"name": "Dynamic section",
31+
"category": "text"
32+
}
33+
]
34+
}
35+
{% endschema %}

shopify/sections/footer.liquid

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212

1313
{% schema %}
1414
{
15-
"name": "footer",
16-
"settings": [],
17-
"presets": [
15+
"name": "Footer",
16+
"settings": [
1817
{
19-
"name": "name",
20-
"category": "category"
18+
"type": "paragraph",
19+
"content": "Add custom settings for this section. [Learn more](https://shopify.dev/docs/themes/settings)"
2120
}
2221
]
2322
}

shopify/sections/header.liquid

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020

2121
{% schema %}
2222
{
23-
"name": "header",
24-
"settings": [],
25-
"presets": [
23+
"name": "Header",
24+
"settings": [
2625
{
27-
"name": "name",
28-
"category": "category"
26+
"type": "paragraph",
27+
"content": "Add custom settings for this section. [Learn more](https://shopify.dev/docs/themes/settings)"
2928
}
3029
]
3130
}

0 commit comments

Comments
 (0)