generator-chisel 2.0.0-alpha.9 → 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 +53 -0
- package/bin/chisel.js +6 -0
- package/lib/commands/create/Creator.js +6 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/.gitignore.chisel-tpl +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/.nvmrc +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/404.php +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/README.md +37 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/acf-json/group_6772609e3c28c.json +83 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/acf-json/group_6772615562fb4.json +49 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/archive.php +2 -4
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/block.json +31 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/edit.js +35 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/editor.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/index.js +45 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/save.js +20 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/script.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/style.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/view.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/view.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/block.json +32 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/edit.js +33 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/editor.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/index.js +45 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/render.php +12 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/render.twig +5 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/save.js +6 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/script.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/style.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/view.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/view.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/block.json +36 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/critical.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/editor.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/example.twig +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/index.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/init.php +0 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/script.js +8 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/style.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/view.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/view.scss +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/arrow-left.svg +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/arrow-right.svg +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/chisel-icon.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/chisel-logo.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/close-line.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/chisel-icon.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/chisel-logo.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/facebook-logo.svg +10 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/instagram-logo.svg +14 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/x-logo.svg +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/author.php +3 -4
- package/lib/commands/create/creators/app/chisel-starter-theme/composer.json +3 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/footer.php +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/functions.php +18 -24
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Factory/RegisterAcfOptionsPage.php +62 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Factory}/RegisterBlocks.php +53 -22
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Factory/RegisterCustomPostType.php +211 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Factory/RegisterCustomTaxonomy.php +174 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/AcfHelpers.php +46 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/AjaxHelpers.php +33 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/AssetsHelpers.php +28 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/BlocksHelpers.php +118 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/CacheHelpers.php +41 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/CommentsHelpers.php +26 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/DataHelpers.php +35 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/GravityFormsHelpers.php +65 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/ImageHelpers.php +102 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/Helpers.php → inc/Helper/ThemeHelpers.php} +53 -93
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/WoocommerceHelpers.php +72 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Helper/YoastHelpers.php +37 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/interfaces/Instance.php → inc/Interfaces/HooksInterface.php} +3 -8
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Interfaces/InstanceInterface.php +16 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Module}/AcfSync.php +13 -20
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Module}/Ajax.php +16 -41
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Plugin}/GravityForms.php +15 -72
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Plugin}/Woocommerce.php +26 -80
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Plugin/Yoast.php +46 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Traits/PageBlocks.php +92 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/Traits/Singleton.php +23 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/Acf.php +118 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/AcfBlocks.php +62 -61
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/AjaxEnpoints.php +6 -6
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Assets.php +258 -119
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Blocks.php +63 -51
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/Cache.php +103 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/ExtendedImage.php → inc/WP/ChiselImage.php} +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/ExtendedPost.php → inc/WP/ChiselPost.php} +4 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/ExtendedProduct.php → inc/WP/ChiselProduct.php} +4 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes/ExtendedTerm.php → inc/WP/ChiselTerm.php} +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Comments.php +10 -32
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Components.php +61 -36
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/CustomPostTypes.php +124 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/CustomTaxonomies.php +129 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Sidebars.php +11 -17
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Site.php +15 -21
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Theme.php +22 -15
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/WP}/Twig.php +34 -21
- package/lib/commands/create/creators/app/chisel-starter-theme/index.php +2 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/package.chisel-tpl.json +5 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/page.php +3 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/phpcs.xml +5 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/search.php +3 -4
- package/lib/commands/create/creators/app/chisel-starter-theme/single.php +3 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks/accordion/accordion-item.js +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks/accordion/style.scss +12 -5
- package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/acf-json/group_66462c70b851f.json +107 -105
- package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/block.json +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/slider.twig +4 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/src/design/settings/_index.scss +2 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_buttons.scss +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_icon.scss +39 -7
- package/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_index.scss +1 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_layout.scss +11 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/admin/acf.js +65 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/app.js +2 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/blocks.js +10 -4
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/mods/core-button.js +13 -9
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/utils.js +0 -12
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/modules/loaded.js +7 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/admin.scss +2 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-button.scss +14 -13
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_buttons.scss +14 -13
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_icons-preview.scss +97 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_main-nav.scss +19 -9
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_posts-items.scss +6 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_icon.scss +51 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_layout.scss +0 -13
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-admin/_acf.scss +29 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-admin/_index.scss +4 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/style.chisel-tpl.css +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/base.twig +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/header.twig +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/{partials → components}/logo.twig +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/main-nav-item.twig +2 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/main-nav.twig +5 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/pagination.twig +70 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/slider.twig +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/{partials → components}/the-title.twig +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/index.twig +10 -5
- package/lib/commands/create/creators/app/chisel-starter-theme/views/objects/icon.twig +37 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/views/partials/icons-preview.twig +81 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/views/sidebar-blog.twig +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/sidebar-woocommerce.twig +1 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/single.twig +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/woocommerce/archive-product.twig +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/woocommerce/linked-products.twig +2 -2
- package/lib/commands/create/creators/app/chisel-starter-theme/views/woocommerce/single-product.twig +4 -4
- package/lib/commands/create/creators/app/chisel-starter-theme/woocommerce.php +6 -6
- package/lib/commands/create/creators/app/index.js +74 -20
- package/lib/commands/create/creators/app/template/.devcontainer/Dockerfile +21 -0
- package/lib/commands/create/creators/app/template/.devcontainer/compose.chisel-tpl +3 -0
- package/lib/commands/create/creators/app/template/.devcontainer/devcontainer.json.chisel-tpl +31 -0
- package/lib/commands/create/creators/app/template/.devcontainer/docker-compose.yml.chisel-tpl +40 -0
- package/lib/commands/create/creators/app/template/.devcontainer/exec +8 -0
- package/lib/commands/create/creators/app/template/.devcontainer/post-create-command.sh.chisel-tpl +24 -0
- package/lib/commands/create/creators/devcontainer.js +62 -0
- package/lib/commands/create/creators/utils.js +58 -0
- package/lib/commands/create/creators/wp/index.js +24 -3
- package/lib/commands/create/creators/wp-plugins/plugins.json +1 -1
- package/lib/commands/create/index.js +9 -2
- package/lib/commands/create/packages-versions.js +3 -3
- package/package.json +3 -3
- package/lib/commands/create/creators/app/chisel-starter-theme/classes/Acf.php +0 -188
- package/lib/commands/create/creators/app/chisel-starter-theme/classes/ChiselCache.php +0 -87
- package/lib/commands/create/creators/app/chisel-starter-theme/classes/CustomPostTypes.php +0 -444
- package/lib/commands/create/creators/app/chisel-starter-theme/classes/Yoast.php +0 -78
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_icon.scss +0 -19
- package/lib/commands/create/creators/app/chisel-starter-theme/views/components/icon.twig +0 -1
- package/lib/commands/create/creators/app/chisel-starter-theme/views/partials/pagination.twig +0 -70
- /package/lib/commands/create/creators/app/chisel-starter-theme/assets/icons/{loader.svg → animated/loader.svg} +0 -0
- /package/lib/commands/create/creators/app/chisel-starter-theme/assets/{icons → icons-source}/minus.svg +0 -0
- /package/lib/commands/create/creators/app/chisel-starter-theme/assets/{icons → icons-source}/plus.svg +0 -0
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* @package Chisel
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
use Chisel\
|
|
8
|
+
use Chisel\Helper\CacheHelpers;
|
|
9
9
|
use Timber\Timber;
|
|
10
10
|
|
|
11
|
-
$context
|
|
12
|
-
$context['posts'] = Timber::get_posts();
|
|
11
|
+
$context = Timber::context();
|
|
13
12
|
|
|
14
|
-
Timber::render( array( 'search.twig', 'archive.twig', 'index.twig' ), $context,
|
|
13
|
+
Timber::render( array( 'search.twig', 'archive.twig', 'index.twig' ), $context, CacheHelpers::expiry() );
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @package Chisel
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
use Chisel\
|
|
8
|
+
use Chisel\Helper\CacheHelpers;
|
|
9
9
|
use Timber\Timber;
|
|
10
10
|
|
|
11
11
|
$context = Timber::context();
|
|
@@ -13,7 +13,7 @@ $context = Timber::context();
|
|
|
13
13
|
$timber_post = Timber::get_post();
|
|
14
14
|
|
|
15
15
|
if ( post_password_required( $timber_post->ID ) ) {
|
|
16
|
-
Timber::render( 'single-password.twig', $context,
|
|
16
|
+
Timber::render( 'single-password.twig', $context, CacheHelpers::expiry() );
|
|
17
17
|
} else {
|
|
18
|
-
Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single.twig' ), $context,
|
|
18
|
+
Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single.twig' ), $context, CacheHelpers::expiry() );
|
|
19
19
|
}
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks/accordion/accordion-item.js
CHANGED
|
@@ -66,8 +66,8 @@ registerBlockType('chisel/accordion-item', {
|
|
|
66
66
|
<RichText.Content tagName={titleTag} className="b-accordion__item-title" value={title} />
|
|
67
67
|
|
|
68
68
|
<span className="b-accordion__icons" aria-hidden="true">
|
|
69
|
-
<i className="
|
|
70
|
-
<i className="
|
|
69
|
+
<i className="o-icon is-css o-icon--icon-plus"></i>
|
|
70
|
+
<i className="o-icon is-css o-icon--icon-minus"></i>
|
|
71
71
|
</span>
|
|
72
72
|
</summary>
|
|
73
73
|
<div className="b-accordion__item-content js-accordion-content">
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks/accordion/style.scss
CHANGED
|
@@ -57,24 +57,31 @@
|
|
|
57
57
|
height: px-rem(24);
|
|
58
58
|
margin-left: get-margin('small');
|
|
59
59
|
|
|
60
|
-
.
|
|
60
|
+
.o-icon {
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
61
63
|
color: get-color('black');
|
|
64
|
+
|
|
65
|
+
&::before {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
.
|
|
71
|
+
.o-icon--icon-plus {
|
|
65
72
|
display: block;
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
.
|
|
75
|
+
.o-icon--icon-minus {
|
|
69
76
|
display: none;
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
.b-accordion__item[open] & {
|
|
73
|
-
.
|
|
80
|
+
.o-icon--icon-plus {
|
|
74
81
|
display: none;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
|
-
.
|
|
84
|
+
.o-icon--icon-minus {
|
|
78
85
|
display: block;
|
|
79
86
|
}
|
|
80
87
|
}
|
|
@@ -2,121 +2,123 @@
|
|
|
2
2
|
"key": "group_66462c70b851f",
|
|
3
3
|
"title": "ACF Block: Slider",
|
|
4
4
|
"fields": [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"key": "field_66d59458044f8",
|
|
25
|
-
"label": "Slides",
|
|
26
|
-
"name": "acf_block_slider_slides",
|
|
27
|
-
"aria-label": "",
|
|
28
|
-
"type": "repeater",
|
|
29
|
-
"instructions": "",
|
|
30
|
-
"required": 0,
|
|
31
|
-
"conditional_logic": 0,
|
|
32
|
-
"wrapper": {
|
|
33
|
-
"width": "",
|
|
34
|
-
"class": "",
|
|
35
|
-
"id": ""
|
|
5
|
+
{
|
|
6
|
+
"key": "field_66d5a59049a33",
|
|
7
|
+
"label": "Slides",
|
|
8
|
+
"name": "",
|
|
9
|
+
"aria-label": "",
|
|
10
|
+
"type": "accordion",
|
|
11
|
+
"instructions": "",
|
|
12
|
+
"required": 0,
|
|
13
|
+
"conditional_logic": 0,
|
|
14
|
+
"wrapper": {
|
|
15
|
+
"width": "",
|
|
16
|
+
"class": "",
|
|
17
|
+
"id": ""
|
|
18
|
+
},
|
|
19
|
+
"open": 1,
|
|
20
|
+
"multi_expand": 1,
|
|
21
|
+
"endpoint": 0
|
|
36
22
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"collapsed": "",
|
|
42
|
-
"button_label": "Add a new slide",
|
|
43
|
-
"rows_per_page": 20,
|
|
44
|
-
"sub_fields": [
|
|
45
|
-
{
|
|
46
|
-
"key": "field_66d5946c044f9",
|
|
47
|
-
"label": "Image",
|
|
48
|
-
"name": "acf_bs_image",
|
|
23
|
+
{
|
|
24
|
+
"key": "field_66d59458044f8",
|
|
25
|
+
"label": "Slides",
|
|
26
|
+
"name": "acf_block_slider_slides",
|
|
49
27
|
"aria-label": "",
|
|
50
|
-
"type": "
|
|
28
|
+
"type": "repeater",
|
|
51
29
|
"instructions": "",
|
|
52
30
|
"required": 0,
|
|
53
31
|
"conditional_logic": 0,
|
|
54
32
|
"wrapper": {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
33
|
+
"width": "",
|
|
34
|
+
"class": "",
|
|
35
|
+
"id": ""
|
|
58
36
|
},
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
37
|
+
"layout": "block",
|
|
38
|
+
"pagination": 0,
|
|
39
|
+
"min": 0,
|
|
40
|
+
"max": 0,
|
|
41
|
+
"collapsed": "",
|
|
42
|
+
"button_label": "Add a new slide",
|
|
43
|
+
"rows_per_page": 20,
|
|
44
|
+
"sub_fields": [
|
|
45
|
+
{
|
|
46
|
+
"key": "field_66d5946c044f9",
|
|
47
|
+
"label": "Image",
|
|
48
|
+
"name": "acf_bs_image",
|
|
49
|
+
"aria-label": "",
|
|
50
|
+
"type": "image",
|
|
51
|
+
"instructions": "",
|
|
52
|
+
"required": 0,
|
|
53
|
+
"conditional_logic": 0,
|
|
54
|
+
"wrapper": {
|
|
55
|
+
"width": "",
|
|
56
|
+
"class": "",
|
|
57
|
+
"id": ""
|
|
58
|
+
},
|
|
59
|
+
"return_format": "id",
|
|
60
|
+
"library": "all",
|
|
61
|
+
"min_width": "",
|
|
62
|
+
"min_height": "",
|
|
63
|
+
"min_size": "",
|
|
64
|
+
"max_width": "",
|
|
65
|
+
"max_height": "",
|
|
66
|
+
"max_size": "",
|
|
67
|
+
"mime_types": "",
|
|
68
|
+
"preview_size": "medium",
|
|
69
|
+
"parent_repeater": "field_66d59458044f8"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
86
72
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
73
|
+
{
|
|
74
|
+
"key": "field_66d5a7c561dab",
|
|
75
|
+
"label": "Settings",
|
|
76
|
+
"name": "",
|
|
77
|
+
"aria-label": "",
|
|
78
|
+
"type": "accordion",
|
|
79
|
+
"instructions": "",
|
|
80
|
+
"required": 0,
|
|
81
|
+
"conditional_logic": 0,
|
|
82
|
+
"wrapper": {
|
|
83
|
+
"width": "",
|
|
84
|
+
"class": "",
|
|
85
|
+
"id": ""
|
|
86
|
+
},
|
|
87
|
+
"open": 1,
|
|
88
|
+
"multi_expand": 1,
|
|
89
|
+
"endpoint": 0
|
|
104
90
|
},
|
|
105
|
-
"clone": ["group_66d5a4ebb41cd"],
|
|
106
|
-
"display": "seamless",
|
|
107
|
-
"layout": "block",
|
|
108
|
-
"prefix_label": 0,
|
|
109
|
-
"prefix_name": 1
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"location": [
|
|
113
|
-
[
|
|
114
91
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
92
|
+
"key": "field_66d5a56e49a32",
|
|
93
|
+
"label": "Settings",
|
|
94
|
+
"name": "slider_options",
|
|
95
|
+
"aria-label": "",
|
|
96
|
+
"type": "clone",
|
|
97
|
+
"instructions": "",
|
|
98
|
+
"required": 0,
|
|
99
|
+
"conditional_logic": 0,
|
|
100
|
+
"wrapper": {
|
|
101
|
+
"width": "",
|
|
102
|
+
"class": "",
|
|
103
|
+
"id": ""
|
|
104
|
+
},
|
|
105
|
+
"clone": [
|
|
106
|
+
"group_66d5a4ebb41cd"
|
|
107
|
+
],
|
|
108
|
+
"display": "seamless",
|
|
109
|
+
"layout": "block",
|
|
110
|
+
"prefix_label": 0,
|
|
111
|
+
"prefix_name": 1
|
|
118
112
|
}
|
|
119
|
-
|
|
113
|
+
],
|
|
114
|
+
"location": [
|
|
115
|
+
[
|
|
116
|
+
{
|
|
117
|
+
"param": "block",
|
|
118
|
+
"operator": "==",
|
|
119
|
+
"value": "chisel\/slider"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
120
122
|
],
|
|
121
123
|
"menu_order": 0,
|
|
122
124
|
"position": "normal",
|
|
@@ -127,5 +129,5 @@
|
|
|
127
129
|
"active": true,
|
|
128
130
|
"description": "",
|
|
129
131
|
"show_in_rest": 0,
|
|
130
|
-
"modified":
|
|
132
|
+
"modified": 1735547820
|
|
131
133
|
}
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/slider.twig
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% set slides_html = '' %}
|
|
2
|
+
{% set has_thumbnails_nav = 'thumbnails' in fields.slider_options.slider_settings %}
|
|
2
3
|
|
|
3
4
|
<div {{ wrapper_attributes }} data-block-id="{{ block.id }}">
|
|
4
5
|
<div class="b-slider__inner alignfull">
|
|
@@ -7,8 +8,9 @@
|
|
|
7
8
|
{% if slide.acf_bs_image %}
|
|
8
9
|
{% set slides_html %}
|
|
9
10
|
{{ slides_html }}
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
<div class="b-slider__slide swiper-slide" {% if has_thumbnails_nav %}data-thumbnail-url="{{ get_image(slide.acf_bs_image).src('medium') }}"{% endif %}>
|
|
13
|
+
{{ get_responsive_image(slide.acf_bs_image, 'large', {fetchpriority: loop.first ? 'high' : 'auto'}) }}
|
|
12
14
|
</div>
|
|
13
15
|
{% endset %}
|
|
14
16
|
{% endif %}
|
|
@@ -1,11 +1,43 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../settings/icon-settings' as *;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
@mixin icon-svg($name, $multicolor: false, $animated: false) {
|
|
5
|
+
display: block;
|
|
6
|
+
height: 1em;
|
|
7
|
+
line-height: 1em;
|
|
8
|
+
content: '';
|
|
9
|
+
|
|
10
|
+
$icons-path: '../../assets/icons';
|
|
11
|
+
|
|
12
|
+
@if $multicolor {
|
|
13
|
+
background-image: url('#{$icons-path}/icons.svg#icon-#{$name}-view');
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
|
+
background-size: contain;
|
|
16
|
+
} @else {
|
|
17
|
+
background-color: var(--o-icon-color, currentcolor);
|
|
18
|
+
@if $animated {
|
|
19
|
+
mask: url('#{$icons-path}/animated/#{$name}.svg');
|
|
20
|
+
} @else {
|
|
21
|
+
mask: url('#{$icons-path}/icons.svg#icon-#{$name}-view');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
mask-repeat: no-repeat;
|
|
25
|
+
mask-size: contain;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if map.has-key($o-icon-icons, 'icon-#{$name}') {
|
|
29
|
+
width: map.get($o-icon-icons, 'icon-#{$name}') * 1em;
|
|
30
|
+
} @else {
|
|
31
|
+
width: 1em;
|
|
6
32
|
}
|
|
33
|
+
}
|
|
7
34
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
35
|
+
@mixin icon($name, $multicolor: false, $animated: false) {
|
|
36
|
+
height: 1em;
|
|
37
|
+
font-size: var(--o-icon-size, 1em);
|
|
38
|
+
line-height: 1em;
|
|
39
|
+
|
|
40
|
+
&::before {
|
|
41
|
+
@include icon-svg($name, $multicolor, $animated);
|
|
42
|
+
}
|
|
11
43
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@function get-flex-col-width($column_no, $layout-gutter) {
|
|
2
|
+
$layout-col-width: calc(((100 / 12) * $column_no) * 1%);
|
|
3
|
+
$layout-gap-divider: calc(12 / $column_no);
|
|
4
|
+
$layout-gutter-width: calc($layout-gutter - ($layout-gutter / $layout-gap-divider));
|
|
5
|
+
|
|
6
|
+
@if $column_no == 12 {
|
|
7
|
+
$layout-gutter-width: 0%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@return calc($layout-col-width - $layout-gutter-width);
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* global acf, chiselAdminScripts */
|
|
1
|
+
/* global acf, chiselAdminScripts, jQuery */
|
|
2
2
|
|
|
3
3
|
class ACF {
|
|
4
4
|
constructor() {
|
|
@@ -8,6 +8,16 @@ class ACF {
|
|
|
8
8
|
|
|
9
9
|
this.acf = acf;
|
|
10
10
|
|
|
11
|
+
this.megaMenuData = {
|
|
12
|
+
field: null,
|
|
13
|
+
radios: [],
|
|
14
|
+
submenuFields: [],
|
|
15
|
+
submenuFieldsSelector:
|
|
16
|
+
'.menu-item-depth-0 .acf-field[data-name="mega_menu_default_dropdown"]',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
this.megaMenuFields();
|
|
20
|
+
|
|
11
21
|
this.acf.addAction('ready', () => {
|
|
12
22
|
this.customColorsPalette();
|
|
13
23
|
});
|
|
@@ -22,6 +32,60 @@ class ACF {
|
|
|
22
32
|
return newArgs;
|
|
23
33
|
});
|
|
24
34
|
}
|
|
35
|
+
|
|
36
|
+
megaMenuFields() {
|
|
37
|
+
jQuery(document).on('menu-item-added', (event) => {
|
|
38
|
+
console.log('menu-item-added', event);
|
|
39
|
+
this.megaMenuData.submenuFields = document.querySelectorAll(
|
|
40
|
+
this.megaMenuData.submenuFieldsSelector,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
this.setupMegaMenuSubmenuFields();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
this.acf.addAction('ready_field/name=mega_menu_enable', (field) => {
|
|
47
|
+
this.megaMenuData = {
|
|
48
|
+
...this.megaMenuData,
|
|
49
|
+
field: field.$el[0],
|
|
50
|
+
submenuFields: document.querySelectorAll(this.megaMenuData.submenuFieldsSelector),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
this.megaMenuData.radios = this.megaMenuData.field.querySelectorAll('input[type="radio"]');
|
|
54
|
+
|
|
55
|
+
this.setupMegaMenuSubmenuFields(true);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
setupMegaMenuSubmenuFields(registerChangeEvent = false) {
|
|
60
|
+
let isYes = false;
|
|
61
|
+
|
|
62
|
+
this.megaMenuData.radios.forEach((radio) => {
|
|
63
|
+
const value = radio.checked ? radio.value : 'no';
|
|
64
|
+
|
|
65
|
+
if (value === 'yes') {
|
|
66
|
+
isYes = true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (registerChangeEvent) {
|
|
70
|
+
radio.addEventListener('change', () => {
|
|
71
|
+
const value = radio.checked ? radio.value : 'no';
|
|
72
|
+
this.toggleMegaMenuSubmenuFields(value);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
this.toggleMegaMenuSubmenuFields(isYes ? 'yes' : 'no');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
toggleMegaMenuSubmenuFields(value) {
|
|
81
|
+
this.megaMenuData.submenuFields.forEach((field) => {
|
|
82
|
+
if (value === 'yes') {
|
|
83
|
+
field.classList.remove('acf-hidden');
|
|
84
|
+
} else {
|
|
85
|
+
field.classList.add('acf-hidden');
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
25
89
|
}
|
|
26
90
|
|
|
27
91
|
export default new ACF();
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import loaded from './modules/loaded';
|
|
1
2
|
import scrollbarWidth from './modules/scrollbar-width';
|
|
2
3
|
import MainNav from './modules/main-nav';
|
|
3
4
|
import LoadMore from './modules/load-more';
|
|
4
5
|
import Slider from './modules/slider';
|
|
5
6
|
|
|
7
|
+
loaded();
|
|
6
8
|
scrollbarWidth();
|
|
7
9
|
new MainNav();
|
|
8
10
|
new LoadMore();
|
|
@@ -13,10 +13,16 @@ class Blocks {
|
|
|
13
13
|
|
|
14
14
|
if (blockInspector) {
|
|
15
15
|
const blockNameClassName = selectedBlock.name.replace('/', '-');
|
|
16
|
-
blockInspector.classList
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
)
|
|
16
|
+
const currentClassNames = blockInspector.classList;
|
|
17
|
+
const blockClassName = `e-block-sidebar--${blockNameClassName}`;
|
|
18
|
+
|
|
19
|
+
currentClassNames.forEach((className) => {
|
|
20
|
+
if (className.includes('e-block-sidebar')) {
|
|
21
|
+
blockInspector.classList.remove(className);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
blockInspector.classList.add('e-block-sidebar', blockClassName);
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
});
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/mods/core-button.js
CHANGED
|
@@ -19,8 +19,6 @@ const buttonIcons = [
|
|
|
19
19
|
},
|
|
20
20
|
...Utils.generateIconsChoices(),
|
|
21
21
|
];
|
|
22
|
-
const buttonSizesClassNamesRegex = Utils.generateClassNamesRegex(buttonSizes, 'is-size');
|
|
23
|
-
const buttonIconsClassNamesRegex = Utils.generateClassNamesRegex(buttonIcons, 'has-icon');
|
|
24
22
|
|
|
25
23
|
// Add Custom Attributes
|
|
26
24
|
const chiselButtonBlockAttributes = (settings, name) => {
|
|
@@ -62,6 +60,11 @@ const chiselButtonCustomControls = createHigherOrderComponent((BlockEdit) => {
|
|
|
62
60
|
buttonIconPosition = false,
|
|
63
61
|
} = attributes;
|
|
64
62
|
|
|
63
|
+
const prev = {
|
|
64
|
+
buttonSize,
|
|
65
|
+
buttonIcon,
|
|
66
|
+
};
|
|
67
|
+
|
|
65
68
|
useEffect(() => {
|
|
66
69
|
if (isSelected && className !== '') {
|
|
67
70
|
const attrs = {};
|
|
@@ -69,11 +72,11 @@ const chiselButtonCustomControls = createHigherOrderComponent((BlockEdit) => {
|
|
|
69
72
|
const icon = className.match(/has-icon-(\w*)/);
|
|
70
73
|
const iconLeft = className.match('has-icon-left');
|
|
71
74
|
|
|
72
|
-
if (icon.length) {
|
|
75
|
+
if (icon &&icon.length) {
|
|
73
76
|
attrs.buttonIcon = icon[1];
|
|
74
77
|
}
|
|
75
78
|
|
|
76
|
-
if (size.length) {
|
|
79
|
+
if (size && size.length) {
|
|
77
80
|
attrs.buttonSize = size[1];
|
|
78
81
|
}
|
|
79
82
|
|
|
@@ -97,10 +100,11 @@ const chiselButtonCustomControls = createHigherOrderComponent((BlockEdit) => {
|
|
|
97
100
|
options={buttonSizes}
|
|
98
101
|
value={buttonSize}
|
|
99
102
|
onChange={(value) => {
|
|
100
|
-
|
|
103
|
+
const prevClassname = `is-size-${prev.buttonSize}`;
|
|
104
|
+
className = className.replace(prevClassname, '').trim();
|
|
101
105
|
|
|
102
106
|
if (value) {
|
|
103
|
-
className += `
|
|
107
|
+
className += ` is-size-${value}`;
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
setAttributes({
|
|
@@ -116,11 +120,11 @@ const chiselButtonCustomControls = createHigherOrderComponent((BlockEdit) => {
|
|
|
116
120
|
options={buttonIcons}
|
|
117
121
|
value={buttonIcon}
|
|
118
122
|
onChange={(value) => {
|
|
119
|
-
|
|
120
|
-
className = className.replace(
|
|
123
|
+
const prevClassname = `has-icon has-icon-${prev.buttonIcon}`;
|
|
124
|
+
className = className.replace(prevClassname, '').trim();
|
|
121
125
|
|
|
122
126
|
if (value) {
|
|
123
|
-
className += ` has-icon
|
|
127
|
+
className += ` has-icon has-icon-${value}`;
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
setAttributes({
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
/* global chiselEditorScripts */
|
|
2
2
|
|
|
3
3
|
class Utils {
|
|
4
|
-
generateClassNamesRegex = (options, classPrefix) => {
|
|
5
|
-
const classNames = options
|
|
6
|
-
.map((option) => option.value)
|
|
7
|
-
.filter((className) => className !== '');
|
|
8
|
-
|
|
9
|
-
return new RegExp(`${classPrefix}-(${classNames.join('|')})`, 'gi');
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
prepareClassName = (className, classNames) => {
|
|
13
|
-
return className.replace(classNames, '').trim().replace('/[ ]{2,}/g', ' ');
|
|
14
|
-
};
|
|
15
|
-
|
|
16
4
|
generateIconsChoices = () => {
|
|
17
5
|
const icons = chiselEditorScripts?.icons || null;
|
|
18
6
|
|