├── .nvmrc ├── docs ├── public │ ├── .keep │ ├── _redirects │ └── _headers ├── src │ ├── assets │ │ ├── fonts │ │ │ ├── .keep │ │ │ ├── quicksand-v21-latin-300.woff2 │ │ │ ├── quicksand-v21-latin-500.woff2 │ │ │ ├── quicksand-v21-latin-600.woff2 │ │ │ ├── quicksand-v21-latin-700.woff2 │ │ │ └── quicksand-v21-latin-regular.woff2 │ │ └── images │ │ │ ├── .keep │ │ │ ├── chisel.jpg │ │ │ ├── payette.png │ │ │ ├── xfive.png │ │ │ ├── monte-carlo.png │ │ │ ├── club-oenologique.png │ │ │ ├── favicons │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── mstile-70x70.png │ │ │ ├── mstile-144x144.png │ │ │ ├── mstile-150x150.png │ │ │ ├── mstile-310x150.png │ │ │ ├── mstile-310x310.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── browserconfig.xml │ │ │ └── site.webmanifest │ │ │ ├── arrow.svg │ │ │ ├── play.svg │ │ │ ├── checkmark.svg │ │ │ └── star.svg │ ├── styles │ │ ├── vendor │ │ │ └── .keep │ │ ├── elements │ │ │ ├── _hr.scss │ │ │ ├── _main.scss │ │ │ ├── _tables.scss │ │ │ ├── _code.scss │ │ │ ├── _links.scss │ │ │ ├── _blockquote.scss │ │ │ ├── _lists.scss │ │ │ ├── _headings.scss │ │ │ ├── _images.scss │ │ │ └── _html-body.scss │ │ ├── generic │ │ │ ├── _normalize.scss │ │ │ ├── _box-sizing.scss │ │ │ ├── _shared.scss │ │ │ └── _reset.scss │ │ ├── main.scss │ │ ├── components │ │ │ ├── _highlight.scss │ │ │ ├── _post.scss │ │ │ ├── _footer.scss │ │ │ ├── _why-chisel.scss │ │ │ ├── _logo.scss │ │ │ └── _page-nav.scss │ │ ├── utilities │ │ │ ├── _clearfix.scss │ │ │ ├── _align.scss │ │ │ └── _hide.scss │ │ ├── objects │ │ │ ├── _animations.scss │ │ │ ├── _list-bare.scss │ │ │ ├── _container.scss │ │ │ ├── _list-inline.scss │ │ │ ├── _table.scss │ │ │ ├── _layout.scss │ │ │ ├── _icons.scss │ │ │ └── _media.scss │ │ └── tools │ │ │ ├── _clearfix.scss │ │ │ └── _hidden.scss │ ├── templates │ │ ├── layouts │ │ │ └── page.twig │ │ ├── components │ │ │ ├── page-sidebar.twig │ │ │ ├── footer.twig │ │ │ ├── sidebar.twig │ │ │ ├── block.twig │ │ │ ├── why-chisel.twig │ │ │ ├── page-nav.twig │ │ │ ├── header.twig │ │ │ ├── logo.twig │ │ │ └── slider.twig │ │ ├── template-home.twig │ │ └── post.twig │ └── scripts │ │ ├── modules │ │ └── greeting.js │ │ └── app.js ├── .gitignore ├── .stylelintignore ├── .eslintignore ├── .prettierignore ├── .htmlhintrc ├── stylelint.config.js ├── prettier.config.js ├── content │ ├── 404.md │ ├── docs │ │ ├── development.md │ │ ├── structure.md │ │ ├── development │ │ │ ├── twig.md │ │ │ ├── performance.md │ │ │ ├── javascript.md │ │ │ └── pages.md │ │ ├── setup.md │ │ └── features.md │ ├── about.md │ ├── docs.md │ └── tutorials.md ├── README.md ├── .browserslistrc ├── postcss.config.js ├── babel.config.js ├── .eslintrc.js ├── import.js └── package.json ├── packages ├── chisel-scripts │ ├── .npmignore │ ├── lib │ │ ├── template │ │ │ ├── .nvmrc │ │ │ └── dev-vhost.chisel-tpl.conf │ │ └── commands │ │ │ ├── create-block │ │ │ ├── templates │ │ │ │ ├── acf │ │ │ │ │ ├── index.js │ │ │ │ │ └── block │ │ │ │ │ │ ├── editor.scss.mustache │ │ │ │ │ │ ├── style.scss.mustache │ │ │ │ │ │ ├── render.php.mustache │ │ │ │ │ │ ├── view.js.mustache │ │ │ │ │ │ ├── save.js.mustache │ │ │ │ │ │ └── index.js.mustache │ │ │ │ └── README.md │ │ │ └── index.js │ │ │ ├── wp.js │ │ │ └── composer.js │ ├── .gitignore │ ├── README.md │ ├── bin │ │ └── chisel-scripts.js │ ├── fetch-packages.js │ └── package.json ├── generator-chisel │ ├── .gitignore │ ├── lib │ │ └── commands │ │ │ └── create │ │ │ ├── creators │ │ │ ├── app │ │ │ │ ├── chisel-starter-theme │ │ │ │ │ ├── assets │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ │ ├── .keep │ │ │ │ │ │ │ ├── roboto-300.woff2 │ │ │ │ │ │ │ ├── roboto-700.woff2 │ │ │ │ │ │ │ ├── manrope-700.woff2 │ │ │ │ │ │ │ ├── manrope-regular.woff2 │ │ │ │ │ │ │ └── roboto-regular.woff2 │ │ │ │ │ │ ├── images │ │ │ │ │ │ │ └── .keep │ │ │ │ │ │ ├── example-blocks │ │ │ │ │ │ │ ├── blocks-acf │ │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ │ │ ├── init.php │ │ │ │ │ │ │ │ │ ├── editor.scss │ │ │ │ │ │ │ │ │ ├── style.scss │ │ │ │ │ │ │ │ │ ├── view.scss │ │ │ │ │ │ │ │ │ ├── critical.scss │ │ │ │ │ │ │ │ │ ├── example.twig │ │ │ │ │ │ │ │ │ ├── view.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── script.js │ │ │ │ │ │ │ └── blocks │ │ │ │ │ │ │ │ ├── example │ │ │ │ │ │ │ │ ├── editor.scss │ │ │ │ │ │ │ │ ├── style.scss │ │ │ │ │ │ │ │ ├── view.scss │ │ │ │ │ │ │ │ ├── view.js │ │ │ │ │ │ │ │ ├── script.js │ │ │ │ │ │ │ │ └── save.js │ │ │ │ │ │ │ │ └── example-server-side │ │ │ │ │ │ │ │ ├── editor.scss │ │ │ │ │ │ │ │ ├── style.scss │ │ │ │ │ │ │ │ ├── view.scss │ │ │ │ │ │ │ │ ├── render.twig │ │ │ │ │ │ │ │ ├── save.js │ │ │ │ │ │ │ │ ├── view.js │ │ │ │ │ │ │ │ ├── script.js │ │ │ │ │ │ │ │ └── render.php │ │ │ │ │ │ ├── icons │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ └── animated │ │ │ │ │ │ │ │ └── loader.svg │ │ │ │ │ │ └── icons-source │ │ │ │ │ │ │ ├── x-logo.svg │ │ │ │ │ │ │ ├── minus.svg │ │ │ │ │ │ │ ├── arrow-left.svg │ │ │ │ │ │ │ ├── arrow-right.svg │ │ │ │ │ │ │ ├── plus.svg │ │ │ │ │ │ │ ├── close-line.svg │ │ │ │ │ │ │ ├── color │ │ │ │ │ │ │ ├── facebook-logo.svg │ │ │ │ │ │ │ └── chisel-icon.svg │ │ │ │ │ │ │ └── chisel-icon.svg │ │ │ │ │ ├── languages │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── .nvmrc │ │ │ │ │ ├── src │ │ │ │ │ │ ├── scripts │ │ │ │ │ │ │ ├── blog.js │ │ │ │ │ │ │ ├── admin.js │ │ │ │ │ │ │ ├── editor.js │ │ │ │ │ │ │ ├── editor │ │ │ │ │ │ │ │ ├── blocks-mods.js │ │ │ │ │ │ │ │ ├── utils.js │ │ │ │ │ │ │ │ ├── mods │ │ │ │ │ │ │ │ │ ├── core-spacer.js │ │ │ │ │ │ │ │ │ └── blocks-alignment.js │ │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ │ └── RenderAppender.js │ │ │ │ │ │ │ │ └── blocks.js │ │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ │ ├── loaded.js │ │ │ │ │ │ │ │ └── scrollbar-width.js │ │ │ │ │ │ │ ├── app.js │ │ │ │ │ │ │ └── login.js │ │ │ │ │ │ ├── styles │ │ │ │ │ │ │ ├── vendor │ │ │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ └── _breadcrumbs.scss │ │ │ │ │ │ │ ├── .gitignore.chisel-tpl │ │ │ │ │ │ │ ├── elements │ │ │ │ │ │ │ │ ├── _table.scss │ │ │ │ │ │ │ │ ├── _link.scss │ │ │ │ │ │ │ │ ├── _hr.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _html.scss │ │ │ │ │ │ │ │ ├── _images.scss │ │ │ │ │ │ │ │ └── _shared.scss │ │ │ │ │ │ │ ├── admin.scss │ │ │ │ │ │ │ ├── woocommerce.scss │ │ │ │ │ │ │ ├── utilities │ │ │ │ │ │ │ │ ├── _spacing.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ └── _sr.scss │ │ │ │ │ │ │ ├── blocks │ │ │ │ │ │ │ │ ├── _core-latest-comments.scss │ │ │ │ │ │ │ │ ├── _core-post-date.scss │ │ │ │ │ │ │ │ ├── _core-gallery.scss │ │ │ │ │ │ │ │ ├── _core-post-title.scss │ │ │ │ │ │ │ │ ├── _core-search.scss │ │ │ │ │ │ │ │ ├── _core-comments.scss │ │ │ │ │ │ │ │ ├── _core-details.scss │ │ │ │ │ │ │ │ ├── _core-group.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _core-spacer.scss │ │ │ │ │ │ │ │ └── _core-media-text.scss │ │ │ │ │ │ │ ├── editor.scss │ │ │ │ │ │ │ ├── widgets │ │ │ │ │ │ │ │ ├── _widget.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ └── _nav-menu.scss │ │ │ │ │ │ │ ├── generic │ │ │ │ │ │ │ │ └── _index.scss │ │ │ │ │ │ │ ├── wp-admin │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ └── _acf.scss │ │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ │ ├── _load-more.scss │ │ │ │ │ │ │ │ ├── _post-card.scss │ │ │ │ │ │ │ │ ├── _sidebar.scss │ │ │ │ │ │ │ │ ├── _post.scss │ │ │ │ │ │ │ │ ├── _footer.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _badge.scss │ │ │ │ │ │ │ │ ├── _pagination.scss │ │ │ │ │ │ │ │ ├── _header.scss │ │ │ │ │ │ │ │ ├── _content.scss │ │ │ │ │ │ │ │ └── _select2.scss │ │ │ │ │ │ │ ├── wp-editor │ │ │ │ │ │ │ │ ├── _editor.scss │ │ │ │ │ │ │ │ ├── _core-button.scss │ │ │ │ │ │ │ │ ├── _core-pagination.scss │ │ │ │ │ │ │ │ ├── _core-spacer.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _swiper-sliders.scss │ │ │ │ │ │ │ │ ├── _block-sidebar.scss │ │ │ │ │ │ │ │ ├── _render-appender.scss │ │ │ │ │ │ │ │ └── _block-edit-selector.scss │ │ │ │ │ │ │ ├── objects │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _wrapper.scss │ │ │ │ │ │ │ │ ├── _grid.scss │ │ │ │ │ │ │ │ ├── _layout.scss │ │ │ │ │ │ │ │ └── _icon.scss │ │ │ │ │ │ │ ├── main.scss │ │ │ │ │ │ │ └── woo │ │ │ │ │ │ │ │ ├── _cart.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _account.scss │ │ │ │ │ │ │ │ ├── _product.scss │ │ │ │ │ │ │ │ ├── _archive.scss │ │ │ │ │ │ │ │ ├── _product-item.scss │ │ │ │ │ │ │ │ ├── _btn.scss │ │ │ │ │ │ │ │ └── _checkout.scss │ │ │ │ │ │ ├── design │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── settings │ │ │ │ │ │ │ │ ├── _icon-settings.scss │ │ │ │ │ │ │ │ └── _index.scss │ │ │ │ │ │ │ └── tools │ │ │ │ │ │ │ │ ├── _colors.scss │ │ │ │ │ │ │ │ ├── _index.scss │ │ │ │ │ │ │ │ ├── _link.scss │ │ │ │ │ │ │ │ ├── _layout.scss │ │ │ │ │ │ │ │ ├── _media.scss │ │ │ │ │ │ │ │ ├── _width.scss │ │ │ │ │ │ │ │ ├── _px-to-rem.scss │ │ │ │ │ │ │ │ └── _screen-readers.scss │ │ │ │ │ │ ├── blocks-acf │ │ │ │ │ │ │ └── slider │ │ │ │ │ │ │ │ ├── script.js │ │ │ │ │ │ │ │ ├── style.scss │ │ │ │ │ │ │ │ ├── block.json │ │ │ │ │ │ │ │ └── slider.twig │ │ │ │ │ │ └── blocks │ │ │ │ │ │ │ └── accordion │ │ │ │ │ │ │ ├── editor.scss │ │ │ │ │ │ │ └── block.json │ │ │ │ │ ├── views │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── search-form.twig │ │ │ │ │ │ │ ├── no-results.twig │ │ │ │ │ │ │ ├── the-title.twig │ │ │ │ │ │ │ ├── header.twig │ │ │ │ │ │ │ ├── logo.twig │ │ │ │ │ │ │ ├── footer.twig │ │ │ │ │ │ │ ├── slider.twig │ │ │ │ │ │ │ └── post-item.twig │ │ │ │ │ │ ├── page-plugin.twig │ │ │ │ │ │ ├── page.twig │ │ │ │ │ │ ├── single-password.twig │ │ │ │ │ │ ├── archive.twig │ │ │ │ │ │ ├── search.twig │ │ │ │ │ │ ├── author.twig │ │ │ │ │ │ ├── sidebar-blog.twig │ │ │ │ │ │ ├── 404.twig │ │ │ │ │ │ ├── sidebar-woocommerce.twig │ │ │ │ │ │ ├── partials │ │ │ │ │ │ │ └── block-edit-button.twig │ │ │ │ │ │ └── woocommerce │ │ │ │ │ │ │ └── linked-products.twig │ │ │ │ │ ├── .gitignore.chisel-tpl │ │ │ │ │ ├── screenshot.jpg │ │ │ │ │ ├── inc │ │ │ │ │ │ ├── Enums │ │ │ │ │ │ │ ├── AcfOptionsPageType.php │ │ │ │ │ │ │ └── BlocksType.php │ │ │ │ │ │ ├── WP │ │ │ │ │ │ │ ├── ChiselTerm.php │ │ │ │ │ │ │ ├── ChiselImage.php │ │ │ │ │ │ │ └── ChiselPost.php │ │ │ │ │ │ ├── Interfaces │ │ │ │ │ │ │ ├── InstanceInterface.php │ │ │ │ │ │ │ └── HooksInterface.php │ │ │ │ │ │ ├── Helpers │ │ │ │ │ │ │ ├── AssetsHelpers.php │ │ │ │ │ │ │ ├── CommentsHelpers.php │ │ │ │ │ │ │ ├── YoastHelpers.php │ │ │ │ │ │ │ ├── DataHelpers.php │ │ │ │ │ │ │ ├── CacheHelpers.php │ │ │ │ │ │ │ ├── AjaxHelpers.php │ │ │ │ │ │ │ └── AcfHelpers.php │ │ │ │ │ │ ├── Plugins │ │ │ │ │ │ │ └── Yoast.php │ │ │ │ │ │ └── Traits │ │ │ │ │ │ │ └── Singleton.php │ │ │ │ │ ├── webpack.config.js │ │ │ │ │ ├── author.php │ │ │ │ │ ├── search.php │ │ │ │ │ ├── .twig-cs-fixer.php │ │ │ │ │ ├── 404.php │ │ │ │ │ ├── style.chisel-tpl.css │ │ │ │ │ ├── header.php │ │ │ │ │ ├── composer.json │ │ │ │ │ ├── single.php │ │ │ │ │ ├── page.php │ │ │ │ │ ├── twig_cs.php │ │ │ │ │ ├── archive.php │ │ │ │ │ ├── index.php │ │ │ │ │ └── footer.php │ │ │ │ └── template │ │ │ │ │ ├── .devcontainer │ │ │ │ │ ├── compose.chisel-tpl │ │ │ │ │ ├── exec │ │ │ │ │ ├── post-create-command.sh.chisel-tpl │ │ │ │ │ ├── Dockerfile │ │ │ │ │ └── devcontainer.json.chisel-tpl │ │ │ │ │ ├── README.chisel-tpl.md │ │ │ │ │ ├── .gitattributes │ │ │ │ │ └── .gitignore.chisel-tpl │ │ │ └── wp-plugins │ │ │ │ ├── plugins.json │ │ │ │ └── index.js │ │ │ ├── packages-versions.js │ │ │ ├── index.js │ │ │ └── priorities.js │ ├── package.json │ └── bin │ │ └── chisel.js └── chisel-shared-utils │ ├── README.md │ ├── index.js │ ├── lib │ └── package-manager.js │ ├── package.json │ └── CHANGELOG.md ├── prettier.config.js ├── .eslintignore ├── .hintrc ├── .gitattributes ├── README.md ├── .editorconfig ├── lerna.json ├── scripts └── prepare-links.js ├── .gitignore ├── package.json ├── LICENSE └── .eslintrc.js /.nvmrc: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /docs/public/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/src/assets/fonts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/src/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/src/styles/vendor/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/chisel-scripts/.npmignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | /chisel.config.local.js 2 | /dist 3 | -------------------------------------------------------------------------------- /docs/.stylelintignore: -------------------------------------------------------------------------------- 1 | /src/assets 2 | /dist 3 | /wp 4 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/template/.nvmrc: -------------------------------------------------------------------------------- 1 | 20.12.2 2 | -------------------------------------------------------------------------------- /docs/.eslintignore: -------------------------------------------------------------------------------- 1 | !.eslintrc.js 2 | /src/assets 3 | /dist 4 | /wp 5 | -------------------------------------------------------------------------------- /docs/.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /src/assets 3 | /dist 4 | /wp 5 | -------------------------------------------------------------------------------- /packages/chisel-scripts/.gitignore: -------------------------------------------------------------------------------- 1 | /wp-cli.phar 2 | /composer.phar 3 | -------------------------------------------------------------------------------- /packages/generator-chisel/.gitignore: -------------------------------------------------------------------------------- 1 | /CHANGELOG-CHISEL.md 2 | /README.md 3 | -------------------------------------------------------------------------------- /docs/.htmlhintrc: -------------------------------------------------------------------------------- 1 | { 2 | "attr-lowercase": ["viewBox", "preserveAspectRatio"] 3 | } 4 | -------------------------------------------------------------------------------- /docs/stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['stylelint-config-chisel'], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/languages/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/.nvmrc: -------------------------------------------------------------------------------- 1 | >=20.12.2 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/blog.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | trailingComma: 'all', 4 | }; 5 | -------------------------------------------------------------------------------- /docs/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | trailingComma: 'all', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/search-form.twig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/_redirects: -------------------------------------------------------------------------------- 1 | /docs/setup/frontend /docs/setup/static 2 | /docs/structure/frontend /docs/structure/static 3 | -------------------------------------------------------------------------------- /docs/src/assets/images/chisel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/chisel.jpg -------------------------------------------------------------------------------- /docs/src/assets/images/payette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/payette.png -------------------------------------------------------------------------------- /docs/src/assets/images/xfive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/xfive.png -------------------------------------------------------------------------------- /packages/chisel-shared-utils/README.md: -------------------------------------------------------------------------------- 1 | # chisel-scripts-shared-utils 2 | 3 | Shared utilities used by many Chisel packages. 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/_index.scss: -------------------------------------------------------------------------------- 1 | @forward 'tools'; 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/admin.js: -------------------------------------------------------------------------------- 1 | import './admin/acf'; 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/.gitignore.chisel-tpl: -------------------------------------------------------------------------------- 1 | _index.scss 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/.gitignore: -------------------------------------------------------------------------------- 1 | /tools/_icon-settings.scss 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | !.eslintrc.js 2 | node_modules 3 | /packages/generator-chisel/lib/commands/create/creators/*/template 4 | /test-projects 5 | -------------------------------------------------------------------------------- /docs/src/assets/images/monte-carlo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/monte-carlo.png -------------------------------------------------------------------------------- /packages/chisel-scripts/README.md: -------------------------------------------------------------------------------- 1 | # chisel-scripts 2 | 3 | Main package containing scripts and configuration used by Chisel projects. 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/script.js: -------------------------------------------------------------------------------- 1 | import './style.scss'; 2 | -------------------------------------------------------------------------------- /docs/content/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Page not found 3 | excerpt: We are sorry, we couldn't find what you're looking for. 4 | order: 100 5 | --- 6 | -------------------------------------------------------------------------------- /docs/src/assets/images/club-oenologique.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/club-oenologique.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/favicon.ico -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/elements/_table.scss: -------------------------------------------------------------------------------- 1 | table { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/mstile-70x70.png -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons/.gitignore: -------------------------------------------------------------------------------- 1 | /icons.json 2 | /icons.svg 3 | /icons-preview.html 4 | -------------------------------------------------------------------------------- /docs/src/assets/fonts/quicksand-v21-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/fonts/quicksand-v21-latin-300.woff2 -------------------------------------------------------------------------------- /docs/src/assets/fonts/quicksand-v21-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/fonts/quicksand-v21-latin-500.woff2 -------------------------------------------------------------------------------- /docs/src/assets/fonts/quicksand-v21-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/fonts/quicksand-v21-latin-600.woff2 -------------------------------------------------------------------------------- /docs/src/assets/fonts/quicksand-v21-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/fonts/quicksand-v21-latin-700.woff2 -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/mstile-144x144.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/mstile-310x150.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/mstile-310x310.png -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/admin.scss: -------------------------------------------------------------------------------- 1 | /* Admin area custom styles */ 2 | 3 | @use 'wp-admin'; 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/no-results.twig: -------------------------------------------------------------------------------- 1 |

{{ __('No posts found', 'chisel') }}

2 | -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woocommerce.scss: -------------------------------------------------------------------------------- 1 | /* Woocommerce custom styles */ 2 | 3 | @use 'woo'; 4 | -------------------------------------------------------------------------------- /docs/src/assets/fonts/quicksand-v21-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/fonts/quicksand-v21-latin-regular.woff2 -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/templates/acf/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | blockTemplatesPath: require('path').join(__dirname, 'block'), 3 | }; 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/editor.scss: -------------------------------------------------------------------------------- 1 | .b-example { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/style.scss: -------------------------------------------------------------------------------- 1 | .b-example { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/view.scss: -------------------------------------------------------------------------------- 1 | .b-example { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/utilities/_spacing.scss: -------------------------------------------------------------------------------- 1 | .u-no-margin-bottom { 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/docs/src/assets/images/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/critical.scss: -------------------------------------------------------------------------------- 1 | .b-example { 2 | color: yellow; 3 | } 4 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Getchisel 2 | 3 | Getchisel is a project created with Chisel. Please check out Chisel documentation at [https://www.getchisel.co/docs/](www.getchisel.co/docs/). 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/.gitignore.chisel-tpl: -------------------------------------------------------------------------------- 1 | /build 2 | /vendor 3 | /node_modules 4 | /assets/hashes.php 5 | /.use-devcontainer 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-latest-comments.scss: -------------------------------------------------------------------------------- 1 | .wp-block-latest-comments { 2 | padding-left: 0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/style.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .b-slider { 4 | position: relative; 5 | } 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/settings/_icon-settings.scss: -------------------------------------------------------------------------------- 1 | /* Must be present for icons module config, whether enabled or not */ 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/editor.scss: -------------------------------------------------------------------------------- 1 | /* Gutenberg editor custom styles */ 2 | 3 | @use 'wp-editor'; 4 | @use 'blocks'; 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid green; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/style.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid blue; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/view.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid green; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/vendor/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor.js: -------------------------------------------------------------------------------- 1 | import './editor/blocks-styles'; 2 | import './editor/blocks'; 3 | import './editor/blocks-mods'; 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.devcontainer/compose.chisel-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker compose -p <%= app.nameSlug %>_devcontainer <%= '"${@}"' %> 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid green; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/style.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid blue; 3 | } 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/view.scss: -------------------------------------------------------------------------------- 1 | .wp-chisel-example-block { 2 | border: 1px solid green; 3 | } 4 | -------------------------------------------------------------------------------- /docs/.browserslistrc: -------------------------------------------------------------------------------- 1 | last 3 Android versions 2 | last 3 ChromeAndroid versions 3 | last 3 Chrome versions 4 | last 3 Firefox versions 5 | last 3 Safari versions 6 | last 3 iOS versions 7 | last 3 Edge versions 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/example.twig: -------------------------------------------------------------------------------- 1 | {# 2 | This file name must be the same as the block folder name. 3 | #} 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/render.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | hej ho ho 5 |
6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/widgets/_widget.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-widget__title { 4 | font-size: get-font-size('large'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/page-plugin.twig: -------------------------------------------------------------------------------- 1 | {% extends "single.twig" %} 2 | 3 | {% block inner_content %} 4 | {{ post.content }} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/page.twig: -------------------------------------------------------------------------------- 1 | {% extends "single.twig" %} 2 | 3 | {% block inner_content %} 4 | {{ post.content }} 5 | {% endblock %} 6 | 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/packages-versions.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'chisel-scripts': '2.1.4', 3 | 'chisel-shared-utils': '2.0.0-alpha.1', 4 | 'generator-chisel': '2.3.2', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/generic/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_reset.scss'; 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/utilities/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_sr.scss'; 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-admin/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_acf.scss'; 5 | -------------------------------------------------------------------------------- /docs/src/templates/layouts/page.twig: -------------------------------------------------------------------------------- 1 | {% extends "layouts/base.twig" %} 2 | {% set pageName = '<%= pageName %>' %} 3 | 4 | {% block content %} 5 |

Hello 6 | 7 |

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_load-more.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-load-more { 4 | padding: get-padding('normal') 0; 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_editor.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-post-content.wp-block-post-content { 4 | padding-bottom: px-rem(64); 5 | } 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/the-title.twig: -------------------------------------------------------------------------------- 1 | {% if the_title.text is not empty %} 2 |

{{ the_title.text }}

3 | {% endif %} 4 | -------------------------------------------------------------------------------- /packages/chisel-shared-utils/index.js: -------------------------------------------------------------------------------- 1 | ['package-manager', 'run', 'copy'].forEach((lib) => { 2 | Object.assign(exports, require(`./lib/${lib}`)); 3 | }); 4 | 5 | exports.execa = require('execa'); 6 | exports.chalk = require('chalk'); 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/blocks-mods.js: -------------------------------------------------------------------------------- 1 | import './mods/core'; 2 | import './mods/core-button'; 3 | import './mods/core-spacer'; 4 | import './mods/blocks-alignment'; 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-post-date.scss: -------------------------------------------------------------------------------- 1 | @use './core-latest-posts' as *; 2 | 3 | .wp-block-post-date { 4 | @extend .wp-block-latest-posts__post-date; 5 | } 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/elements/_link.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | a { 4 | cursor: pointer; 5 | transition: get-transition('normal'); 6 | @include link; 7 | } 8 | -------------------------------------------------------------------------------- /docs/public/_headers: -------------------------------------------------------------------------------- 1 | /assets/* 2 | Cache-Control: public, max-age=31536000, immutable 3 | 4 | /scripts/* 5 | Cache-Control: public, max-age=31536000, immutable 6 | 7 | /styles/* 8 | Cache-Control: public, max-age=31536000, immutable 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/screenshot.jpg -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/single-password.twig: -------------------------------------------------------------------------------- 1 | {% extends "single.twig" %} 2 | 3 | {% block inner_content %} 4 | {{ function('get_the_password_form') }} 5 | {% endblock %} 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/src/scripts/modules/greeting.js: -------------------------------------------------------------------------------- 1 | const greeting = (name) => { 2 | const element = document.querySelector('.js-greeting'); 3 | 4 | if (element) { 5 | element.innerHTML = name; 6 | } 7 | }; 8 | 9 | export default greeting; 10 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_hr.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #HR 3 | ========================================================================== */ 4 | 5 | hr { 6 | display: block; 7 | } 8 | -------------------------------------------------------------------------------- /docs/src/styles/generic/_normalize.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #NORMALIZE 3 | ========================================================================== */ 4 | 5 | @import-normalize; 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_colors.scss: -------------------------------------------------------------------------------- 1 | @use 'theme' as *; 2 | 3 | @function rgba-color($color, $alpha: 50%) { 4 | @return rgb(from get-color($color) r g b / $alpha); 5 | } 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/widgets/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_nav-menu.scss'; 5 | @use '_widget.scss'; 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/archive.twig: -------------------------------------------------------------------------------- 1 | {% extends "index.twig" %} 2 | 3 | {% block before_loop %} 4 | 5 | {% endblock %} 6 | 7 | {% block after_loop %} 8 | 9 | {% endblock %} 10 | 11 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/search.twig: -------------------------------------------------------------------------------- 1 | {% extends "index.twig" %} 2 | 3 | {% block before_loop %} 4 | 5 | {% endblock %} 6 | 7 | {% block after_loop %} 8 | 9 | {% endblock %} 10 | 11 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Enums/AcfOptionsPageType.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ sidebar.content }} 4 |
5 | 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/README.chisel-tpl.md: -------------------------------------------------------------------------------- 1 | # <%= app.name %> 2 | 3 | <%= app.name %> is a project created with Chisel. Please check out Chisel documentation at [https://www.getchisel.co/docs/](www.getchisel.co/docs/). 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_grid.scss'; 5 | @use '_layout.scss'; 6 | @use '_wrapper.scss'; 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/404.twig: -------------------------------------------------------------------------------- 1 | {% extends "single.twig" %} 2 | 3 | {% block inner_content %} 4 |

{{ __('Sorry, we couldn\'t find what you\'re looking for.', 'chisel') }}

5 | {% endblock %} 6 | 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-300.woff2 -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-700.woff2 -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "development" 4 | ], 5 | "hints": { 6 | "compat-api/css": [ 7 | "default", 8 | { 9 | "ignore": [ 10 | "mask-repeat", 11 | "mask-size" 12 | ] 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /docs/src/templates/components/page-sidebar.twig: -------------------------------------------------------------------------------- 1 | {% if sidebar is not empty %} 2 | 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/manrope-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/manrope-700.woff2 -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/manrope-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/manrope-regular.woff2 -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfiveco/generator-chisel/HEAD/packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/fonts/roboto-regular.woff2 -------------------------------------------------------------------------------- /docs/postcss.config.js: -------------------------------------------------------------------------------- 1 | /* eslint import/no-extraneous-dependencies: ["error", { "devDependencies": true }], global-require: off */ 2 | 3 | module.exports = { 4 | plugins: [ 5 | require('autoprefixer')({ grid: 'autoplace' }), 6 | require('postcss-normalize')(), 7 | ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/sidebar-woocommerce.twig: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/modules/loaded.js: -------------------------------------------------------------------------------- 1 | const loaded = () => { 2 | document.addEventListener('DOMContentLoaded', () => { 3 | document.body.classList.add('has-loaded'); 4 | }); 5 | }; 6 | 7 | export default loaded; 8 | -------------------------------------------------------------------------------- /docs/src/assets/images/arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/chisel-scripts/bin/chisel-scripts.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const Service = require('../lib/Service'); 4 | 5 | const service = new Service(); 6 | service.run(process.argv[2], process.argv.slice(3)).catch((err) => { 7 | console.error(err); 8 | process.exit(1); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For server side rendering we do not need to save anything, so we return null. 3 | */ 4 | export default function save() { 5 | return null; 6 | } 7 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-gallery.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-gallery { 4 | figure.wp-block-image { 5 | @include bp-down(small) { 6 | width: 100% !important; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-post-title.scss: -------------------------------------------------------------------------------- 1 | @use '../../styles/components/posts-items' as *; 2 | @use '~design' as *; 3 | 4 | .wp-block-post-title { 5 | @extend .c-post-item__title; 6 | @include link-reverse; 7 | } 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines on text files 2 | *.css text eol=lf 3 | *.html text eol=lf 4 | *.twig text eol=lf 5 | *.js text eol=lf 6 | *.json text eol=lf 7 | *.less text eol=lf 8 | *.scss text eol=lf 9 | *.php text eol=lf 10 | *.md text eol=lf 11 | *.yml text eol=lf 12 | -------------------------------------------------------------------------------- /docs/src/assets/images/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/src/styles/main.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Project: Getchisel 3 | Author: Xfive 4 | */ 5 | 6 | @import 'settings/*'; 7 | @import 'tools/*'; 8 | @import 'generic/*'; 9 | @import 'elements/*'; 10 | @import 'vendor/*'; 11 | @import 'objects/*'; 12 | @import 'components/*'; 13 | @import 'utilities/*'; 14 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/main.scss: -------------------------------------------------------------------------------- 1 | /* Main theme styles */ 2 | 3 | @use 'generic'; 4 | @use 'elements'; 5 | @use 'vendor'; 6 | @use 'objects'; 7 | @use 'components'; 8 | @use 'blocks'; 9 | @use 'widgets'; 10 | @use 'utilities'; 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chisel 2 | 3 | [![npm](https://img.shields.io/npm/v/generator-chisel)](https://www.npmjs.com/package/generator-chisel) 4 | 5 | Chisel is a development framework for creating easy to maintain and fast WordPress websites. 6 | 7 | ## License 8 | Chisel is licensed under [MIT License](LICENSE). 9 | -------------------------------------------------------------------------------- /docs/src/styles/components/_highlight.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #HIGHLIGHT 3 | ========================================================================== */ 4 | 5 | .c-highlight { 6 | color: $color-secondary; 7 | font-weight: inherit; 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_main.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #PAGE 3 | ========================================================================== */ 4 | 5 | main { 6 | display: flex; 7 | flex-direction: column; 8 | flex-grow: 1; 9 | } 10 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/template/dev-vhost.chisel-tpl.conf: -------------------------------------------------------------------------------- 1 | 2 | DocumentRoot "<%= documentRoot %>" 3 | ServerName YOUR_LOCAL_WORDPRESS_DOMAIN 4 | "> 5 | AllowOverride All 6 | Require all granted 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/view.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in frontend only. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './view.scss'; 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/view.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in frontend only. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './view.scss'; 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.php] 15 | indent_style = tab 16 | indent_size = 4 17 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks-acf/example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in the editor only. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './editor.scss'; 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/view.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in frontend only. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './view.scss'; 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in the editor and frontend. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './style.scss'; 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/x-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/elements/_hr.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #HR 3 | ========================================================================== */ 4 | 5 | hr { 6 | display: block; 7 | } 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_cart.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | table.wc-block-cart-items { 4 | .wc-block-cart-items__row { 5 | .wc-block-components-product-name { 6 | font-size: get-font-size('medium'); 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.devcontainer/exec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -f /.dockerenv ]; then 4 | exec "${@}" 5 | else 6 | this_file_dir=$(dirname "${BASH_SOURCE[0]}") 7 | npm run --silent devcontainer -- exec --workspace-folder "${this_file_dir}/.." "${@}" 8 | fi 9 | -------------------------------------------------------------------------------- /docs/content/docs/development.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Development 3 | excerpt: Learn the best development practices with Chisel to produce quality and maintainable code. 4 | order: 1000 5 | --- 6 | 7 | Development documentation is divided into sections describing various aspects of the development of WordPress themes or front-end templates. 8 | -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #2b5797 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/src/templates/components/footer.twig: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/templates/acf/block/editor.scss.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied inside the editor only. 3 | * 4 | * Replace them with your own styles or remove the file completely. 5 | */ 6 | 7 | .wp-block-{{namespace}}-{{slug}} { 8 | border: 1px dotted #f00; 9 | } 10 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is loaded in the editor and frontend. 3 | * 4 | * You must import the scss file in order for css file to be built in the build folder. 5 | */ 6 | 7 | import './style.scss'; 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/header.twig: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/partials/block-edit-button.twig: -------------------------------------------------------------------------------- 1 | {% if fn('is_admin') %} 2 | 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/ChiselTerm.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_code.scss: -------------------------------------------------------------------------------- 1 | :not(pre) > code { 2 | // background: $color-fill; 3 | // color: $color-text-emp; 4 | font-family: 'Lucida Console', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', 5 | monospace; 6 | font-weight: 400; 7 | // font-size: rem(20); 8 | // padding: 0.1em 0.3em; 9 | 10 | // &::selection { 11 | // background: #fce29f; 12 | // } 13 | } 14 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/modules/scrollbar-width.js: -------------------------------------------------------------------------------- 1 | const scrollbarWidth = () => { 2 | setTimeout(() => { 3 | const width = window.innerWidth - document.documentElement.clientWidth; 4 | document.documentElement.style.setProperty('--scrollbar-width', `${width}px`); 5 | }, 10); 6 | }; 7 | 8 | export default scrollbarWidth; 9 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/templates/acf/block/style.scss.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied both on the front of your site 3 | * and in the editor. 4 | * 5 | * Replace them with your own styles or remove the file completely. 6 | */ 7 | 8 | .wp-block-{{namespace}}-{{slug}} { 9 | background-color: #21759b; 10 | color: #fff; 11 | padding: 2px; 12 | } 13 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Interfaces/InstanceInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ site.title }} 4 | {% if logo %} 5 | {{ logo }} 6 | {% else %} 7 | {{ site.title }} 8 | {% endif %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/templates/template-home.twig: -------------------------------------------------------------------------------- 1 | {% extends "layouts/base.twig" %} 2 | 3 | {% block content %} 4 | {% include 'components/hero.twig' with { 'args': post.data.hero } %} 5 | {% include 'components/why-chisel.twig' with { 'args': post.data.whychisel } %} 6 | {% include 'components/slider.twig' with { 'args': post.data.slider } %} 7 |
8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/author.php: -------------------------------------------------------------------------------- 1 | exclude('acf-json'); 5 | $finder->exclude('classes'); 6 | $finder->exclude('dist'); 7 | $finder->exclude('vendor'); 8 | 9 | $config = new TwigCsFixer\Config\Config(); 10 | $config->setCacheFile(null); 11 | $config->setFinder($finder); 12 | 13 | return $config; 14 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/arrow-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/app.js: -------------------------------------------------------------------------------- 1 | import loaded from './modules/loaded'; 2 | import scrollbarWidth from './modules/scrollbar-width'; 3 | import MainNav from './modules/main-nav'; 4 | import LoadMore from './modules/load-more'; 5 | import Slider from './modules/slider'; 6 | 7 | loaded(); 8 | scrollbarWidth(); 9 | new MainNav(); 10 | new LoadMore(); 11 | Slider(); 12 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-search.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-search__inside-wrapper { 4 | align-items: flex-start; 5 | } 6 | 7 | .wp-block-search__input, 8 | .wp-block-search__button { 9 | margin-top: 0 !important; 10 | margin-bottom: 0 !important; 11 | } 12 | 13 | .wp-block-search__button { 14 | margin-left: px-rem(8); 15 | } 16 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_core-spacer.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use 'sass:meta'; 3 | 4 | .editor-styles-wrapper { 5 | @include meta.load-css('../blocks/core-spacer'); 6 | 7 | .wp-block-spacer { 8 | background-color: get-color('grey-100'); 9 | 10 | .components-resizable-box__container { 11 | display: none; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/wp-plugins/plugins.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "WP Premium: Gravity Forms": "https://github.com/pronamic/gravityforms/archive/master.zip", 4 | "SVG Support": "svg-support", 5 | "Yoast SEO": "wordpress-seo", 6 | "Yoast SEO ACF": "acf-content-analysis-for-yoast-seo", 7 | "X5 Aristotle - Monitor Site Errors with Sentry": "xfive-sentry-integration" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docs/src/scripts/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | Project: Getchisel 3 | Author: Xfive 4 | */ 5 | 6 | import hljs from 'highlight.js'; 7 | import {} from './helpers/inert'; 8 | 9 | import Sidebar from './modules/sidebar'; 10 | import onPageNavigation from './modules/onPageNavigation'; 11 | 12 | hljs.highlightAll(); 13 | 14 | const components = [Sidebar, onPageNavigation]; 15 | 16 | Promise.resolve(components.forEach((Component) => new Component())); 17 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/templates/acf/block/render.php.mustache: -------------------------------------------------------------------------------- 1 | {{#isDynamicVariant}} 2 | 7 |

> 8 | 9 |

10 | {{/isDynamicVariant}} 11 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-comments.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-comments { 4 | margin: get-margin('xlarge') 0; 5 | } 6 | 7 | .wp-block-comment-content { 8 | padding-top: get-padding('small'); 9 | font-style: italic; 10 | } 11 | 12 | .comment-reply-link { 13 | @include button; 14 | @include button-primary; 15 | @include button-small; 16 | } 17 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_post-card.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-post-card { 4 | display: flex; 5 | flex-direction: column; 6 | gap: get-gap('normal'); 7 | width: 100%; 8 | padding: get-padding('normal'); 9 | background-color: get-color('white'); 10 | border: 1px solid get-color('grey-100'); 11 | border-radius: get-border-radius('small'); 12 | } 13 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_links.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #LINKS 3 | ========================================================================== */ 4 | 5 | a { 6 | color: $color-link; 7 | font-weight: 500; 8 | text-decoration: underline; 9 | 10 | &:hover { 11 | color: $color-hover; 12 | 13 | strong { 14 | color: $color-bright-sun; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example-server-side/render.php: -------------------------------------------------------------------------------- 1 | get_block_wrapper_attributes(), 7 | 'attributes' => $attributes, 8 | 'content' => $content, 9 | 'block' => $block, 10 | ); 11 | 12 | Blocks::render_twig_file( $block->name, $context ); 13 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_index.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable 2 | // This file is auto generated. Do not edit directly. 3 | 4 | @use '_block-edit-selector.scss'; 5 | @use '_block-sidebar.scss'; 6 | @use '_core-button.scss'; 7 | @use '_core-pagination.scss'; 8 | @use '_core-spacer.scss'; 9 | @use '_editor.scss'; 10 | @use '_render-appender.scss'; 11 | @use '_swiper-sliders.scss'; 12 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Enums/BlocksType.php: -------------------------------------------------------------------------------- 1 | { 12 | console.log(`Running yarn link in ${dir}`); 13 | execa.sync('npm', ['link'], { cwd: dir, stdio: 'inherit' }); 14 | console.log(); 15 | }); 16 | -------------------------------------------------------------------------------- /docs/content/docs/structure.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Project structure 3 | excerpt: Before starting actual development, get familiar with the project structure generated by Chisel 4 | order: 700 5 | --- 6 | 7 | The project structure is files and folders generated by Chisel in your project. The structure is similar for WordPress website and static website: 8 | 9 | - [WordPress website structure](/docs/structure/wordpress) 10 | - [Static website structure](/docs/structure/static) 11 | -------------------------------------------------------------------------------- /docs/babel.config.js: -------------------------------------------------------------------------------- 1 | const chiselConfig = require('./chisel.config.js'); 2 | 3 | module.exports = { 4 | presets: [ 5 | [ 6 | 'babel-preset-chisel', 7 | { 8 | // global automatic polyfills: 9 | // yarn add core-js then uncomment 10 | // useBuiltIns: 'usage', 11 | }, 12 | ], 13 | chiselConfig.react && ['babel-preset-chisel/react', { hot: true }], 14 | // ['babel-preset-chisel/preact'], 15 | ].filter(Boolean), 16 | }; 17 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_swiper-sliders.scss: -------------------------------------------------------------------------------- 1 | @use '../components/slider'; 2 | 3 | .b-slider { 4 | .swiper { 5 | opacity: 1; 6 | transition: get-transition('slow'); 7 | } 8 | 9 | .swiper-wrapper { 10 | display: flex; 11 | } 12 | 13 | .swiper-slide { 14 | width: 100%; 15 | flex: 1 0 100%; 16 | 17 | &:nth-child(n+2) { 18 | display: none; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-details.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../../blocks/accordion/style' as *; 3 | 4 | .wp-block-details { 5 | @extend .b-accordion__item; 6 | 7 | summary { 8 | @extend .b-accordion__item-header; 9 | 10 | + * { 11 | margin-top: get-padding('small'); 12 | } 13 | } 14 | 15 | *:not(summary) { 16 | padding-inline: get-padding('small'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/elements/_html.scss: -------------------------------------------------------------------------------- 1 | @use '../../design/settings'; 2 | 3 | html { 4 | box-sizing: border-box; 5 | min-height: 100%; 6 | overflow-y: scroll; 7 | font-size: settings.$root-font-size; 8 | 9 | &.is-locked { 10 | min-height: 50%; 11 | 12 | body { 13 | height: 80vh; 14 | overflow: hidden; 15 | } 16 | } 17 | 18 | --scrollbar-width: #{settings.$scrollbar-width}; 19 | } 20 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_blockquote.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #BLOCKQUOTES 3 | ========================================================================== */ 4 | 5 | blockquote { 6 | quotes: '“' '”' '‘' '’'; 7 | font-style: italic; 8 | 9 | p:first-child { 10 | &::before { 11 | content: open-quote; 12 | } 13 | } 14 | 15 | p:last-child { 16 | &::after { 17 | content: close-quote; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_lists.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #LISTS 3 | ========================================================================== */ 4 | 5 | li { 6 | margin-bottom: 0.5rem; 7 | 8 | > ul, 9 | > ol { 10 | margin-bottom: 0; 11 | margin-left: 1rem; 12 | margin-top: 0.5rem; 13 | } 14 | } 15 | 16 | dt { 17 | font-weight: bold; 18 | } 19 | 20 | dd { 21 | margin-bottom: 1rem; 22 | margin-left: 1rem; 23 | } 24 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/widgets/_nav-menu.scss: -------------------------------------------------------------------------------- 1 | /* stylelint-disable selector-class-pattern */ 2 | 3 | @use '~design' as *; 4 | 5 | .widget_nav_menu { 6 | ul { 7 | padding: 0; 8 | margin: 0; 9 | list-style-type: none; 10 | } 11 | 12 | .menu-item { 13 | margin: 0 0 get-margin('little'); 14 | } 15 | 16 | .sub-menu { 17 | padding-left: get-padding('little'); 18 | margin: get-margin('little') 0 0; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_layout.scss: -------------------------------------------------------------------------------- 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 | } 12 | -------------------------------------------------------------------------------- /docs/src/styles/generic/_box-sizing.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #BOX-SIZING 3 | ========================================================================== */ 4 | 5 | /** 6 | * More sensible default box-sizing: 7 | * css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice 8 | */ 9 | 10 | html { 11 | box-sizing: border-box; 12 | } 13 | 14 | * { 15 | &, 16 | &::before, 17 | &::after { 18 | box-sizing: inherit; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/vendor/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../../design/settings/' as *; 3 | 4 | .c-breadcrumbs { 5 | position: relative; 6 | margin: get-margin('small') 0; 7 | font-size: get-font-size('small'); 8 | 9 | span { 10 | span { 11 | display: inline-block; 12 | margin-inline: get-margin('tiny'); 13 | 14 | &:first-child { 15 | margin-inline-start: 0; 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/src/styles/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #ALIGN 3 | ========================================================================== */ 4 | 5 | .u-float-left { 6 | float: left; 7 | } 8 | 9 | .u-float-right { 10 | float: right; 11 | } 12 | 13 | .u-clear { 14 | clear: both; 15 | } 16 | 17 | .u-text-center { 18 | text-align: center; 19 | } 20 | 21 | .u-text-left { 22 | text-align: left; 23 | } 24 | 25 | .u-text-right { 26 | text-align: right; 27 | } 28 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-group.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-group-is-layout-constrained { 4 | > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { 5 | max-width: get-layout-size('content'); 6 | margin-left: auto !important; 7 | margin-right: auto !important; 8 | padding-inline: get-padding('normal'); 9 | } 10 | } 11 | 12 | :where(.wp-block-group.has-background.alignfull) { 13 | padding: get-padding('small') 0; 14 | } 15 | -------------------------------------------------------------------------------- /docs/src/styles/components/_post.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #POST 3 | ========================================================================== */ 4 | 5 | .c-post { 6 | display: flex; 7 | flex-direction: column-reverse; 8 | width: 100%; 9 | 10 | @include bp('large') { 11 | flex-direction: row; 12 | } 13 | } 14 | 15 | .c-post__article { 16 | display: flex; 17 | flex-direction: column; 18 | 19 | @include bp('large') { 20 | max-width: 58%; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_sidebar.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-sidebar { 4 | padding-bottom: get-padding('large'); 5 | 6 | .c-post & { 7 | padding-top: get-padding('large'); 8 | } 9 | 10 | &--left { 11 | order: -1; 12 | } 13 | } 14 | 15 | .c-sidebar__inner { 16 | padding: get-padding('normal'); 17 | background-color: get-color('white'); 18 | border: 1px solid get-color('grey-100'); 19 | border-radius: get-border-radius('small'); 20 | } 21 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_wrapper.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .o-wrapper { 4 | box-sizing: border-box; 5 | width: 100%; 6 | margin-inline: auto; 7 | } 8 | 9 | .o-wrapper * { 10 | box-sizing: border-box; 11 | } 12 | 13 | .o-wrapper__inner { 14 | width: 100%; 15 | max-width: get-layout-size('content'); 16 | padding-inline: get-padding('normal'); 17 | margin-inline: auto; 18 | 19 | &--wide { 20 | max-width: get-layout-size('wide'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/style.chisel-tpl.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Theme Name: <%= app.name %> 3 | * Theme URI: https://www.getchisel.co/ 4 | * Author: <%= app.author %> 5 | * Description: Chisel Wordpress Starter Theme based on Timber library. 6 | * Version: 2.2.2 7 | * License: GNU General Public License v2 or later 8 | * License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 | * Tags: chisel, custom, starter, theme, WordPress 10 | * Text Domain: chisel 11 | * Domain Path: /languages 12 | */ 13 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/index.js: -------------------------------------------------------------------------------- 1 | const Creator = require('./Creator'); 2 | 3 | const createCommand = async ({ args, cmd }) => { 4 | const creator = new Creator(undefined, { args, cmd }); 5 | 6 | if (cmd.devcontainer) { 7 | await creator.loadCreator('devcontainer'); 8 | } else { 9 | if (!cmd.devcontainerComplete) { 10 | await creator.loadCreator('init'); 11 | } 12 | 13 | await creator.loadCreator('app'); 14 | } 15 | 16 | return creator.run(); 17 | }; 18 | 19 | module.exports = createCommand; 20 | -------------------------------------------------------------------------------- /docs/src/assets/images/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/close-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/src/templates/components/sidebar.twig: -------------------------------------------------------------------------------- 1 | {% if sidebar is not empty %} 2 | 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Interfaces/HooksInterface.php: -------------------------------------------------------------------------------- 1 | { 5 | const icons = chiselEditorScripts?.icons || null; 6 | 7 | if (!icons) { 8 | return []; 9 | } 10 | 11 | const choices = []; 12 | 13 | Object.entries(icons).forEach(([value, label]) => { 14 | choices.push({ 15 | label, 16 | value, 17 | }); 18 | }); 19 | 20 | return choices; 21 | }; 22 | } 23 | 24 | export default new Utils(); 25 | -------------------------------------------------------------------------------- /docs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | process.env.CHISEL_CONTEXT = __dirname; 2 | const chiselConfig = require('./chisel.config.js'); 3 | 4 | let extend = 'chisel'; 5 | 6 | if (chiselConfig.react) { 7 | extend = 'chisel/react'; 8 | } 9 | 10 | module.exports = { 11 | root: true, 12 | 13 | extends: extend, 14 | 15 | settings: { 16 | 'import/resolver': { 17 | node: {}, 18 | [require.resolve( 19 | 'chisel-plugin-code-style/eslint-import-resolver-webpack', 20 | )]: { 21 | config: require.resolve('chisel-scripts/webpack.config-sync.js'), 22 | }, 23 | }, 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/header.php: -------------------------------------------------------------------------------- 1 | *:nth-last-child(1) { 16 | margin-bottom: 0; 17 | } 18 | } 19 | } 20 | 21 | .b-accordion__item-title { 22 | margin: 0 !important; 23 | font-size: get-font-size('medium') !important; 24 | } 25 | -------------------------------------------------------------------------------- /packages/chisel-shared-utils/lib/package-manager.js: -------------------------------------------------------------------------------- 1 | let $hasYarn; 2 | function hasYarn() { 3 | return false; // v2 is always using npm 4 | if ($hasYarn !== undefined) return $hasYarn; 5 | 6 | const commandExists = require('command-exists'); 7 | $hasYarn = commandExists.sync('yarn'); 8 | return $hasYarn; 9 | } 10 | 11 | module.exports.hasYarn = hasYarn; 12 | 13 | function installDependencies(opts = {}) { 14 | const execa = require('execa'); 15 | 16 | return execa(hasYarn() ? 'yarn' : 'npm', ['install'], { 17 | stdio: 'inherit', 18 | ...opts, 19 | }); 20 | } 21 | 22 | module.exports.installDependencies = installDependencies; 23 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/AssetsHelpers.php: -------------------------------------------------------------------------------- 1 | ID ) ) { 16 | Timber::render( 'single-password.twig', $context, CacheHelpers::expiry() ); 17 | } else { 18 | Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single.twig' ), $context, CacheHelpers::expiry() ); 19 | } 20 | -------------------------------------------------------------------------------- /docs/content/docs/development/twig.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Twig 3 | excerpt: Chisel uses Twig templating engine. 4 | order: 1300 5 | --- 6 | 7 | In WordPress projects, Twig is implemented via [Timber](https://www.upstatement.com/timber/). In front-end projects, Twig is supported via its JavaScript implementation, [Twig.js](https://github.com/twigjs/twig.js). 8 | 9 | Twig syntax is very intuitive and flexible. For more details on how to work with it, check out the [documentation](https://twig.symfony.com/doc/2.x/). 10 | 11 | When writing Twig templates, follow official [Twig coding standards](https://twig.symfony.com/doc/2.x/coding_standards.html). 12 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/wp.js: -------------------------------------------------------------------------------- 1 | const { runWithExit } = require('chisel-shared-utils'); 2 | 3 | module.exports = (api) => { 4 | api.registerCommand( 5 | 'wp', 6 | (command) => 7 | command 8 | .description('run WP-CLI command') 9 | .allowUnknownOption() 10 | .helpOption('--chisel-help'), 11 | async () => { 12 | const path = require('path'); 13 | 14 | const args = process.argv.slice(3); 15 | const wpCliPath = path.resolve(__dirname, '../..', 'wp-cli.phar'); 16 | 17 | await runWithExit(['php', wpCliPath, '--color', ...args], { 18 | cwd: api.resolveRoot(), 19 | }); 20 | }, 21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/footer.twig: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /docs/content/docs/setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Project setup 3 | excerpt: Learn how to setup Chisel project from the command line 4 | order: 400 5 | --- 6 | 7 | Once you [installed Chisel](/docs/installation), you can setup a project by running the following command on the command line: 8 | 9 | ```bash 10 | chisel create 11 | ``` 12 | 13 | Chisel asks you a few questions about your project and allows you to choose the project type. You can set up two different types of project: 14 | 15 | - [WordPress Website Setup](/docs/setup/wordpress) 16 | - [Static Website Setup](/docs/setup/static) 17 | 18 | Chisel then creates all required files for your project and installs the necessary software. 19 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_product.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .woocommerce div.product { 4 | .woocommerce-tabs ul.tabs li { 5 | color: get-color('primary'); 6 | background-color: get-color('grey-100'); 7 | } 8 | } 9 | 10 | .woocommerce-product-gallery { 11 | overflow: hidden; 12 | background-color: get-color('white'); 13 | border: 1px solid get-color('grey-100'); 14 | border-radius: get-border-radius('small'); 15 | } 16 | 17 | .c-product__gallery { 18 | position: relative; 19 | } 20 | 21 | .c-product-linked { 22 | gap: get-gap('small'); 23 | margin-bottom: get-margin('large'); 24 | } 25 | -------------------------------------------------------------------------------- /docs/src/styles/components/_why-chisel.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #WHY-CHISEL 3 | ========================================================================== */ 4 | 5 | .c-why-chisel__title { 6 | font-size: 3.4rem; 7 | text-align: center; 8 | } 9 | 10 | .c-why-chisel__feature-item { 11 | & + & { 12 | margin-top: 10rem; 13 | 14 | @include bp('medium') { 15 | margin-top: 18rem; 16 | } 17 | } 18 | } 19 | 20 | .c-why-chisel__cta { 21 | display: flex; 22 | align-items: center; 23 | justify-content: center; 24 | } 25 | 26 | .c-why-chisel__cta-text { 27 | font-weight: 500; 28 | margin: 0 8px; 29 | } 30 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/CommentsHelpers.php: -------------------------------------------------------------------------------- 1 | ' ); 24 | } 25 | 26 | return ''; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/composer.js: -------------------------------------------------------------------------------- 1 | const { runWithExit } = require('chisel-shared-utils'); 2 | 3 | module.exports = (api) => { 4 | api.registerCommand( 5 | 'composer', 6 | (command) => 7 | command 8 | .description('run Composer command') 9 | .allowUnknownOption() 10 | .helpOption('--chisel-help'), 11 | async () => { 12 | const path = require('path'); 13 | 14 | const args = process.argv.slice(3); 15 | const composerPath = path.resolve(__dirname, '../..', 'composer.phar'); 16 | 17 | await runWithExit(['php', composerPath, '--ansi', ...args], { 18 | cwd: api.resolve(), 19 | }); 20 | }, 21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /docs/src/styles/utilities/_hide.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #HIDE 3 | ========================================================================== */ 4 | 5 | /** 6 | * Hide only visually, but have it available for screen readers: 7 | * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility 8 | */ 9 | 10 | .u-hidden-visually { 11 | @include hidden-visually(); 12 | } 13 | 14 | /** 15 | * Hide visually and from screen readers. 16 | */ 17 | 18 | .u-hidden { 19 | display: none !important; 20 | } 21 | 22 | .u-hidden\@small { 23 | display: none; 24 | 25 | @include bp(medium) { 26 | display: block; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/components/slider.twig: -------------------------------------------------------------------------------- 1 | {% set slider_params = slider_prepare_params(params) %} 2 | 3 |
4 | 5 |
6 | 7 |
8 | 9 | {{ slides_html }} 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/page.php: -------------------------------------------------------------------------------- 1 | ID ) ) { 16 | Timber::render( 'single-password.twig', $context, CacheHelpers::expiry() ); 17 | } else { 18 | $templates = array( 'page-' . $timber_post->post_name . '.twig', 'page.twig' ); 19 | 20 | if ( is_front_page() ) { 21 | array_unshift( $templates, 'front-page.twig' ); 22 | } 23 | 24 | Timber::render( $templates, $context, CacheHelpers::expiry() ); 25 | } 26 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_headings.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #HEADINGS 3 | ========================================================================== */ 4 | 5 | /** 6 | * Simple default styles for headings 1 through 6. Anything more opinionated 7 | * than simple font-size changes should likely be applied via classes (see: 8 | * http://csswizardry.com/2016/02/managing-typography-on-large-apps/). 9 | */ 10 | 11 | h1 { 12 | font-size: 2.25rem; 13 | } 14 | 15 | h2 { 16 | font-size: 1.75rem; 17 | } 18 | 19 | h3 { 20 | font-size: 1.5rem; 21 | } 22 | 23 | h4 { 24 | font-size: 1.25rem; 25 | } 26 | 27 | h5 { 28 | font-size: 1.125rem; 29 | } 30 | 31 | h6 { 32 | font-size: 1rem; 33 | } 34 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-spacer.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-spacer { 4 | padding: get-margin('normal') 0; 5 | margin: 0 !important; 6 | margin-block-start: 0 !important; 7 | 8 | &.is-style { 9 | &-tiny { 10 | padding: get-margin('tiny') 0; 11 | } 12 | 13 | &-small { 14 | padding: get-margin('small') 0; 15 | } 16 | 17 | &-medium { 18 | padding: get-margin('medium') 0; 19 | } 20 | 21 | &-large { 22 | padding: get-margin('large') 0; 23 | } 24 | 25 | &-xlarge { 26 | padding: get-margin('xlarge') 0; 27 | } 28 | 29 | &-big { 30 | padding: get-margin('big') 0; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.devcontainer/post-create-command.sh.chisel-tpl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | sudo chown "$USER:$USER" node_modules vendor 6 | touch .use-devcontainer 7 | 8 | pushd ../../.. 9 | 10 | sudo chown "$USER:$USER" . index.php wp-config.php 11 | if [ -d .git ] ; then sudo chown "$USER:$USER" .git ; fi 12 | chmod +x .devcontainer/compose .devcontainer/exec 13 | <% if (app.devcontainer) { %> 14 | { 15 | npx --yes generator-chisel@<%= chiselVersion %> --devcontainer-complete <%= app.responsesAsBase64 %> 16 | exit 17 | } 18 | <% } %> 19 | popd 20 | <% if (!app.devcontainer) { %> 21 | npm install 22 | npm run wp-config -- --devcontainer 23 | npm run composer install 24 | npm run build<% } %> 25 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/priorities.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | HELLO: 10, 3 | CHECK_UPDATE: 20, 4 | CHECK_EXIST: 30, 5 | 6 | // Basic: 7 | PROMPT: 100, 8 | 9 | // we can copy wp files here 10 | // downloading WP seems to preserve files created earlier 11 | COPY: 500, 12 | 13 | // UPDATE_CONFIG: 900, 14 | 15 | INSTALL_DEPENDENCIES: 1000, 16 | 17 | // we need chisel-scripts and plugins installed to run wp commands 18 | // we separate different steps as future proofing 19 | WP_DOWNLOAD: 1100, 20 | WP_CONFIG: 1200, 21 | WP_INSTALL: 1300, 22 | WP_INSTALL_PLUGINS: 1400, 23 | WP_THEME_ACTIVATE: 1500, 24 | WP_PLUGINS: 1600, 25 | 26 | FORMAT: 2500, 27 | 28 | BUILD: 3000, 29 | 30 | END_MESSAGE: 5000, 31 | }; 32 | -------------------------------------------------------------------------------- /docs/src/styles/generic/_shared.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #SHARED 3 | ========================================================================== */ 4 | 5 | /** 6 | * Shared declarations for certain elements. 7 | */ 8 | 9 | /** 10 | * Always declare margins in the same direction: 11 | * csswizardry.com/2012/06/single-direction-margin-declarations 12 | */ 13 | 14 | address, 15 | h1, 16 | h2, 17 | h3, 18 | h4, 19 | h5, 20 | h6, 21 | blockquote, 22 | p, 23 | pre, 24 | dl, 25 | ol, 26 | ul, 27 | figure, 28 | hr, 29 | table, 30 | fieldset { 31 | margin-bottom: 1.3rem; 32 | } 33 | 34 | /** 35 | * Consistent indentation for lists. 36 | */ 37 | 38 | dd, 39 | ol, 40 | ul { 41 | margin-left: 1rem; 42 | } 43 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_badge.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-badge { 4 | display: inline-block; 5 | padding: get-padding('tiny') get-padding('small'); 6 | font-size: px-rem(12); 7 | font-weight: 700; 8 | color: get-color('white'); 9 | text-decoration: none; 10 | text-transform: uppercase; 11 | background-color: get-color('foreground'); 12 | border-radius: get-border-radius('little'); 13 | transition: get-transition('normal'); 14 | 15 | &:hover { 16 | color: get-color('white'); 17 | background-color: get-color('primary'); 18 | } 19 | 20 | .is-disabled & { 21 | color: get-color('grey-900'); 22 | background-color: get-color('grey-100'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/views/woocommerce/linked-products.twig: -------------------------------------------------------------------------------- 1 |
2 | {% if linked_title %} 3 |
4 |

{{ linked_title }}

5 |
6 | {% endif %} 7 | 8 |
9 |
10 | {% for post in linked_products %} 11 | {% include "woocommerce/content-product.twig" with {post: post} %} 12 | {% endfor %} 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_IMAGE_VERSION 2 | FROM wordpress:${BASE_IMAGE_VERSION} 3 | 4 | ARG CHISEL_PORT=3000 5 | 6 | # Install MariaDB Client 7 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 8 | && apt-get -y install --no-install-recommends mariadb-client 9 | 10 | # Install WP CLI 11 | RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ 12 | && chmod +x wp-cli.phar \ 13 | && mv wp-cli.phar /usr/local/bin/wp 14 | 15 | # Update port 16 | RUN sed -i 's/80/${CHISEL_PORT}/' /etc/apache2/ports.conf 17 | 18 | # Use wordpress user to run apache 19 | ENV APACHE_RUN_USER wordpress 20 | ENV APACHE_RUN_GROUP wordpress 21 | ENV CHISEL_PORT=${CHISEL_PORT} 22 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/elements/_shared.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | p, 4 | ul, 5 | ol, 6 | li, 7 | address, 8 | pre, 9 | fieldset, 10 | hr, 11 | dl, 12 | blockquote, 13 | table, 14 | figure { 15 | margin-top: 0; 16 | margin-bottom: get-margin('normal'); 17 | } 18 | 19 | fieldset { 20 | padding: 0; 21 | } 22 | 23 | li { 24 | margin-bottom: get-margin('tiny'); 25 | 26 | > ul, 27 | > ol { 28 | margin-top: get-margin('tiny'); 29 | } 30 | } 31 | 32 | ul, 33 | ol { 34 | padding-left: get-padding('medium'); 35 | } 36 | 37 | hr { 38 | display: block; 39 | } 40 | 41 | mark { 42 | font-weight: 700; 43 | background-color: transparent; 44 | } 45 | 46 | strong { 47 | font-weight: 700; 48 | } 49 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/twig_cs.php: -------------------------------------------------------------------------------- 1 | in( __DIR__ . '/views' ); 7 | $finder_2 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/src/blocks' ); 8 | $finder_3 = Twigcs\Finder\TemplateFinder::create()->in( __DIR__ . '/src/blocks-acf' ); 9 | 10 | return Twigcs\Config\Config::create() 11 | ->addFinder( $finder_1 ) 12 | ->addFinder( $finder_2 ) 13 | ->addFinder( $finder_3 ) 14 | ->setName( 'chisel' ) 15 | ->setSeverity( 'warning' ) 16 | ->setDisplay( Twigcs\Config\ConfigInterface::DISPLAY_BLOCKING ) 17 | // ->setReporter( 'json' ) phpcs:ignore 18 | ->setRuleSet( Twigcs\Ruleset\Official::class ); 19 | -------------------------------------------------------------------------------- /docs/src/templates/components/block.twig: -------------------------------------------------------------------------------- 1 | {% if loop.first == false %} 2 |
3 | {% endif %} 4 |
5 |
6 |

{{ block_item.title }}

7 |
8 |
9 | {{ block_item.description }} 10 |
11 |
12 |
13 |
14 | {{ block_item.image.alt }} 21 |
22 |
23 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_block-sidebar.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | $sidebar-width-xlarge: 350px; 4 | $sidebar-width-full: 450px; 5 | 6 | .block-editor-block-inspector { 7 | opacity: 0; 8 | 9 | &.e-block-sidebar { 10 | opacity: 1; 11 | 12 | &--core-spacer { 13 | // Hide the height settings for the spacer block. 14 | .block-editor-block-card + div + div { 15 | display: none; 16 | } 17 | } 18 | } 19 | } 20 | 21 | // Make the sidebar panel a bit wider. 22 | .interface-complementary-area__fill { 23 | @include bp(782px) { 24 | width: px-rem(400) !important; 25 | 26 | > .interface-complementary-area { 27 | width: 100% !important; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *.7z 11 | *.dmg 12 | *.gz 13 | *.iso 14 | *.rar 15 | *.tar 16 | *.zip 17 | *~ 18 | 19 | # OS or Editor folders 20 | .DS_Store 21 | ._* 22 | Desktop.ini 23 | Thumbs.db 24 | .Spotlight-V100 25 | .Trashes 26 | .cache 27 | .project 28 | .settings 29 | .tmproj 30 | *.esproj 31 | nbproject 32 | *.sublime-project 33 | *.sublime-workspace 34 | .idea 35 | .vscode 36 | 37 | # Folders to ignore 38 | temp 39 | tmp 40 | .tmp 41 | node_modules 42 | coverage 43 | src/bower_components 44 | /dist 45 | 46 | # Others 47 | npm-debug.log 48 | .rbenv 49 | .rbenv-version 50 | .ruby-gemset 51 | .ruby-version 52 | .rvmrc 53 | .vagrant 54 | 55 | # Chisel 56 | /test-projects 57 | /.changelog 58 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-admin/_acf.scss: -------------------------------------------------------------------------------- 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 | } 30 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_archive.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-shop { 4 | padding-top: get-padding('normal'); 5 | } 6 | 7 | .c-shop-items { 8 | padding-bottom: get-padding('large'); 9 | } 10 | 11 | .c-shop__sort { 12 | display: flex; 13 | flex-direction: row; 14 | align-items: center; 15 | justify-content: space-between; 16 | padding-top: get-padding('normal'); 17 | margin-bottom: get-margin('large'); 18 | 19 | .woocommerce-result-count, 20 | .woocommerce-ordering, 21 | .woocommerce-ordering select { 22 | margin: 0; 23 | } 24 | 25 | @include bp-down(small) { 26 | flex-direction: column; 27 | 28 | .woocommerce-result-count { 29 | margin-bottom: get-margin('small'); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_pagination.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-pagination { 4 | width: 100%; 5 | margin: get-padding('large') auto; 6 | clear: both; 7 | } 8 | 9 | .c-pagination__items { 10 | display: flex; 11 | align-items: center; 12 | justify-content: center; 13 | width: 100%; 14 | padding: 0; 15 | margin: 0; 16 | list-style-type: none; 17 | } 18 | 19 | .c-pagination__item { 20 | margin: 0; 21 | 22 | &--page { 23 | .page-number { 24 | display: inline-block; 25 | padding: get-padding('tiny') get-padding('little'); 26 | text-decoration: none; 27 | 28 | &.current { 29 | color: get-color('foreground'); 30 | text-decoration: underline; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "root", 3 | "private": true, 4 | "workspaces": [ 5 | "packages/*" 6 | ], 7 | "scripts": { 8 | "lint": "eslint --no-eslintrc -c .eslintrc.js **/*.js", 9 | "version": "node scripts/index-versions.js", 10 | "prepare-links": "node scripts/prepare-links.js", 11 | "lerna-version": "lerna version --no-private", 12 | "lerna-publish": "lerna publish from-git", 13 | "lerna-publish-next": "lerna publish from-git --pre-dist-tag next" 14 | }, 15 | "devDependencies": { 16 | "conventional-changelog": "^3.1.21", 17 | "eslint": "^7.2.0", 18 | "execa": "^4.0.2", 19 | "fs-extra": "^9.0.1", 20 | "globby": "^11.0.1", 21 | "lerna": "^3.22.0", 22 | "lerna-changelog": "^1.0.1", 23 | "prettier": "^2.0.5", 24 | "stream-to-promise": "^3.0.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.gitignore.chisel-tpl: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *.7z 11 | *.dmg 12 | *.gz 13 | *.iso 14 | *.rar 15 | *.tar 16 | *~ 17 | 18 | # OS or Editor folders 19 | .DS_Store 20 | ._* 21 | Desktop.ini 22 | Thumbs.db 23 | .Spotlight-V100 24 | .Trashes 25 | .cache 26 | .project 27 | .settings 28 | .tmproj 29 | *.esproj 30 | nbproject 31 | *.sublime-project 32 | *.sublime-workspace 33 | .idea 34 | 35 | # Folders to ignore 36 | temp 37 | tmp 38 | .tmp 39 | node_modules 40 | 41 | # Others 42 | npm-debug.log 43 | .rbenv 44 | .rbenv-version 45 | .ruby-gemset 46 | .ruby-version 47 | .rvmrc 48 | .vagrant 49 | 50 | # Chisel 51 | /dev-vhost.conf 52 | /wp-content/uploads 53 | /wp-config-local.php 54 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons/animated/loader.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/YoastHelpers.php: -------------------------------------------------------------------------------- 1 | ', '', false ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/src/styles/components/_logo.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #LOGO 3 | ========================================================================== */ 4 | 5 | $logo-base-font-size: 18; 6 | 7 | @function logo-em($size) { 8 | @return $size / $logo-base-font-size * 1em; 9 | } 10 | 11 | .c-logo__link { 12 | display: flex; 13 | align-items: center; 14 | text-decoration: none; 15 | 16 | > * { 17 | text-decoration: none; 18 | } 19 | } 20 | 21 | .c-logo__icon-wrapper { 22 | padding-right: logo-em(8.83); 23 | } 24 | 25 | .c-logo__icon { 26 | display: block; 27 | width: 1em; 28 | height: 1em; 29 | font-size: logo-em(44.16); 30 | } 31 | 32 | .c-logo__text { 33 | font-size: logo-em(33); 34 | font-weight: 700; 35 | color: $color-secondary; 36 | text-decoration: none; 37 | } 38 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_header.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .c-header { 4 | background-color: get-color('grey-100'); 5 | 6 | .c-logo { 7 | max-width: px-rem(200); 8 | height: px-rem(80); 9 | 10 | &__link { 11 | display: inline-flex; 12 | align-items: center; 13 | justify-content: flex-start; 14 | width: 100%; 15 | height: 100%; 16 | } 17 | 18 | img { 19 | width: 100%; 20 | height: 100%; 21 | object-fit: contain; 22 | } 23 | } 24 | } 25 | 26 | .c-header__inner { 27 | position: relative; 28 | display: flex; 29 | gap: get-gap('normal'); 30 | align-items: center; 31 | justify-content: space-between; 32 | padding-top: get-padding('little'); 33 | padding-bottom: get-padding('little'); 34 | } 35 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_product-item.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../../styles/components/posts-items' as *; 3 | 4 | .c-product-item { 5 | position: relative; 6 | } 7 | 8 | .c-product-item__inner { 9 | @extend .c-post-item__content; 10 | 11 | align-items: center; 12 | } 13 | 14 | .c-product-item__content { 15 | @extend .c-post-item__content; 16 | 17 | margin-bottom: get-margin('normal'); 18 | text-align: center; 19 | 20 | &:hover img { 21 | transform: scale(1.05); 22 | } 23 | } 24 | 25 | .c-product-item__image { 26 | @extend .c-post-item__image; 27 | } 28 | 29 | .c-product-item__title { 30 | margin: get-margin('little') 0; 31 | font-size: clamp(get-font-size('normal'), calc(1.667vw + 0.5rem), get-font-size('extra-large')); 32 | font-weight: 700; 33 | } 34 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/objects/_grid.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../../design/settings'; 3 | 4 | $_layout-gutter: settings.$layout-gutter; 5 | $_layout-columns-no: settings.$layout-columns-no; 6 | $_breakpoints: settings.$breakpoints; 7 | 8 | .o-grid { 9 | display: grid; 10 | gap: $_layout-gutter; 11 | width: 100%; 12 | 13 | &--cols { 14 | @for $i from 1 through $_layout-columns-no { 15 | &-#{$i} { 16 | grid-template-columns: repeat($i, 1fr); 17 | } 18 | } 19 | 20 | @each $name, $val in $_breakpoints { 21 | @include bp($name) { 22 | @for $i from 1 through $_layout-columns-no { 23 | &-#{$i}-#{$name} { 24 | grid-template-columns: repeat($i, 1fr); 25 | } 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_images.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #IMAGES 3 | ========================================================================== */ 4 | 5 | /** 6 | * 1. Fluid images for responsive purposes. 7 | * 2. Offset `alt` text from surrounding copy. 8 | * 3. Setting `vertical-align` removes the whitespace that appears under `img` 9 | * elements when they are dropped into a page as-is. Safer alternative to 10 | * using `display: block;`. 11 | */ 12 | 13 | img { 14 | font-style: italic; /* [2] */ 15 | max-width: 100%; /* [1] */ 16 | vertical-align: middle; /* [3] */ 17 | } 18 | 19 | /** 20 | * 1. If a `width` and/or `height` attribute have been explicitly defined, let’s 21 | * not make the image fluid. 22 | */ 23 | 24 | img[width], 25 | img[height] { 26 | max-width: none; 27 | } 28 | -------------------------------------------------------------------------------- /docs/content/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | excerpt: Chisel is a creation of Xfive, a web development studio specializing in modern WordPress development. 4 | order: 100 5 | --- 6 | 7 | At Xfive we love WordPress but we think that WordPress development could be a slightly more pleasant experience. That’s why we are fans of [Timber library](https://upstatement.com/timber/). 8 | 9 | A few years ago we created Chisel, a tool for creating and developing WordPress themes based on Timber. 10 | 11 | The latest version of Chisel was completely rewritten to Webpack and adds a bunch of new [features](https://rewrite-with-webpack-docs-redesign--getchisel.netlify.app/docs/features), including support for static websites. 12 | 13 | If you are looking for documentation of the previous, Gulp based, version, it’s [here](https://old.getchisel.co/). 14 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/ChiselImage.php: -------------------------------------------------------------------------------- 1 | HTML. 21 | */ 22 | public function responsive( string $size = 'medium', array $attrs = array() ): string { 23 | if ( isset( $attrs['class'] ) ) { 24 | $attrs['class'] .= sprintf( ' wp-image-%s size-%s', absint( $this->ID ), esc_attr( $size ) ); 25 | } 26 | 27 | return wp_get_attachment_image( $this->ID, $size, false, $attrs ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/DataHelpers.php: -------------------------------------------------------------------------------- 1 | { 9 | return (props) => { 10 | const { setAttributes, attributes, name } = props; 11 | 12 | useEffect(() => { 13 | if (name === 'core/spacer') { 14 | setAttributes({ 15 | height: 'auto', 16 | }); 17 | } 18 | }, [attributes?.height]); 19 | 20 | return ( 21 | <> 22 | 23 | 24 | ); 25 | }; 26 | }, 'chisel/blocks/blockEdit'), 27 | 10, 28 | ); 29 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/archive.php: -------------------------------------------------------------------------------- 1 | slug . '.twig' ); 17 | } elseif ( is_category() ) { 18 | array_unshift( $templates, 'archive-' . get_queried_object()->slug . '.twig' ); 19 | } elseif ( is_post_type_archive() ) { 20 | array_unshift( $templates, 'archive-' . get_post_type() . '.twig' ); 21 | } elseif ( is_tax() ) { 22 | array_unshift( $templates, 'archive-' . get_queried_object()->taxonomy . '.twig' ); 23 | } 24 | 25 | Timber::render( $templates, $context, CacheHelpers::expiry() ); 26 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/index.php: -------------------------------------------------------------------------------- 1 | absint( get_option( 'posts_per_page' ) ), 24 | 'post_type' => 'post', 25 | ); 26 | 27 | Timber::render( $templates, $context, CacheHelpers::expiry() ); 28 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/blocks-acf/slider/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chisel/slider", 3 | "title": "Slider", 4 | "description": "Images slider", 5 | "category": "chisel-blocks", 6 | "icon": "slides", 7 | "apiVersion": 3, 8 | "keywords": ["slider", "carousel", "images"], 9 | "textdomain": "chisel", 10 | "acf": { 11 | "mode": "preview", 12 | "usePostMeta": false, 13 | "renderCallback": "\\Chisel\\Helpers\\BlocksHelpers::acf_block_render" 14 | }, 15 | "supports": { 16 | "anchor": true, 17 | "align": ["wide", "full"], 18 | "alignWide": true, 19 | "alignContent": false, 20 | "className": true, 21 | "customClassName": true, 22 | "multiple": true, 23 | "reusable": true 24 | }, 25 | "ignoreScripts": ["script"], 26 | "script": "file:./script.js", 27 | "style": ["file:./style-script.css"] 28 | } 29 | -------------------------------------------------------------------------------- /docs/src/templates/components/why-chisel.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{ args.sectionTitle }}

4 |
    5 | {% for block_item in args.blocks %} 6 |
  • 7 | {% include 'components/block.twig' %} 8 |
  • 9 | {% endfor %} 10 |
11 |
12 | 13 |

14 | {{ args.ctaLink }} 15 |

16 | 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /docs/content/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Documentation 3 | excerpt: Our goal is to provide comprehensive and up-to-date documentation of Chisel. 4 | order: 100 5 | --- 6 | 7 | What follows is an outline of particular documentation sections: 8 | 9 | ## [Features](/docs/features) 10 | Chisel features that will make your developer’s life easier. 11 | 12 | ## [Installation](/docs/installation) 13 | 14 | Install necessary software so you can work with Chisel. 15 | 16 | ## [Project setup](/docs/setup) 17 | 18 | Learn how to setup Chisel project from the command line. 19 | 20 | ## [Project structure](/docs/structure) 21 | 22 | Once your Chisel project is setup, get familiar with its structure. 23 | 24 | ## [Development](/docs/development) 25 | 26 | Learn how to develop WordPress themes or front-end templates in Chisel. 27 | 28 | ## [In simple terms](/docs/simple) 29 | 30 | Explanation of what Chisel is in simple terms. 31 | 32 | -------------------------------------------------------------------------------- /docs/src/styles/elements/_html-body.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #PAGE 3 | ========================================================================== */ 4 | 5 | html { 6 | background: $color-bg; 7 | color: $color-text; 8 | font-family: $font-sans-serif; 9 | font-size: 0.625rem; 10 | line-height: 1.5; 11 | -moz-osx-font-smoothing: grayscale; 12 | -webkit-font-smoothing: antialiased; 13 | text-rendering: optimizeLegibility; 14 | scroll-behavior: smooth; 15 | overflow-y: scroll; 16 | } 17 | 18 | .no-scroll { 19 | height: 100vh; 20 | overflow: hidden; 21 | 22 | @supports (-webkit-touch-callout: none) { 23 | height: fill-available; 24 | 25 | body { 26 | min-height: fill-available; 27 | } 28 | } 29 | } 30 | 31 | body { 32 | font-size: 1.8rem; 33 | display: flex; 34 | min-height: 100vh; 35 | flex-direction: column; 36 | } 37 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/footer.php: -------------------------------------------------------------------------------- 1 | .alignfull { 23 | position: relative; 24 | left: -16px; 25 | width: calc(100% + 32px); 26 | max-width: calc(100% + 32px); 27 | 28 | @include bp(xlarge) { 29 | @include alignfull; 30 | } 31 | } 32 | 33 | > .alignwide { 34 | position: relative; 35 | 36 | @include bp(full) { 37 | @include alignwide; 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /docs/src/styles/objects/_table.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #TABLE 3 | ========================================================================== */ 4 | 5 | /** 6 | * A simple object for manipulating the structure of HTML `table`s. 7 | */ 8 | 9 | .o-table { 10 | width: 100%; 11 | } 12 | 13 | /* Equal-width table cells. 14 | ========================================================================== */ 15 | 16 | /** 17 | * `table-layout: fixed` forces all cells within a table to occupy the same 18 | * width as each other. This also has performance benefits: because the browser 19 | * does not need to (re)calculate cell dimensions based on content it discovers, 20 | * the table can be rendered very quickly. Further reading: 21 | * https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout#Values 22 | */ 23 | 24 | .o-table--fixed { 25 | table-layout: fixed; 26 | } 27 | -------------------------------------------------------------------------------- /docs/src/templates/components/page-nav.twig: -------------------------------------------------------------------------------- 1 | {% if post.parent %} 2 | 24 | {% endif %} 25 | -------------------------------------------------------------------------------- /docs/src/assets/images/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/chisel-shared-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chisel-shared-utils", 3 | "version": "2.0.0-alpha.1", 4 | "description": "TODO", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/xfiveco/generator-chisel.git", 9 | "directory": "packages/chisel-shared-utils" 10 | }, 11 | "author": { 12 | "name": "Xfive", 13 | "email": "hello@xfive.co", 14 | "url": "https://www.xfive.co" 15 | }, 16 | "homepage": "https://www.getchisel.co/", 17 | "license": "MIT", 18 | "scripts": { 19 | "test": "echo \"Error: run tests from root\" && exit 1" 20 | }, 21 | "bugs": { 22 | "url": "https://github.com/xfiveco/generator-chisel/issues" 23 | }, 24 | "dependencies": { 25 | "chalk": "^4.1.0", 26 | "command-exists": "^1.2.9", 27 | "execa": "^4.0.2", 28 | "fs-extra": "^9.0.1", 29 | "globby": "^11.0.1", 30 | "lodash": "^4.17.15" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/facebook-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/styles/objects/_layout.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #LAYOUT 3 | ========================================================================== */ 4 | 5 | /* Simple flexbox layout system */ 6 | 7 | .o-layout { 8 | display: block; 9 | 10 | @include bp(medium) { 11 | display: flex; 12 | } 13 | } 14 | 15 | .o-layout__item { 16 | flex: 1; 17 | } 18 | 19 | .o-layout--guttered { 20 | justify-content: space-between; 21 | 22 | > .o-layout__item { 23 | flex: none; 24 | } 25 | } 26 | 27 | .o-layout--2 { 28 | > .o-layout__item { 29 | @include bp(medium) { 30 | width: 49%; 31 | } 32 | } 33 | } 34 | 35 | .o-layout--3 { 36 | > .o-layout__item { 37 | @include bp(medium) { 38 | width: 32%; 39 | } 40 | } 41 | } 42 | 43 | .o-layout--4 { 44 | > .o-layout__item { 45 | @include bp(medium) { 46 | width: 24%; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_render-appender.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .block-editor-block-list__block.has-custom-render-appender { 4 | .block-list-appender { 5 | position: relative; 6 | width: 100%; 7 | margin: get-margin('small') 0; 8 | } 9 | 10 | .c-block-appender { 11 | display: flex; 12 | align-items: center; 13 | justify-content: center; 14 | width: 100%; 15 | padding: get-padding('normal'); 16 | font-size: get-font-size('normal'); 17 | color: get-color('black'); 18 | background-color: get-color('grey-100'); 19 | border: 1px solid get-color('grey-300'); 20 | transition: none; 21 | 22 | span { 23 | line-height: 1; 24 | transition: none; 25 | } 26 | 27 | .dashicon { 28 | position: relative; 29 | top: px-rem(2px); 30 | margin-right: px-rem(8px); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/tools/_screen-readers.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // See: https://a11yproject.com/posts/how-to-hide-content/ 3 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 4 | 5 | @mixin sr-only() { 6 | position: absolute; 7 | width: 1px; 8 | height: 1px; 9 | padding: 0; 10 | overflow: hidden; 11 | clip: rect(0, 0, 0, 0); 12 | white-space: nowrap; 13 | border: 0; 14 | } 15 | 16 | // Use in conjunction with .sr-only to only display content when it's focused. 17 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 18 | // Credit: HTML5 Boilerplate 19 | 20 | @mixin sr-only-focusable() { 21 | &:active, 22 | &:focus { 23 | position: static; 24 | width: auto; 25 | height: auto; 26 | overflow: visible; 27 | clip: auto; 28 | white-space: normal; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/example-blocks/blocks/example/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * React hook that is used to mark the block wrapper element. 3 | * It provides all the necessary props like the class name. 4 | * 5 | * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops 6 | */ 7 | import { useBlockProps } from '@wordpress/block-editor'; 8 | 9 | /** 10 | * The save function defines the way in which the different attributes should 11 | * be combined into the final markup, which is then serialized by the block 12 | * editor into `post_content`. 13 | * 14 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save 15 | * 16 | * @return {Element} Element to render. 17 | */ 18 | export default function save() { 19 | return

{'Example Block – hello from the saved content!'}

; 20 | } 21 | -------------------------------------------------------------------------------- /docs/content/tutorials.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tutorials 3 | excerpt: Get inspired with our tutorials on how to effectively develop websites with Chisel. 4 | order: 00 5 | --- 6 | 7 | ## [Chisel Recipes](https://github.com/xfiveco/chisel-recipes) 8 | 9 | Collection of solutions and tips for developing Chisel projects. 10 | 11 | ## [Craft perfect websites with Chisel](https://www.xfive.co/blog/craft-perfect-websites-chisel/) 12 | 13 | A detailed comparison of old-school and modern web development workflows. Find out how tools like Chisel can make your life easier. 14 | 15 | ## [An MVC-like WordPress Development with ACF and Timber](https://www.xfive.co/blog/mvc-like-wordpress-development-acf-timber/) 16 | 17 | Improve your WordPress themes with ACF, Timber, and a grain of inspiration from the MVC pattern. 18 | 19 | ## [Easy-to-use Code Blocks in WordPress](https://www.xfive.co/blog/easy-use-code-blocks-wordpress/) 20 | 21 | Create easy-to-use code blocks in WordPress with ACF, Timber, and Prism.js 22 | -------------------------------------------------------------------------------- /docs/src/styles/objects/_icons.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #ICONS 3 | ========================================================================== */ 4 | 5 | .o-icons::before, 6 | %o-icons::before { 7 | content: ''; 8 | background-size: contain; 9 | background-repeat: no-repeat; 10 | display: block; 11 | } 12 | 13 | .o-icons--star::before { 14 | width: 33px; 15 | height: 33px; 16 | background-image: url('~assets/images/star.svg'); 17 | } 18 | 19 | .o-icons--play::before { 20 | background-image: url('~assets/images/play.svg'); 21 | height: 50px; 22 | width: 50px; 23 | border-radius: 100%; 24 | } 25 | 26 | .o-icons--arrow::before { 27 | background-image: url('~assets/images/arrow.svg'); 28 | width: 28px; 29 | height: 17px; 30 | border-radius: 100%; 31 | } 32 | 33 | %o-icons--checkmark::before { 34 | background-image: url('~assets/images/checkmark.svg'); 35 | width: 17px; 36 | height: 17px; 37 | } 38 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/templates/acf/block/view.js.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * Use this file for JavaScript code that you want to run in the front-end 3 | * on posts/pages that contain this block. 4 | * 5 | * When this file is defined as the value of the `viewScript` property 6 | * in `block.json` it will be enqueued on the front end of the site. 7 | * 8 | * Example: 9 | * 10 | * ```js 11 | * { 12 | * "viewScript": "file:./view.js" 13 | * } 14 | * ``` 15 | * 16 | * If you're not making any changes to this file because your project doesn't need any 17 | * JavaScript running in the front-end, then you should delete this file and remove 18 | * the `viewScript` property from `block.json`. 19 | * 20 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script 21 | */ 22 | 23 | /* eslint-disable no-console */ 24 | console.log("Hello World! (from {{namespace}}-{{slug}} block)"); 25 | /* eslint-enable no-console */ 26 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/CacheHelpers.php: -------------------------------------------------------------------------------- 1 | cache_everything ) { 28 | return 0; 29 | } 30 | 31 | return $custom_expiry ?? (int) $cache->cache_expiry; 32 | } 33 | 34 | /** 35 | * Clear twig environment cache. 36 | * 37 | * @return void 38 | */ 39 | public static function clear_environment_cache(): void { 40 | $loader = new Loader(); 41 | $loader->clear_cache_twig(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/mods/blocks-alignment.js: -------------------------------------------------------------------------------- 1 | /* global chiselEditorScripts */ 2 | 3 | import { addFilter } from '@wordpress/hooks'; 4 | import { createHigherOrderComponent } from '@wordpress/compose'; 5 | import { useEffect } from '@wordpress/element'; 6 | 7 | const chiselBlocksDefaultAlignment = createHigherOrderComponent((BlockEdit) => { 8 | return (props) => { 9 | const { setAttributes, isSelected, name } = props; 10 | 11 | useEffect(() => { 12 | if (isSelected) { 13 | const alignment = chiselEditorScripts?.blocksDefaultAlignment?.[name]; 14 | 15 | if (alignment) { 16 | setAttributes({ 17 | align: alignment, 18 | }); 19 | } 20 | } 21 | }, []); 22 | 23 | return ; 24 | }; 25 | }, 'blocksAlignmentCustomControls'); 26 | addFilter('editor.BlockEdit', 'chisel/blocks-alignment', chiselBlocksDefaultAlignment); 27 | -------------------------------------------------------------------------------- /packages/chisel-scripts/fetch-packages.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { execa } = require('chisel-shared-utils'); 3 | 4 | const get = (url) => 5 | fetch(url).then((res) => { 6 | if (!res.ok) { 7 | throw new Error( 8 | `Failed to fetch ${url} with ${res.statusText} (${res.status})`, 9 | ); 10 | } 11 | 12 | return res.arrayBuffer(); 13 | }); 14 | 15 | (async () => { 16 | const fileWpCli = await get( 17 | 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar', 18 | ); 19 | fs.writeFileSync('./wp-cli.phar', new Uint8Array(fileWpCli)); 20 | await execa('php', ['./wp-cli.phar', '--info']); 21 | 22 | const fileComposer = await get( 23 | 'https://getcomposer.org/download/latest-2.x/composer.phar', 24 | ); 25 | fs.writeFileSync('./composer.phar', new Uint8Array(fileComposer)); 26 | await execa('php', ['./composer.phar', '--version']); 27 | })().catch((err) => { 28 | console.error(err); 29 | process.exit(1); 30 | }); 31 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Helpers/AjaxHelpers.php: -------------------------------------------------------------------------------- 1 | 22 | { '{{title}} – hello from the saved content!' } 23 |

24 | ); 25 | } 26 | {{/isStaticVariant}} 27 | -------------------------------------------------------------------------------- /docs/src/styles/generic/_reset.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #RESET 3 | ========================================================================== */ 4 | 5 | /** 6 | * A very simple reset that sits on top of Normalize.css. 7 | */ 8 | 9 | body, 10 | h1, 11 | h2, 12 | h3, 13 | h4, 14 | h5, 15 | h6, 16 | blockquote, 17 | p, 18 | pre, 19 | dl, 20 | dd, 21 | ol, 22 | ul, 23 | figure, 24 | hr, 25 | fieldset, 26 | legend { 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | /** 32 | * Remove trailing margins from nested lists. 33 | */ 34 | 35 | li > { 36 | ol, 37 | ul { 38 | margin-bottom: 0; 39 | } 40 | } 41 | 42 | /** 43 | * Remove default table spacing. 44 | */ 45 | 46 | table { 47 | border-collapse: collapse; 48 | border-spacing: 0; 49 | } 50 | 51 | /** 52 | * 1. Reset Chrome and Firefox behaviour which sets a `min-width: min-content;` 53 | * on fieldsets. 54 | */ 55 | 56 | fieldset { 57 | min-width: 0; /* [1] */ 58 | border: 0; 59 | } 60 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/chisel-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/blocks/_core-media-text.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .wp-block-media-text { 4 | > .wp-block-media-text__content { 5 | padding: 0 0 0 get-padding('big'); 6 | 7 | &:last-child { 8 | margin-bottom: 0; 9 | } 10 | } 11 | 12 | &.has-media-on-the-right { 13 | > .wp-block-media-text__content { 14 | padding: 0 get-padding('big') 0 0; 15 | } 16 | } 17 | 18 | &.has-background { 19 | > .wp-block-media-text__content { 20 | padding: 0 get-padding('big'); 21 | } 22 | } 23 | 24 | @include bp-down(medium) { 25 | &.is-stacked-on-mobile { 26 | grid-template-columns: 100% !important; 27 | 28 | > .wp-block-media-text__media { 29 | grid-row: 1; 30 | grid-column: 1; 31 | } 32 | 33 | > .wp-block-media-text__content { 34 | grid-row: 2; 35 | grid-column: 1; 36 | padding: get-padding('normal') 0 0; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/chisel-shared-utils/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | 4 | 5 | ## 2.0.0-alpha.1 (2024-11-12) 6 | 7 | - V2: Add Devcontainers (#538) ([b878421](https://github.com/xfiveco/generator-chisel/commit/b878421)), closes [#538](https://github.com/xfiveco/generator-chisel/issues/538) 8 | 9 | ## 2.0.0-alpha.0 (2024-09-08) 10 | 11 | - Add Coding Standards, Minor Improvements ([cfcb017](https://github.com/xfiveco/generator-chisel/commit/cfcb017)) 12 | - cleanup, working start and build ([0f82f3b](https://github.com/xfiveco/generator-chisel/commit/0f82f3b)) 13 | - remove engines, cleanup ([d562e69](https://github.com/xfiveco/generator-chisel/commit/d562e69)) 14 | 15 | ## 1.0.0 (2021-12-17) 16 | 17 | - Rewrite with Webpack (#509) ([14fa2d0](https://github.com/xfiveco/generator-chisel/commit/14fa2d0)), closes [#509](https://github.com/xfiveco/generator-chisel/issues/509) 18 | 19 | ## 1.0.0-alpha.0 (2020-07-01) 20 | 21 | - Rewrite with webpack ([75952b3](https://github.com/xfiveco/generator-chisel/commit/75952b3)) 22 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/assets/icons-source/color/chisel-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/blocks/accordion/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schemas.wp.org/trunk/block.json", 3 | "apiVersion": 3, 4 | "name": "chisel/accordion", 5 | "version": "0.1.0", 6 | "title": "Accordion", 7 | "category": "chisel-blocks", 8 | "icon": "editor-justify", 9 | "description": "Accordion Block", 10 | "example": {}, 11 | "supports": { 12 | "html": false 13 | }, 14 | "textdomain": "chisel", 15 | "attributes": { 16 | "closeOthers": { 17 | "type": "boolean", 18 | "default": false 19 | }, 20 | "firstOpen": { 21 | "type": "boolean", 22 | "default": false 23 | }, 24 | "titleTag": { 25 | "type": "string", 26 | "default": "h3" 27 | } 28 | }, 29 | "providesContext": { 30 | "chiselAccordionTitleTag": "titleTag" 31 | }, 32 | "editorScript": "file:./index.js", 33 | "editorStyle": "file:./index.css", 34 | "style": "file:./style-index.css", 35 | "viewScript": "file:./view.js" 36 | } 37 | -------------------------------------------------------------------------------- /docs/src/templates/post.twig: -------------------------------------------------------------------------------- 1 | {% extends "layouts/base.twig" %} 2 | {% block content %} 3 | 4 |
5 | {% set sidebar = sidebar() %} 6 | {% include 'components/sidebar.twig' %} 7 | 8 |
14 |
15 |

{{ post.title }}{{ isDev() ? (' (' ~ post.data.order ~ ')') : '' }}

16 |

{{ post.data.excerpt }}

17 |
18 | {{post.content}} 19 |
20 |
21 | {% include 'components/page-nav.twig' %} 22 |
23 | 24 | {% if not post.data.hideOnpageSidebar %} 25 | {% set sidebar = onPageSidebar() %} 26 | {% include 'components/page-sidebar.twig' %} 27 | {% endif %} 28 | 29 |
30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/design/settings/_index.scss: -------------------------------------------------------------------------------- 1 | @use '../tools/theme' as *; 2 | 3 | /* 4 | * Settings 5 | */ 6 | $scrollbar-width: 15px; 7 | $root-font-size: 16px; 8 | 9 | /* 10 | * Layout settings 11 | */ 12 | $breakpoints: ( 13 | small: 480px, 14 | msmall: 640px, 15 | medium: 768px, 16 | large: 1024px, 17 | xlarge: 1200px, 18 | full: 1600px, 19 | ); 20 | $layout-columns-no: 12; 21 | $layout-gutter: get-gap('big'); 22 | $gaps: ( 23 | 'tiny': get-gap('tiny'), 24 | 'little': get-gap('little'), 25 | 'small': get-gap('small'), 26 | 'normal': get-gap('normal'), 27 | 'medium': get-gap('medium'), 28 | 'large': get-gap('large'), 29 | 'xlarge': get-gap('xlarge'), 30 | 'big': get-gap('big'), 31 | ); 32 | 33 | /* 34 | * Icons 35 | */ 36 | $static-icons: ('minus', 'plus', 'arrow-right', 'arrow-left'); 37 | $animated-icons: ('loader'); 38 | $multicolor-icons: (); 39 | 40 | // Icons module. Also requires packacke.json and wp-config configuration. 41 | $use-icons-module: false; 42 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Plugins/Yoast.php: -------------------------------------------------------------------------------- 1 | set_properties(); 28 | $this->action_hooks(); 29 | $this->filter_hooks(); 30 | } 31 | 32 | /** 33 | * Set properties. 34 | */ 35 | public function set_properties(): void {} 36 | 37 | /** 38 | * Register action hooks. 39 | */ 40 | public function action_hooks(): void {} 41 | 42 | /** 43 | * Register filter hooks. 44 | */ 45 | public function filter_hooks(): void {} 46 | } 47 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/Traits/Singleton.php: -------------------------------------------------------------------------------- 1 | ( 16 | 17 | 27 | 28 | )} 29 | isAppender 30 | /> 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /docs/content/docs/development/performance.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Performance 3 | excerpt: Chisel aims to offer great performance out-of-box. The rest is up to you. 4 | order: 1900 5 | --- 6 | 7 | ## JavaScript 8 | 9 | JavaScript bundle is minified and deferred. 10 | 11 | The file name is revisioned. A content hash is appended to the filename (eg. `app.7ea16125.js`) so you can set up content caching in the far future. 12 | 13 | ## CSS 14 | 15 | CSS styles are concatenated to one file and minified. 16 | 17 | The file name is revisioned. A content hash is appended to the filename (eg. `main.6a889b04.css`) so you can set up content caching in the far future. 18 | 19 | ## WordPress 20 | 21 | - jQuery is not included by default 22 | - [Disable Emojis](https://wordpress.org/plugins/disable-emojis/) plugin is installed 23 | - static resources (CSS, JS, images) are served with far-future expires headers to leverage browser caching 24 | - we recommend using WordPress hosting which uses a proxy cache (eg. [Pantheon](https://pantheon.io/)) or a cache plugin which generates static HTML files like [WP Rocket](https://wp-rocket.me/) 25 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/template/.devcontainer/devcontainer.json.chisel-tpl: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. 2 | { 3 | "name": "WordPress Development", 4 | "dockerComposeFile": "docker-compose.yml", 5 | "service": "app", 6 | // when changing workspace name or theme path, also update the docker-compose.yml file 7 | "workspaceFolder": "/workspaces/<%= app.nameSlug %>/<%= app.themePath %>", 8 | 9 | // Features to add to the dev container. More info: https://containers.dev/features. 10 | "features": { 11 | "ghcr.io/devcontainers/features/common-utils:2": { 12 | "username": "wordpress" 13 | }, 14 | "ghcr.io/devcontainers/features/node:1": { 15 | "version": "20" 16 | }, 17 | "ghcr.io/devcontainers/features/git:1": {} 18 | }, 19 | 20 | "postCreateCommand": "bash ../../../.devcontainer/post-create-command.sh", 21 | 22 | "remoteUser": "wordpress", 23 | 24 | "customizations": { 25 | "vscode": { 26 | "extensions": [ 27 | // EXTENSIONS-FROM-VSCODE-EXTENSIONS-FILE 28 | ] 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/generator-chisel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-chisel", 3 | "version": "2.3.2", 4 | "description": "A generator for scaffolding front-end and WordPress projects", 5 | "bin": { 6 | "chisel": "bin/chisel.js" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/xfiveco/generator-chisel.git", 11 | "directory": "packages/generator-chisel" 12 | }, 13 | "author": { 14 | "name": "Xfive", 15 | "email": "hello@xfive.co", 16 | "url": "https://www.xfive.co" 17 | }, 18 | "homepage": "https://www.getchisel.co/", 19 | "license": "MIT", 20 | "keywords": [ 21 | "twig", 22 | "wordpress", 23 | "scss", 24 | "itcss", 25 | "webpack", 26 | "babel" 27 | ], 28 | "dependencies": { 29 | "chisel-shared-utils": "^2.0.0-alpha.1", 30 | "commander": "^5.1.0", 31 | "execa": "^4.0.2", 32 | "fs-extra": "^9.0.1", 33 | "globby": "^11.0.1", 34 | "inquirer": "^7.1.0", 35 | "lodash": "^4.17.15", 36 | "speakingurl": "^14.0.1", 37 | "tinyqueue": "^2.0.3", 38 | "update-notifier": "^4.1.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /docs/src/templates/components/header.twig: -------------------------------------------------------------------------------- 1 | {% set main_nav = [ 2 | { title: 'Docs', link: '/docs' }, 3 | getPosts({ id: 'tutorials' })[0], 4 | { title: 'About', link: '/about' }, 5 | ] %} 6 | 7 | 8 |
9 |
10 |
11 |
12 | 15 |
    16 | {% for item in main_nav %} 17 | 20 | {% endfor %} 21 |
22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/login.js: -------------------------------------------------------------------------------- 1 | /* global chiselScripts */ 2 | 3 | class LoginPage { 4 | constructor() { 5 | this.loginPage = document.querySelector('body.login'); 6 | 7 | if (!this.loginPage) { 8 | return; 9 | } 10 | 11 | this.classnames = { 12 | loaded: 'has-loaded', 13 | }; 14 | 15 | this.logo = this.loginPage.querySelector('#login h1 a'); 16 | this.logoData = chiselScripts?.logoData; 17 | 18 | if (this.logoData) { 19 | this.setLogoImage(); 20 | } 21 | } 22 | 23 | setLogoImage() { 24 | if (this.logo) { 25 | const logoWidth = this.logoData[1] > 300 ? 300 : this.logoData[1]; 26 | const logoHeight = this.logoData[2] > 100 ? 100 : this.logoData[2]; 27 | 28 | this.logo.setAttribute( 29 | 'style', 30 | `background-image: url("${this.logoData[0]}");width: ${logoWidth}px;height: ${logoHeight}px;`, 31 | ); 32 | this.logo.setAttribute('aria-hidden', 'true'); 33 | this.logo.parentElement.classList.add(this.classnames.loaded); 34 | } 35 | } 36 | } 37 | 38 | new LoginPage(); 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Xfive (https://www.xfive.co) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/import.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const { execSync } = require('child_process'); 4 | const { URL } = require('url'); 5 | const path = require('path'); 6 | const fs = require('fs'); 7 | 8 | const postsRaw = execSync( 9 | "curl 'http://getchisel.test/wp-json/wp/v2/pages?per_page=50'", 10 | ); 11 | const posts = JSON.parse(postsRaw).filter( 12 | (post) => post.template !== 'template-home.php', 13 | ); 14 | 15 | posts.forEach((post) => { 16 | const link = new URL(post.link); 17 | const { pathname } = link; 18 | const file = pathname.slice(-1) === '/' ? pathname.slice(0, -1) : pathname; 19 | const fileToWrite = `${path.join('./content', path.relative('/', file))}.md`; 20 | console.log(path.relative('/', file)); 21 | execSync(`mkdir -p '${path.dirname(fileToWrite)}'`); 22 | const content = post.content.rendered.replace( 23 | /http:\/\/getchisel.test(\/[^\s)]*)\//g, 24 | '$1', 25 | ); 26 | fs.writeFileSync( 27 | fileToWrite, 28 | `--- 29 | title: ${post.title.rendered} 30 | excerpt: ${post.excerpt.rendered} 31 | order: ${post.menu_order}0 32 | --- 33 | 34 | ${content} 35 | `, 36 | ); 37 | execSync(`yarn prettier --write '${fileToWrite}'`); 38 | }); 39 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/components/_select2.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../elements/form' as *; 3 | 4 | .select2-container { 5 | display: block; 6 | line-height: $form-field-line-height; 7 | 8 | .select2-dropdown { 9 | border-color: $form-field-focus-border-color; 10 | } 11 | 12 | .select2-selection--single { 13 | height: auto; 14 | transition: $form-field-transition; 15 | 16 | .select2-selection__rendered { 17 | padding: 0; 18 | line-height: $form-field-line-height; 19 | } 20 | 21 | .select2-selection__placeholder { 22 | color: $form-field-placeholder-color; 23 | } 24 | 25 | .select2-selection__arrow { 26 | width: px-rem(32); 27 | height: 100%; 28 | background-image: $form-select-arrow; 29 | background-repeat: no-repeat; 30 | background-position: right 0.7rem top 50%; 31 | background-size: 0.75rem auto; 32 | 33 | b { 34 | display: none; 35 | } 36 | } 37 | } 38 | 39 | &--open, 40 | &--focus { 41 | .select2-selection--single { 42 | border-color: $form-field-focus-border-color; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | 4 | extends: 'chisel', 5 | 6 | env: { 7 | node: true, 8 | }, 9 | 10 | rules: { 11 | 'global-require': 'off', 12 | 'import/no-dynamic-require': 'off', 13 | 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], 14 | 'no-await-in-loop': 'off', 15 | 'no-param-reassign': 'off', 16 | 'no-console': 'off', 17 | 'no-underscore-dangle': 'off', 18 | 19 | // Airbnb except for of 20 | 'no-restricted-syntax': [ 21 | 'error', 22 | { 23 | selector: 'ForInStatement', 24 | message: 25 | 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', 26 | }, 27 | { 28 | selector: 'LabeledStatement', 29 | message: 30 | 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', 31 | }, 32 | { 33 | selector: 'WithStatement', 34 | message: 35 | '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', 36 | }, 37 | ], 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /docs/content/docs/features.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Features 3 | excerpt: Chisel comes with a lot of features that help you to develop your project faster and with higher quality. 4 | order: 150 5 | --- 6 | 7 | - automatic [WP-CLI](https://wp-cli.org/) based WordPress installation 8 | - automatic installation of [Timber](https://upstatement.com/timber/) and [Disable Emojis](https://wordpress.org/plugins/disable-emojis/) plugin, optional installation of other plugins like [ACF](https://www.advancedcustomfields.com/) 9 | - Chisel WordPress starter theme with a logical, easy to follow structure 10 | - [Twig](https://twig.sensiolabs.org/) templating engine 11 | - webpack based JS/SCSS bundling with hot reload in dev mode 12 | - creation of separate non-minified bundles during build 13 | - SCSS with [ITCSS architecture](https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/) 14 | - [PostCSS](https://postcss.org/) support 15 | - stylelint, Prettier and ESLint with [config tailored for Chisel](https://github.com/xfiveco/eslint-config-chisel) and [Prettier](https://prettier.io/) synced together for consistent and hassle free code formatting 16 | - HTML validation with [htmlhint](https://github.com/bezoerb/gulp-htmlhint) 17 | - optional React support 18 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getchisel", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "UNLICENSED", 6 | "description": "Getchisel", 7 | "author": "Xfive", 8 | "scripts": { 9 | "dev": "chisel-scripts dev", 10 | "watch": "chisel-scripts dev", 11 | "build": "chisel-scripts lint && chisel-scripts build", 12 | "build-report": "chisel-scripts build --report", 13 | "lint": "chisel-scripts lint", 14 | "add-page": "chisel-scripts add-page" 15 | }, 16 | "dependencies": { 17 | "highlight.js": "^10.7.2", 18 | "jsdom": "^16.5.3" 19 | }, 20 | "devDependencies": { 21 | "autoprefixer": "^9.8.0", 22 | "babel-preset-chisel": "^1.0.0-alpha.0", 23 | "browserslist": "^4.12.0", 24 | "chisel-plugin-code-style": "^1.0.0-alpha.1", 25 | "chisel-plugin-static-frontend": "^1.0.0-alpha.4", 26 | "chisel-scripts": "^1.0.0-alpha.7", 27 | "postcss-normalize": "^9.0.0" 28 | }, 29 | "husky": { 30 | "hooks": { 31 | "pre-commit": "lint-staged" 32 | } 33 | }, 34 | "lint-staged": { 35 | "*.{js,scss}": "chisel-scripts lint" 36 | }, 37 | "resolutions": { 38 | "postcss-normalize/sanitize.css": "11.0.1", 39 | "chisel-scripts/sass": "1.32.13" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/inc/WP/ChiselPost.php: -------------------------------------------------------------------------------- 1 | HTML, or empty string. 30 | */ 31 | public function get_thumbnail( string $size = 'medium', array $attrs = array() ): string { 32 | if ( $this->thumbnail_html === null ) { 33 | $this->thumbnail_html = ''; 34 | 35 | if ( has_post_thumbnail( $this->ID ) ) { 36 | $thumbnail_id = get_post_thumbnail_id( $this->ID ); 37 | $this->thumbnail_html = ImageHelpers::get_responsive_image( $thumbnail_id, $size, $attrs ); 38 | } 39 | } 40 | 41 | return $this->thumbnail_html; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/wp-plugins/index.js: -------------------------------------------------------------------------------- 1 | const { runLocal } = require('chisel-shared-utils'); 2 | const plugins = require('./plugins.json'); 3 | 4 | module.exports = (api) => { 5 | if (api.creator.cmd.skipWpPlugins) return; 6 | 7 | api.schedule(api.PRIORITIES.PROMPT, async () => { 8 | console.log('Advanced Custom Fields Pro is installed by default.'); 9 | console.log('X5 Plato - Reliable Sync Watcher for ACF is installed by default.'); 10 | 11 | await api.prompt([ 12 | { 13 | type: 'checkbox', 14 | name: 'plugins', 15 | message: 'Select optional plugins', 16 | choices: Object.keys(plugins.plugins), 17 | }, 18 | ]); 19 | }); 20 | 21 | api.schedule(api.PRIORITIES.WP_PLUGINS, async () => { 22 | const { plugins: selectedPlugins } = api.creator.data.wpPlugins; 23 | if (selectedPlugins.length === 0) return; 24 | 25 | await runLocal( 26 | [ 27 | 'chisel-scripts', 28 | 'wp', 29 | 'plugin', 30 | 'install', 31 | { activate: true }, 32 | ...selectedPlugins.map((name) => plugins.plugins[name]), 33 | ], 34 | { cwd: api.resolve(api.creator.data.app.themePath) }, 35 | ); 36 | }); 37 | }; 38 | -------------------------------------------------------------------------------- /packages/chisel-scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chisel-scripts", 3 | "version": "2.1.4", 4 | "description": "Chisel scripts", 5 | "bin": { 6 | "chisel-scripts": "bin/chisel-scripts.js" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/xfiveco/generator-chisel.git", 11 | "directory": "packages/chisel-scripts" 12 | }, 13 | "author": { 14 | "name": "Xfive", 15 | "email": "hello@xfive.co", 16 | "url": "https://www.xfive.co" 17 | }, 18 | "homepage": "https://www.getchisel.co/", 19 | "license": "MIT", 20 | "scripts": { 21 | "test": "echo \"Error: run tests from root\" && exit 1", 22 | "prepare": "node ./fetch-packages.js" 23 | }, 24 | "bugs": { 25 | "url": "https://github.com/xfiveco/generator-chisel/issues" 26 | }, 27 | "dependencies": { 28 | "chisel-shared-utils": "^2.0.0-alpha.1", 29 | "chokidar": "^3.6.0", 30 | "commander": "^5.1.0", 31 | "fast-glob": "^3.3.2", 32 | "fs-extra": "^9.0.1", 33 | "globby": "^11.0.1", 34 | "inquirer": "^7.1.0", 35 | "json2php": "^0.0.9", 36 | "lodash": "^4.17.15", 37 | "svgo": "^3.3.2" 38 | }, 39 | "peerDependencies": { 40 | "@wordpress/scripts": "^27.9.0 || ^31.0.0 || ^31.1.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/generator-chisel/bin/chisel.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { Command } = require('commander'); 4 | 5 | const createProgram = () => { 6 | const program = new Command(); 7 | 8 | program 9 | .command('create', { isDefault: true }) 10 | .description('create a new project powered by Chisel') 11 | .option('--skip-dependencies-install') 12 | .option('--skip-wp-download') 13 | .option('--skip-wp-config') 14 | .option('--skip-wp-install') 15 | .option('--skip-wp-commands') 16 | .option('--skip-wp-plugins') 17 | .option('--skip-format-and-build') 18 | .option( 19 | '--link', 20 | 'link Chisel packages (yarn link) in created project (for development)', 21 | ) 22 | .option('--devcontainer', 'create devcontainer', false) 23 | .option( 24 | '--devcontainer-complete
', 25 | 'complete creation inside devcontainer', 26 | false 27 | ) 28 | .action((...args) => { 29 | const cmd = args.slice(-1)[0]; 30 | args = args.slice(0, -1); 31 | return require('../lib/commands/create')({ args, cmd }); 32 | }); 33 | 34 | return program; 35 | }; 36 | 37 | (async () => { 38 | const program = createProgram(); 39 | 40 | program.parse(process.argv); 41 | })(); 42 | -------------------------------------------------------------------------------- /docs/src/styles/components/_page-nav.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #PAGE-NAV 3 | ========================================================================== */ 4 | 5 | .c-page-nav { 6 | display: flex; 7 | } 8 | 9 | .c-page-nav__item { 10 | &--prev { 11 | padding-left: 5.2rem; 12 | } 13 | 14 | &--next { 15 | padding: 0 5.2rem 0 2rem; 16 | margin-left: auto; 17 | text-align: right; 18 | } 19 | } 20 | 21 | .c-page-nav__link { 22 | text-decoration: none; 23 | } 24 | 25 | .c-page-nav__heading { 26 | display: block; 27 | } 28 | 29 | .c-page-nav__text { 30 | position: relative; 31 | display: block; 32 | font-weight: 600; 33 | font-size: 1.8rem; 34 | margin-top: 0.5rem; 35 | 36 | @include bp('medium') { 37 | font-size: 2.4rem; 38 | } 39 | 40 | &::before { 41 | position: absolute; 42 | top: 50%; 43 | transform: translateY(-50%); 44 | width: 28px; 45 | height: 17px; 46 | } 47 | 48 | .c-page-nav__item--prev & { 49 | &::before { 50 | left: -5.2rem; 51 | } 52 | } 53 | 54 | .c-page-nav__item--next & { 55 | &::before { 56 | transform: translateY(-50%) rotate(180deg); 57 | right: -5.2rem; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /docs/src/styles/objects/_media.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | #MEDIA 3 | ========================================================================== */ 4 | 5 | /** 6 | * Place any image- and text-like content side-by-side, as per: 7 | * http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code 8 | */ 9 | 10 | .o-media { 11 | @include clearfix(); 12 | 13 | display: block; 14 | } 15 | 16 | .o-media__img { 17 | float: left; 18 | margin-right: 1rem; 19 | 20 | > img { 21 | display: block; 22 | } 23 | } 24 | 25 | .o-media__body { 26 | display: block; 27 | overflow: hidden; 28 | 29 | &, 30 | > :last-child { 31 | margin-bottom: 0; 32 | } 33 | } 34 | 35 | /* Reversed media objects 36 | ========================================================================== */ 37 | 38 | .o-media--reverse { 39 | > .o-media__img { 40 | float: right; 41 | margin-left: 1rem; 42 | margin-right: 0; 43 | } 44 | } 45 | 46 | /* Gutterless media objects 47 | ========================================================================== */ 48 | 49 | .o-media--flush { 50 | > .o-media__img { 51 | margin-left: 0; 52 | margin-right: 0; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_btn.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)), 4 | :where(body:not(.woocommerce-block-theme-has-button-styles)) { 5 | #respond input#submit, 6 | .woocommerce #respond input#submit, 7 | #respond input#submit.alt, 8 | .woocommerce #respond input#submit.alt, 9 | a.button, 10 | .woocommerce a.button, 11 | a.button.alt, 12 | .woocommerce a.button.alt, 13 | button.button, 14 | .woocommerce button.button, 15 | button.button.alt, 16 | .woocommerce button.button.alt, 17 | input.button, 18 | .woocommerce input.button, 19 | input.button.alt, 20 | .woocommerce input.button.alt { 21 | @include button; 22 | @include button-secondary; 23 | 24 | &:hover, 25 | &:focus { 26 | @include button-secondary-hover; 27 | } 28 | 29 | &.loading { 30 | padding-right: px-rem(42); 31 | 32 | &::after { 33 | top: auto; 34 | } 35 | } 36 | 37 | &.view { 38 | @include button-small; 39 | } 40 | } 41 | 42 | .c-product-item a.button { 43 | @include button-small; 44 | 45 | &.loading { 46 | padding-right: px-rem(42); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /docs/content/docs/development/javascript.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: JavaScript 3 | excerpt: Chisel supports writing modern JavaScript with ES6+ 4 | order: 1600 5 | --- 6 | 7 | You will write your JavaScript in the `src/sripts` folder which is organized in the following manner: 8 | 9 | - `app.js` - entry point file, everything required/imported in this file will be bundled together by [webpack](https://webpack.js.org/) 10 | - `modules` - store your functionality to separate files in this folder and require/import them in the entry point file 11 | - `modules/greeting.js` - a sample JS module, delete or replace this one with your functionality 12 | 13 | Chisel supports multiple entry points so you can create other files in the `scripts` directory next to `app.js` and they will be bundled separately. You can also use [dynamic imports](https://webpack.js.org/api/module-methods/#import) to load a fragment of code only when you need it. 14 | 15 | ## Files optimization 16 | 17 | JavaScript bundles created when running `npm run build` are minified and file names are revisioned. That means that a content hash is append to the filename so it looks like this `app.7ea16125.js`. This way you can set up content caching in the far future. 18 | 19 | ## Code formatting and linting 20 | 21 | Check out [Code Quality](/docs/development/code-quality). 22 | -------------------------------------------------------------------------------- /docs/content/docs/development/pages.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pages 3 | excerpt: Once your project is setup, you need to add pages, you will be working on, to it. 4 | order: 1200 5 | --- 6 | 7 | ## Adding pages 8 | 9 | From the command line type: 10 | 11 | ```bash 12 | npm run add-page "Page Name" 13 | ``` 14 | 15 | for example 16 | 17 | ```bash 18 | npm run add-page "Home" 19 | ``` 20 | 21 | You can also create multiple pages at once by separating page names with space: 22 | 23 | ```bash 24 | npm run add-page "Home" "About Us" "Contact Us" "News" 25 | ``` 26 | 27 | ### WordPress Website 28 | 29 | When you add a page on WordPress project: 30 | 31 | - Twig template is automatically created in `wp/wp-content/themes/[your-theme]/templates/page-{page-slug}.twig` 32 | - Page is accessible at `project-name.test/{page-slug}` 33 | - If you haven't before, flush the rewrite rules _Settings -> Permalinks -> Save changes_ 34 | 35 | ### Static Website 36 | 37 | In Static project, it creates Twig template in `src/templates` directory or it creates Twig templates or markdown files in `content` directory if it is used. The project index is regenerated (if it's used) and the page is added to it. 38 | 39 | ## Removing pages 40 | 41 | To remove the page remove its template or content file, and remove it from WP Admin or project index if necessary. 42 | -------------------------------------------------------------------------------- /docs/src/templates/components/logo.twig: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/scripts/editor/blocks.js: -------------------------------------------------------------------------------- 1 | import { select, subscribe } from '@wordpress/data'; 2 | 3 | class Blocks { 4 | constructor() { 5 | document.addEventListener('DOMContentLoaded', () => { 6 | subscribe(() => { 7 | const selectedBlock = select('core/block-editor')?.getSelectedBlock(); 8 | // const isBlockSidebarOpen = 9 | // select('core/edit-post')?.getActiveGeneralSidebarName() === 'edit-post/block'; 10 | 11 | if (selectedBlock?.name) { 12 | const blockInspector = document.querySelector('.block-editor-block-inspector'); 13 | 14 | if (blockInspector) { 15 | const blockNameClassName = selectedBlock.name.replace('/', '-'); 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); 26 | } 27 | } 28 | }); 29 | }); 30 | } 31 | } 32 | 33 | new Blocks(); 34 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/wp-editor/_block-edit-selector.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | 3 | .block-editor-block-list__block { 4 | position: relative; 5 | } 6 | 7 | .c-block-edit-selector { 8 | position: relative; 9 | display: flex; 10 | align-items: flex-start; 11 | justify-content: flex-end; 12 | 13 | &--accordion { 14 | margin-right: get-margin('tiny'); 15 | } 16 | 17 | &--accordion-item { 18 | margin-right: get-margin('tiny'); 19 | } 20 | } 21 | 22 | .c-block-edit-selector__inner { 23 | color: get-color('black'); 24 | background-color: get-color('grey-100'); 25 | } 26 | 27 | .c-block-edit-selector__button { 28 | height: auto !important; 29 | padding: get-padding('tiny') get-padding('little') !important; 30 | color: get-color('black') !important; 31 | border: 1px solid get-color('grey-100'); 32 | box-shadow: none !important; 33 | 34 | &.is-large { 35 | padding: get-padding('small') get-padding('little') !important; 36 | } 37 | 38 | .dashicon { 39 | margin-right: get-margin('tiny'); 40 | transition: none; 41 | } 42 | 43 | .block-editor-block-list__block.is-selected > .c-block-edit-selector & { 44 | color: get-color('white') !important; 45 | background-color: var(--wp-admin-theme-color); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/generator-chisel/lib/commands/create/creators/app/chisel-starter-theme/src/styles/woo/_checkout.scss: -------------------------------------------------------------------------------- 1 | @use '~design' as *; 2 | @use '../elements/form' as *; 3 | 4 | .wc-block-components-form { 5 | .wc-block-components-text-input { 6 | &, 7 | &.is-active { 8 | input[type='email'], 9 | input[type='number'], 10 | input[type='password'], 11 | input[type='tel'], 12 | input[type='text'], 13 | input[type='url'] { 14 | &:focus { 15 | outline: 0; 16 | 17 | &:not([readonly], [disabled]) { 18 | box-shadow: $form-field-shadow-focus; 19 | } 20 | } 21 | } 22 | } 23 | 24 | &.has-error { 25 | input { 26 | border-color: $form-field-error-color !important; 27 | } 28 | 29 | label { 30 | color: $form-field-error-color !important; 31 | } 32 | } 33 | } 34 | 35 | label + label, 36 | label + input, 37 | label + select, 38 | label + button, 39 | label + textarea { 40 | margin-top: 0; 41 | } 42 | } 43 | 44 | .wc-block-components-validation-error { 45 | color: $form-field-error-color !important; 46 | } 47 | 48 | .wc-block-components-notice-banner { 49 | &.is-error { 50 | color: $form-field-color !important; 51 | border-color: $form-field-error-color !important; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/chisel-scripts/lib/commands/create-block/index.js: -------------------------------------------------------------------------------- 1 | const { runWithExit } = require('chisel-shared-utils'); 2 | const fs = require('fs-extra'); 3 | 4 | module.exports = (api) => { 5 | api.registerCommand( 6 | 'create-block', 7 | (command) => 8 | command 9 | .description('create a Gutenberg block') 10 | .option('-t, --template