@spwig/theme-cli 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/README.md +0 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.d.ts.map +0 -0
- package/dist/cli.js +14 -22
- package/dist/cli.js.map +1 -1
- package/dist/commands/component.d.ts +0 -0
- package/dist/commands/component.d.ts.map +0 -0
- package/dist/commands/component.js +0 -0
- package/dist/commands/component.js.map +0 -0
- package/dist/commands/dev.d.ts +14 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +310 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/init.d.ts +5 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +80 -115
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/package.d.ts +0 -0
- package/dist/commands/package.d.ts.map +1 -1
- package/dist/commands/package.js +0 -2
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -2
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +10 -112
- package/dist/commands/validate.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/component_manifest_schema.json +0 -0
- package/dist/schemas/theme_manifest_schema.json +5 -63
- package/dist/templates/assets/logo.svg.template +6 -0
- package/dist/templates/assets/theme.js.template +150 -0
- package/dist/templates/components/blank.template.html.template +0 -0
- package/dist/templates/components/footer.manifest.json.template +0 -0
- package/dist/templates/components/footer.schema.json.template +22 -0
- package/dist/templates/components/footer.styles.css.template +80 -0
- package/dist/templates/components/footer.template.html.template +0 -0
- package/dist/templates/components/header.manifest.json.template +0 -0
- package/dist/templates/components/header.schema.json.template +0 -0
- package/dist/templates/components/header.styles.css.template +104 -0
- package/dist/templates/components/header.template.html.template +0 -0
- package/dist/templates/components/schema.json.template +0 -0
- package/dist/templates/components/section.manifest.json.template +2 -2
- package/dist/templates/components/section.schema.json.template +40 -0
- package/dist/templates/components/section.styles.css.template +60 -0
- package/dist/templates/components/section.template.html.template +0 -0
- package/dist/templates/components/utility.manifest.json.template +0 -0
- package/dist/templates/pages/cart.html.template +104 -0
- package/dist/templates/pages/collection.html.template +86 -0
- package/dist/templates/pages/home.html.template +51 -0
- package/dist/templates/pages/layout.html.template +48 -0
- package/dist/templates/pages/product.html.template +90 -0
- package/dist/templates/presets/footer.json.template +16 -0
- package/dist/templates/presets/header.json.template +16 -0
- package/dist/templates/theme/README.md.template +51 -21
- package/dist/templates/theme/design_tokens.json.template +0 -0
- package/dist/templates/theme/manifest.json.template +6 -28
- package/dist/templates/theme/tokens.json.template +1254 -0
- package/dist/utils/file-system.d.ts +0 -0
- package/dist/utils/file-system.d.ts.map +0 -0
- package/dist/utils/file-system.js +0 -0
- package/dist/utils/file-system.js.map +0 -0
- package/dist/utils/validation.d.ts +0 -0
- package/dist/utils/validation.d.ts.map +0 -0
- package/dist/utils/validation.js +0 -0
- package/dist/utils/validation.js.map +0 -0
- package/package.json +6 -3
- package/schemas/theme_manifest_schema.json +5 -63
- package/schemas/component_manifest_schema.json +0 -221
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{% extends "layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ collection.title }} - {{ store.name }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block meta_description %}{{ collection.description|truncatewords:30 }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block body_class %}page-collection{% endblock %}
|
|
8
|
+
|
|
9
|
+
{% block content %}
|
|
10
|
+
<div class="collection-page">
|
|
11
|
+
<div class="container">
|
|
12
|
+
<!-- Collection Header -->
|
|
13
|
+
<div class="collection-header">
|
|
14
|
+
<h1 class="collection-title">{{ collection.title }}</h1>
|
|
15
|
+
{% if collection.description %}
|
|
16
|
+
<p class="collection-description">{{ collection.description }}</p>
|
|
17
|
+
{% endif %}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Filters and Sort -->
|
|
21
|
+
<div class="collection-toolbar">
|
|
22
|
+
<div class="filter-controls">
|
|
23
|
+
<!-- Filter implementation depends on your backend -->
|
|
24
|
+
<span class="product-count">{{ products|length }} products</span>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="sort-controls">
|
|
28
|
+
<label for="sort">Sort by:</label>
|
|
29
|
+
<select id="sort" onchange="window.location.href=this.value">
|
|
30
|
+
<option value="?sort=featured">Featured</option>
|
|
31
|
+
<option value="?sort=price-asc">Price: Low to High</option>
|
|
32
|
+
<option value="?sort=price-desc">Price: High to Low</option>
|
|
33
|
+
<option value="?sort=newest">Newest</option>
|
|
34
|
+
<option value="?sort=title-asc">Name: A-Z</option>
|
|
35
|
+
</select>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<!-- Products Grid -->
|
|
40
|
+
<div class="product-grid">
|
|
41
|
+
{% for product in products %}
|
|
42
|
+
<div class="product-card">
|
|
43
|
+
<a href="{{ product.url }}" class="product-link">
|
|
44
|
+
{% if product.image %}
|
|
45
|
+
<img src="{{ product.image }}" alt="{{ product.title }}" class="product-image" loading="lazy">
|
|
46
|
+
{% else %}
|
|
47
|
+
<div class="product-image-placeholder"></div>
|
|
48
|
+
{% endif %}
|
|
49
|
+
|
|
50
|
+
<div class="product-details">
|
|
51
|
+
<h3 class="product-title">{{ product.title }}</h3>
|
|
52
|
+
<div class="product-price">
|
|
53
|
+
{% if product.compare_at_price %}
|
|
54
|
+
<span class="compare-price">{{ product.compare_at_price|currency }}</span>
|
|
55
|
+
{% endif %}
|
|
56
|
+
<span class="current-price">{{ product.price|currency }}</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</a>
|
|
60
|
+
</div>
|
|
61
|
+
{% empty %}
|
|
62
|
+
<div class="no-products">
|
|
63
|
+
<p>No products found in this collection.</p>
|
|
64
|
+
</div>
|
|
65
|
+
{% endfor %}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Pagination -->
|
|
69
|
+
{% if is_paginated %}
|
|
70
|
+
<nav class="pagination">
|
|
71
|
+
{% if page_obj.has_previous %}
|
|
72
|
+
<a href="?page={{ page_obj.previous_page_number }}" class="page-link">Previous</a>
|
|
73
|
+
{% endif %}
|
|
74
|
+
|
|
75
|
+
<span class="page-info">
|
|
76
|
+
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
|
|
77
|
+
</span>
|
|
78
|
+
|
|
79
|
+
{% if page_obj.has_next %}
|
|
80
|
+
<a href="?page={{ page_obj.next_page_number }}" class="page-link">Next</a>
|
|
81
|
+
{% endif %}
|
|
82
|
+
</nav>
|
|
83
|
+
{% endif %}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
{% endblock %}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{% extends "layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ store.name }} - Home{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block body_class %}page-home{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content %}
|
|
8
|
+
<!-- Hero Section -->
|
|
9
|
+
{% include "components/sections/hero_section/template.html" with settings=page.sections.0.settings %}
|
|
10
|
+
|
|
11
|
+
<!-- Featured Products -->
|
|
12
|
+
<section class="featured-products">
|
|
13
|
+
<div class="container">
|
|
14
|
+
<h2 class="section-title">Featured Products</h2>
|
|
15
|
+
<div class="product-grid">
|
|
16
|
+
{% for product in featured_products %}
|
|
17
|
+
<div class="product-card">
|
|
18
|
+
<a href="{{ product.url }}" class="product-link">
|
|
19
|
+
{% if product.image %}
|
|
20
|
+
<img src="{{ product.image }}" alt="{{ product.title }}" class="product-image">
|
|
21
|
+
{% endif %}
|
|
22
|
+
<h3 class="product-title">{{ product.title }}</h3>
|
|
23
|
+
<p class="product-price">{{ product.price|currency }}</p>
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
26
|
+
{% empty %}
|
|
27
|
+
<p class="no-products">No featured products available.</p>
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<!-- Featured Collections -->
|
|
34
|
+
{% if featured_collections %}
|
|
35
|
+
<section class="featured-collections">
|
|
36
|
+
<div class="container">
|
|
37
|
+
<h2 class="section-title">Shop by Category</h2>
|
|
38
|
+
<div class="collection-grid">
|
|
39
|
+
{% for collection in featured_collections %}
|
|
40
|
+
<a href="{{ collection.url }}" class="collection-card">
|
|
41
|
+
{% if collection.image %}
|
|
42
|
+
<img src="{{ collection.image }}" alt="{{ collection.title }}" class="collection-image">
|
|
43
|
+
{% endif %}
|
|
44
|
+
<h3 class="collection-title">{{ collection.title }}</h3>
|
|
45
|
+
</a>
|
|
46
|
+
{% endfor %}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</section>
|
|
50
|
+
{% endif %}
|
|
51
|
+
{% endblock %}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{% load static %}
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta name="description" content="{% block meta_description %}{{ store.description }}{% endblock %}">
|
|
8
|
+
|
|
9
|
+
<title>{% block title %}{{ store.name }}{% endblock %}</title>
|
|
10
|
+
|
|
11
|
+
<!-- Theme Styles -->
|
|
12
|
+
{% if theme_css_url %}
|
|
13
|
+
<link rel="stylesheet" href="{{ theme_css_url }}">
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% if brand_css_url %}
|
|
16
|
+
<link rel="stylesheet" href="{{ brand_css_url }}">
|
|
17
|
+
{% endif %}
|
|
18
|
+
<link rel="stylesheet" href="{% static 'themes/' %}{{ active_theme.slug }}/assets/styles/global.css">
|
|
19
|
+
|
|
20
|
+
<!-- Favicon -->
|
|
21
|
+
{% if store.favicon %}
|
|
22
|
+
<link rel="icon" href="{{ store.favicon }}">
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% block head_extra %}{% endblock %}
|
|
26
|
+
</head>
|
|
27
|
+
<body class="{% block body_class %}{% endblock %}">
|
|
28
|
+
<!-- Header -->
|
|
29
|
+
{% block header %}
|
|
30
|
+
{% include "components/headers/default_header/template.html" %}
|
|
31
|
+
{% endblock %}
|
|
32
|
+
|
|
33
|
+
<!-- Main Content -->
|
|
34
|
+
<main id="main-content" class="main-content">
|
|
35
|
+
{% block content %}{% endblock %}
|
|
36
|
+
</main>
|
|
37
|
+
|
|
38
|
+
<!-- Footer -->
|
|
39
|
+
{% block footer %}
|
|
40
|
+
{% include "components/footers/default_footer/template.html" %}
|
|
41
|
+
{% endblock %}
|
|
42
|
+
|
|
43
|
+
<!-- Theme Scripts -->
|
|
44
|
+
<script src="{% static 'themes/' %}{{ active_theme.slug }}/assets/theme.js"></script>
|
|
45
|
+
|
|
46
|
+
{% block scripts_extra %}{% endblock %}
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{% extends "layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ product.title }} - {{ store.name }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block meta_description %}{{ product.description|truncatewords:30 }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block body_class %}page-product{% endblock %}
|
|
8
|
+
|
|
9
|
+
{% block content %}
|
|
10
|
+
<div class="product-page">
|
|
11
|
+
<div class="container">
|
|
12
|
+
<div class="product-layout">
|
|
13
|
+
<!-- Product Images -->
|
|
14
|
+
<div class="product-images">
|
|
15
|
+
{% if product.images %}
|
|
16
|
+
<div class="main-image">
|
|
17
|
+
<img src="{{ product.images.0 }}" alt="{{ product.title }}" id="main-product-image">
|
|
18
|
+
</div>
|
|
19
|
+
{% if product.images|length > 1 %}
|
|
20
|
+
<div class="thumbnail-gallery">
|
|
21
|
+
{% for image in product.images %}
|
|
22
|
+
<button class="thumbnail" data-image="{{ image }}">
|
|
23
|
+
<img src="{{ image }}" alt="{{ product.title }} - Image {{ forloop.counter }}">
|
|
24
|
+
</button>
|
|
25
|
+
{% endfor %}
|
|
26
|
+
</div>
|
|
27
|
+
{% endif %}
|
|
28
|
+
{% else %}
|
|
29
|
+
<div class="no-image">
|
|
30
|
+
<span>No image available</span>
|
|
31
|
+
</div>
|
|
32
|
+
{% endif %}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Product Info -->
|
|
36
|
+
<div class="product-info">
|
|
37
|
+
<h1 class="product-title">{{ product.title }}</h1>
|
|
38
|
+
|
|
39
|
+
<div class="product-price">
|
|
40
|
+
{% if product.compare_at_price %}
|
|
41
|
+
<span class="compare-price">{{ product.compare_at_price|currency }}</span>
|
|
42
|
+
{% endif %}
|
|
43
|
+
<span class="current-price">{{ product.price|currency }}</span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="product-description">
|
|
47
|
+
{{ product.description|safe }}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- Add to Cart Form -->
|
|
51
|
+
<form action="/cart/add/" method="post" class="add-to-cart-form">
|
|
52
|
+
{% csrf_token %}
|
|
53
|
+
<input type="hidden" name="product_id" value="{{ product.id }}">
|
|
54
|
+
|
|
55
|
+
<!-- Variant Selector -->
|
|
56
|
+
{% if product.variants|length > 1 %}
|
|
57
|
+
<div class="variant-selector">
|
|
58
|
+
<label for="variant">Select Option:</label>
|
|
59
|
+
<select name="variant_id" id="variant" required>
|
|
60
|
+
{% for variant in product.variants %}
|
|
61
|
+
<option value="{{ variant.id }}" {% if not variant.available %}disabled{% endif %}>
|
|
62
|
+
{{ variant.title }} - {{ variant.price|currency }}
|
|
63
|
+
{% if not variant.available %}(Sold out){% endif %}
|
|
64
|
+
</option>
|
|
65
|
+
{% endfor %}
|
|
66
|
+
</select>
|
|
67
|
+
</div>
|
|
68
|
+
{% else %}
|
|
69
|
+
<input type="hidden" name="variant_id" value="{{ product.variants.0.id }}">
|
|
70
|
+
{% endif %}
|
|
71
|
+
|
|
72
|
+
<!-- Quantity -->
|
|
73
|
+
<div class="quantity-selector">
|
|
74
|
+
<label for="quantity">Quantity:</label>
|
|
75
|
+
<input type="number" name="quantity" id="quantity" value="1" min="1" max="99">
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<button type="submit" class="add-to-cart-button" {% if not product.available %}disabled{% endif %}>
|
|
79
|
+
{% if product.available %}
|
|
80
|
+
Add to Cart
|
|
81
|
+
{% else %}
|
|
82
|
+
Sold Out
|
|
83
|
+
{% endif %}
|
|
84
|
+
</button>
|
|
85
|
+
</form>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
{% endblock %}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{displayName}} Footer",
|
|
3
|
+
"description": "Custom footer preset for {{displayName}} theme",
|
|
4
|
+
"layout_type": "standard",
|
|
5
|
+
"zone_layouts": {
|
|
6
|
+
"main-footer": ["left", "center", "right"],
|
|
7
|
+
"bottom-bar": ["left", "right"]
|
|
8
|
+
},
|
|
9
|
+
"widget_placements": [
|
|
10
|
+
{"widget_type": "text", "zone": "main-footer_left", "order": 0},
|
|
11
|
+
{"widget_type": "links", "zone": "main-footer_center", "order": 0},
|
|
12
|
+
{"widget_type": "newsletter", "zone": "main-footer_right", "order": 0},
|
|
13
|
+
{"widget_type": "social", "zone": "bottom-bar_left", "order": 0},
|
|
14
|
+
{"widget_type": "text", "zone": "bottom-bar_right", "order": 0, "config": {"content": "© {{year}} {{displayName}}. All rights reserved."}}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{displayName}} Header",
|
|
3
|
+
"description": "Custom header preset for {{displayName}} theme",
|
|
4
|
+
"layout_type": "classic",
|
|
5
|
+
"is_sticky": true,
|
|
6
|
+
"enable_notification_zone": false,
|
|
7
|
+
"zone_layouts": {
|
|
8
|
+
"main-header": ["left", "center", "right"]
|
|
9
|
+
},
|
|
10
|
+
"widget_placements": [
|
|
11
|
+
{"widget_type": "logo", "zone": "main-header_left", "order": 0},
|
|
12
|
+
{"widget_type": "search", "zone": "main-header_center", "order": 0},
|
|
13
|
+
{"widget_type": "cart", "zone": "main-header_right", "order": 0},
|
|
14
|
+
{"widget_type": "account", "zone": "main-header_right", "order": 1}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -6,54 +6,84 @@
|
|
|
6
6
|
|
|
7
7
|
- **Author**: {{author}}
|
|
8
8
|
- **Version**: 1.0.0
|
|
9
|
+
- **SDK Version**: 2.0
|
|
9
10
|
- **License**: {{license}}
|
|
11
|
+
- **Min Platform Version**: 2.0.0
|
|
10
12
|
|
|
11
13
|
## Features
|
|
12
14
|
|
|
13
15
|
- Responsive design optimized for all devices
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
16
|
+
- Mobile-first approach
|
|
17
|
+
- Fully customizable via design tokens
|
|
18
|
+
- Header and footer presets included
|
|
17
19
|
- Accessible and SEO-friendly
|
|
18
20
|
|
|
21
|
+
## Theme Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
{{themeName}}/
|
|
25
|
+
├── manifest.json # Theme metadata and configuration
|
|
26
|
+
├── tokens.json # Design tokens (colors, typography, spacing, etc.)
|
|
27
|
+
├── presets/
|
|
28
|
+
│ ├── header.json # Default header layout preset
|
|
29
|
+
│ └── footer.json # Default footer layout preset
|
|
30
|
+
├── css/
|
|
31
|
+
│ └── theme.css # Custom CSS overrides (optional)
|
|
32
|
+
├── preview.png # Theme preview image
|
|
33
|
+
└── README.md
|
|
34
|
+
```
|
|
35
|
+
|
|
19
36
|
## Development
|
|
20
37
|
|
|
21
38
|
```bash
|
|
22
|
-
# Start development server
|
|
39
|
+
# Start development server with live preview
|
|
23
40
|
spwig dev
|
|
24
41
|
|
|
25
|
-
# Validate theme
|
|
42
|
+
# Validate theme structure and tokens
|
|
26
43
|
spwig validate
|
|
27
44
|
|
|
28
45
|
# Package for distribution
|
|
29
46
|
spwig package
|
|
30
47
|
```
|
|
31
48
|
|
|
32
|
-
##
|
|
49
|
+
## Customization
|
|
33
50
|
|
|
34
|
-
|
|
51
|
+
### Design Tokens
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
- **Default Footer** - Site footer with links
|
|
38
|
-
- **Hero Section** - Eye-catching hero banner
|
|
53
|
+
The `tokens.json` file is the primary deliverable of your theme. It controls every visual aspect of the storefront:
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
- **Colors** - Primary, secondary, accent, text, backgrounds, borders, status colors
|
|
56
|
+
- **Typography** - Font families, sizes, weights, line heights, letter spacing
|
|
57
|
+
- **Spacing** - Consistent spacing scale used throughout the layout
|
|
58
|
+
- **Borders** - Border widths and radius values
|
|
59
|
+
- **Shadows** - Elevation levels from subtle to prominent
|
|
60
|
+
- **Transitions** - Animation durations and easing functions
|
|
61
|
+
- **Breakpoints** - Responsive design breakpoints
|
|
62
|
+
- **Z-Index** - Layering system for overlapping elements
|
|
63
|
+
- **Container** - Max width and padding for page content
|
|
64
|
+
- **Menu** - Navigation styling and behavior
|
|
65
|
+
- **Header** - Header zones, backgrounds, text colors, and per-layout-type overrides
|
|
66
|
+
- **Footer** - Footer zones, backgrounds, text colors
|
|
67
|
+
- **Search** - Search input, button, and dropdown styling
|
|
68
|
+
- **Buttons** - Primary, secondary, neutral, and danger button variants (solid, outline, ghost)
|
|
69
|
+
- **Cards** - Default, elevated, bordered, and minimal card variants
|
|
70
|
+
- **Elements** - Hero, heading, body text, form, product card, gallery, modal, and more
|
|
71
|
+
- **Widgets** - Account, cart, logo, language, currency, announcement, newsletter, social, links, text, payment, trust badges, contact
|
|
41
72
|
|
|
42
|
-
|
|
73
|
+
Edit `tokens.json` to customize any of these values. The platform converts tokens into CSS custom properties automatically.
|
|
74
|
+
|
|
75
|
+
### Header & Footer Presets
|
|
43
76
|
|
|
44
|
-
|
|
77
|
+
The `presets/` directory contains default header and footer configurations:
|
|
45
78
|
|
|
46
|
-
|
|
79
|
+
- **header.json** - Defines the header layout type, sticky behavior, zone layout, and widget placements
|
|
80
|
+
- **footer.json** - Defines the footer layout type, zone layout, and widget placements
|
|
47
81
|
|
|
48
|
-
|
|
49
|
-
- `manifest.json` - Component configuration
|
|
50
|
-
- `template.html` - Component template
|
|
51
|
-
- `schema.json` - Component settings schema
|
|
52
|
-
- `styles.css` - Component styles (optional)
|
|
82
|
+
These presets are applied when a merchant activates your theme, giving them a ready-to-use layout that matches your design vision.
|
|
53
83
|
|
|
54
|
-
###
|
|
84
|
+
### Custom CSS (Optional)
|
|
55
85
|
|
|
56
|
-
|
|
86
|
+
For advanced customization beyond tokens, add a `css/theme.css` file. This CSS is loaded after the token-generated styles and can override specific rules.
|
|
57
87
|
|
|
58
88
|
## Support
|
|
59
89
|
|
|
File without changes
|
|
@@ -1,40 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{themeName}}",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
+
"sdk_version": "2.0",
|
|
4
5
|
"display_name": "{{displayName}}",
|
|
5
6
|
"description": "{{description}}",
|
|
6
7
|
"author": "{{author}}",
|
|
7
8
|
"license": "{{license}}",
|
|
8
|
-
"
|
|
9
|
-
{
|
|
10
|
-
"type": "header",
|
|
11
|
-
"name": "default_header",
|
|
12
|
-
"path": "components/headers/default_header"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "footer",
|
|
16
|
-
"name": "default_footer",
|
|
17
|
-
"path": "components/footers/default_footer"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"type": "section",
|
|
21
|
-
"name": "hero_section",
|
|
22
|
-
"path": "components/sections/hero_section"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"page_schemas": {
|
|
26
|
-
"home": "pages/home.json",
|
|
27
|
-
"product": "pages/product.json",
|
|
28
|
-
"collection": "pages/collection.json",
|
|
29
|
-
"cart": "pages/cart.json"
|
|
30
|
-
},
|
|
31
|
-
"design_tokens": "design_tokens.json",
|
|
9
|
+
"min_platform_version": "2.0.0",
|
|
32
10
|
"tags": ["ecommerce", "modern"],
|
|
33
11
|
"categories": ["general"],
|
|
34
12
|
"features": [
|
|
35
13
|
"Responsive design",
|
|
36
|
-
"
|
|
37
|
-
"Customizable
|
|
38
|
-
|
|
39
|
-
|
|
14
|
+
"Mobile-first",
|
|
15
|
+
"Customizable via design tokens"
|
|
16
|
+
],
|
|
17
|
+
"preview_image": "preview.png"
|
|
40
18
|
}
|