generator-chisel 2.0.0-alpha.9 → 2.1.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 +58 -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/{classes/Ajax.php → inc/Controllers/AjaxController.php} +16 -41
- 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/Plugin}/GravityForms.php +15 -72
- package/lib/commands/create/creators/app/chisel-starter-theme/{classes → inc/Plugin}/Woocommerce.php +54 -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 +125 -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/inc/WP/ChiselProduct.php +66 -0
- package/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/ChiselProductCategory.php +66 -0
- 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 +16 -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/twig_cs.php +2 -2
- 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 +10 -6
- package/lib/commands/create/creators/app/chisel-starter-theme/views/woocommerce/content-product-cat.twig +42 -0
- 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 +25 -15
- 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 +25 -3
- package/lib/commands/create/creators/wp-plugins/index.js +1 -0
- package/lib/commands/create/creators/wp-plugins/plugins.json +3 -2
- 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/AcfSync.php +0 -230
- 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/ExtendedProduct.php +0 -41
- package/lib/commands/create/creators/app/chisel-starter-theme/classes/Yoast.php +0 -78
- package/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/acf-sync.js +0 -26
- package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/acf-sync.scss +0 -64
- 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
|
@@ -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
|
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-button.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '~design' as *;
|
|
2
2
|
@use '../../design/settings';
|
|
3
3
|
|
|
4
|
-
$
|
|
4
|
+
$_static-icons: settings.$static-icons;
|
|
5
5
|
|
|
6
6
|
.wp-block-button {
|
|
7
7
|
.wp-block-button__link {
|
|
@@ -86,6 +86,15 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
86
86
|
@include button-large;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
@each $icon in $_static-icons {
|
|
90
|
+
&.has-icon-#{$icon} .wp-block-button__link {
|
|
91
|
+
&::after,
|
|
92
|
+
&::before {
|
|
93
|
+
@include icon-svg($icon);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
89
98
|
&.has-icon {
|
|
90
99
|
.wp-block-button__link {
|
|
91
100
|
@include button-icon;
|
|
@@ -103,7 +112,8 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
103
112
|
display: block;
|
|
104
113
|
width: px-rem(24);
|
|
105
114
|
height: px-rem(24);
|
|
106
|
-
margin-
|
|
115
|
+
margin-right: px-rem(-6);
|
|
116
|
+
margin-left: px-rem(6);
|
|
107
117
|
content: '';
|
|
108
118
|
}
|
|
109
119
|
|
|
@@ -115,8 +125,8 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
115
125
|
&.has-icon-left .wp-block-button__link {
|
|
116
126
|
&::before {
|
|
117
127
|
display: block;
|
|
118
|
-
margin-right: px-rem(
|
|
119
|
-
margin-left:
|
|
128
|
+
margin-right: px-rem(6);
|
|
129
|
+
margin-left: px-rem(-6);
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
&::after {
|
|
@@ -124,13 +134,4 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
124
134
|
}
|
|
125
135
|
}
|
|
126
136
|
}
|
|
127
|
-
|
|
128
|
-
@each $button-icon in $_buttons-icons {
|
|
129
|
-
&.has-icon-#{$button-icon} .wp-block-button__link {
|
|
130
|
-
&::after,
|
|
131
|
-
&::before {
|
|
132
|
-
@include get-icon($button-icon);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
137
|
}
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_buttons.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '~design' as *;
|
|
2
2
|
@use '../../design/settings';
|
|
3
3
|
|
|
4
|
-
$
|
|
4
|
+
$_static-icons: settings.$static-icons;
|
|
5
5
|
|
|
6
6
|
.c-btn {
|
|
7
7
|
@include button;
|
|
@@ -84,6 +84,15 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
84
84
|
@include button-large;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
@each $icon in $_static-icons {
|
|
88
|
+
.c-btn.has-icon-#{$icon} {
|
|
89
|
+
&::after,
|
|
90
|
+
&::before {
|
|
91
|
+
@include icon-svg($icon);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
87
96
|
.c-btn.has-icon {
|
|
88
97
|
@include button-icon;
|
|
89
98
|
|
|
@@ -100,7 +109,8 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
100
109
|
display: block;
|
|
101
110
|
width: px-rem(24);
|
|
102
111
|
height: px-rem(24);
|
|
103
|
-
margin-
|
|
112
|
+
margin-right: px-rem(-6);
|
|
113
|
+
margin-left: px-rem(6);
|
|
104
114
|
content: '';
|
|
105
115
|
}
|
|
106
116
|
|
|
@@ -111,8 +121,8 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
111
121
|
&.has-icon-left {
|
|
112
122
|
&::before {
|
|
113
123
|
display: block;
|
|
114
|
-
margin-right: px-rem(
|
|
115
|
-
margin-left:
|
|
124
|
+
margin-right: px-rem(6);
|
|
125
|
+
margin-left: px-rem(-6);
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
&::after {
|
|
@@ -120,12 +130,3 @@ $_buttons-icons: settings.$buttons-icons;
|
|
|
120
130
|
}
|
|
121
131
|
}
|
|
122
132
|
}
|
|
123
|
-
|
|
124
|
-
@each $button-icon in $_buttons-icons {
|
|
125
|
-
.c-btn.has-icon-#{$button-icon} {
|
|
126
|
-
&::after,
|
|
127
|
-
&::before {
|
|
128
|
-
@include get-icon($button-icon);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use '~design' as *;
|
|
2
|
+
|
|
3
|
+
.c-icons-preview {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.c-icons-preview__h4 {
|
|
9
|
+
font-size: 1.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.c-icons-preview__article {
|
|
13
|
+
margin: 2rem 0;
|
|
14
|
+
background: rgba(0,0,0, 2%);
|
|
15
|
+
padding: 1rem;
|
|
16
|
+
border-radius: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.c-icons-preview__section {
|
|
20
|
+
margin: 1rem 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// CSS Usage of icons
|
|
26
|
+
// -----------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
// Mono
|
|
29
|
+
.c-icons-preview__css-icon1{
|
|
30
|
+
@include icon('chisel-logo');
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.c-icons-preview__css-icon2 {
|
|
35
|
+
@include icon('x-logo');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.c-icons-preview__css-icon3 {
|
|
39
|
+
@include icon('color-pallet');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.c-icons-preview__css-icon4 {
|
|
43
|
+
@include icon('chisel-icon');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.c-icons-preview__css-icon5 {
|
|
47
|
+
@include icon('chisel-icon');
|
|
48
|
+
font-size: 4rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.c-icons-preview__css-icon6 {
|
|
52
|
+
@include icon('chisel-icon');
|
|
53
|
+
background: rgba(0, 0, 255, 20%);
|
|
54
|
+
width: auto;
|
|
55
|
+
height: auto;
|
|
56
|
+
padding: 1rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.c-icons-preview__css-icon7 {
|
|
60
|
+
@include icon('chisel-icon');
|
|
61
|
+
color: green;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.c-icons-preview__css-icon8 {
|
|
65
|
+
@include icon('chisel-icon');
|
|
66
|
+
color: blue;
|
|
67
|
+
--o-icon-color: red;
|
|
68
|
+
--o-icon-size: 2rem;
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Color
|
|
73
|
+
.c-icons-preview__css-color-icon1 {
|
|
74
|
+
@include icon('color-chisel-logo', true);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.c-icons-preview__css-color-icon2 {
|
|
78
|
+
@include icon('color-facebook-logo', true);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.c-icons-preview__css-color-icon3 {
|
|
82
|
+
@include icon('color-chisel-icon', true);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.c-icons-preview__css-color-icon4 {
|
|
86
|
+
@include icon('color-chisel-icon', true);
|
|
87
|
+
font-size: 4rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.c-icons-preview__css-color-icon5 {
|
|
91
|
+
@include icon('color-chisel-icon', true);
|
|
92
|
+
background: rgba(0, 0, 255, 20%);
|
|
93
|
+
width: auto;
|
|
94
|
+
height: auto;
|
|
95
|
+
padding: 1rem;
|
|
96
|
+
}
|
|
97
|
+
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_main-nav.scss
CHANGED
|
@@ -90,12 +90,6 @@
|
|
|
90
90
|
display: none;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
.c-main-nav--columns & {
|
|
95
|
-
@include bp(large) {
|
|
96
|
-
display: none;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
93
|
}
|
|
100
94
|
|
|
101
95
|
.c-main-nav__link {
|
|
@@ -290,15 +284,31 @@
|
|
|
290
284
|
}
|
|
291
285
|
}
|
|
292
286
|
|
|
293
|
-
&.has-
|
|
287
|
+
&.has-1-columns
|
|
288
|
+
.c-main-nav__item:not(.is-default)
|
|
289
|
+
.c-main-nav__subitems.is-level-2
|
|
290
|
+
> .c-main-nav__subitem {
|
|
291
|
+
width: get-flex-col-width(12, get-gap('normal'));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&.has-2-columns
|
|
295
|
+
.c-main-nav__item:not(.is-default)
|
|
296
|
+
.c-main-nav__subitems.is-level-2
|
|
297
|
+
> .c-main-nav__subitem {
|
|
294
298
|
width: get-flex-col-width(6, get-gap('normal'));
|
|
295
299
|
}
|
|
296
300
|
|
|
297
|
-
&.has-3-columns
|
|
301
|
+
&.has-3-columns
|
|
302
|
+
.c-main-nav__item:not(.is-default)
|
|
303
|
+
.c-main-nav__subitems.is-level-2
|
|
304
|
+
> .c-main-nav__subitem {
|
|
298
305
|
width: get-flex-col-width(4, get-gap('normal'));
|
|
299
306
|
}
|
|
300
307
|
|
|
301
|
-
&.has-4-columns
|
|
308
|
+
&.has-4-columns
|
|
309
|
+
.c-main-nav__item:not(.is-default)
|
|
310
|
+
.c-main-nav__subitems.is-level-2
|
|
311
|
+
> .c-main-nav__subitem {
|
|
302
312
|
width: get-flex-col-width(3, get-gap('normal'));
|
|
303
313
|
}
|
|
304
314
|
}
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
background-color: get-color('white');
|
|
14
14
|
border: 1px solid get-color('light-grey');
|
|
15
15
|
border-radius: get-border-radius('small');
|
|
16
|
+
|
|
17
|
+
@include bp(msmall) {
|
|
18
|
+
.c-posts-items--list & {
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
.c-post-item__content {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '~design' as *;
|
|
4
|
+
@use '../../design/settings';
|
|
5
|
+
@use '../../design/settings/icon-settings' as *;
|
|
6
|
+
|
|
7
|
+
$_static-icons: settings.$static-icons;
|
|
8
|
+
$_animated-icons: settings.$animated-icons;
|
|
9
|
+
|
|
10
|
+
.o-icon {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
width: 1em;
|
|
15
|
+
height: 1em;
|
|
16
|
+
font-size: var(--o-icon-size, 1em);
|
|
17
|
+
line-height: 1em;
|
|
18
|
+
|
|
19
|
+
&--color {
|
|
20
|
+
background-repeat: no-repeat;
|
|
21
|
+
background-size: contain;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--mono {
|
|
25
|
+
background-color: var(--o-icon-color, currentcolor);
|
|
26
|
+
mask-repeat: no-repeat;
|
|
27
|
+
mask-size: contain;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--inline {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@each $icon, $width-ratio in $o-icon-icons {
|
|
35
|
+
&--#{$icon} {
|
|
36
|
+
width: $width-ratio * 1em;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@each $static-icon in $_static-icons {
|
|
41
|
+
&--icon-#{$static-icon}.is-css {
|
|
42
|
+
@include icon($static-icon);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@each $animated-icon in $_animated-icons {
|
|
47
|
+
&--icon-#{$animated-icon}.is-css {
|
|
48
|
+
@include icon($animated-icon, false, true);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
package/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_layout.scss
CHANGED
|
@@ -7,17 +7,6 @@ $_layout-columns-no: settings.$layout-columns-no;
|
|
|
7
7
|
$_breakpoints: settings.$breakpoints;
|
|
8
8
|
$_gaps: settings.$gaps;
|
|
9
9
|
|
|
10
|
-
@function get-flex-col-width($column_no, $layout-gutter) {
|
|
11
|
-
$layout-col-width: calc(((100 / 12) * $column_no) * 1%);
|
|
12
|
-
$layout-gutter-width: calc($layout-gutter - ($layout-gutter / $column_no));
|
|
13
|
-
|
|
14
|
-
@if $column_no == 12 {
|
|
15
|
-
$layout-gutter-width: 0%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@return calc($layout-col-width - $layout-gutter-width);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
10
|
.o-layout {
|
|
22
11
|
display: flex;
|
|
23
12
|
flex-flow: row wrap;
|
|
@@ -28,8 +17,6 @@ $_gaps: settings.$gaps;
|
|
|
28
17
|
@each $gap-size in map.keys($map: $_gaps) {
|
|
29
18
|
.has-gap-#{$gap-size} {
|
|
30
19
|
gap: get-gap($gap-size);
|
|
31
|
-
|
|
32
|
-
$layout-gutter: get-gap($gap-size);
|
|
33
20
|
}
|
|
34
21
|
}
|
|
35
22
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use '~design' as *;
|
|
2
|
+
|
|
3
|
+
.acf-color-picker {
|
|
4
|
+
.iris-picker {
|
|
5
|
+
padding-bottom: px-rem(40) !important; // Increase if needed, i.e. when you have more colors.
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.iris-palette-container {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
width: 75%;
|
|
12
|
+
|
|
13
|
+
.iris-palette {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 16px !important;
|
|
16
|
+
height: 16px !important;
|
|
17
|
+
float: none !important;
|
|
18
|
+
margin: 0 2px 2px 0 !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.menu-item {
|
|
24
|
+
&:not(.menu-item-depth-0) {
|
|
25
|
+
.acf-field[data-name='mega_menu_default_dropdown'] {
|
|
26
|
+
display: none !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Theme URI: https://www.getchisel.co/
|
|
4
4
|
* Author: <%= app.author %>
|
|
5
5
|
* Description: Chisel Wordpress Starter Theme based on Timber library.
|
|
6
|
-
* Version:
|
|
6
|
+
* Version: 2.0.0
|
|
7
7
|
* License: GNU General Public License v2 or later
|
|
8
8
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
9
9
|
* Tags: chisel, custom, starter, theme, WordPress
|
|
@@ -4,8 +4,8 @@ declare(strict_types=1);
|
|
|
4
4
|
use FriendsOfTwig\Twigcs;
|
|
5
5
|
|
|
6
6
|
$finder_1 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/views' );
|
|
7
|
-
$finder_2 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/
|
|
8
|
-
$finder_3 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/
|
|
7
|
+
$finder_2 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/src/blocks' );
|
|
8
|
+
$finder_3 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/src/blocks-acf' );
|
|
9
9
|
|
|
10
10
|
return Twigcs\Config\Config::create()
|
|
11
11
|
->addFinder( $finder_1 )
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div class="c-logo">
|
|
2
2
|
<a href="{{ site.link }}" class="c-logo__link">
|
|
3
3
|
<span class="u-sr-only">{{ site.title }}</span>
|
|
4
|
-
{% if
|
|
5
|
-
{{
|
|
4
|
+
{% if logo %}
|
|
5
|
+
{{ logo }}
|
|
6
6
|
{% else %}
|
|
7
7
|
<span class="c-logo__text">{{ site.title }}</span>
|
|
8
8
|
{% endif %}
|
package/lib/commands/create/creators/app/chisel-starter-theme/views/components/main-nav-item.twig
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
{% set has_submenu = item.children is not empty and main_nav_level < main_nav_level_max %}
|
|
6
6
|
{% set caret = has_submenu ? '<button class="c-main-nav__caret is-caret" aria-label="' ~ __('Toggle submenu', 'chisel') ~ '"></button>' : '' %}
|
|
7
7
|
{% set is_active = 'current-menu-parent' in item.classes %}
|
|
8
|
+
{% set has_default_submenu = item.meta('mega_menu_default_dropdown') %}
|
|
8
9
|
|
|
9
|
-
<li class="c-main-nav__{{ sub }}item {{ item.classes|join(' ') }} js-main-nav-item{{ is_active ? ' is-active' : '' }}">
|
|
10
|
+
<li class="c-main-nav__{{ sub }}item {{ item.classes|join(' ') }} js-main-nav-item{{ is_active ? ' is-active' : '' }}{% if has_default_submenu == 'yes' %} is-default{% endif %}">
|
|
10
11
|
<a href="{{ item.url }}" class="c-main-nav__{{ sub }}link js-main-nav-link" {{ item_target }} {{ item_title }} {{ item_aria_current }}>{{ item.title }}{{ caret }}</a>
|
|
11
12
|
|
|
12
13
|
{% if has_submenu %}
|