From 9173efe9c9c61a17ed16cef4ee7f0f15428c19a8 Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Tue, 19 Jul 2022 18:43:16 +0300 Subject: [PATCH] Added the logic of wrapper + responsiveness controllers. --- .gitignore | 3 + README.md | 8 ++ .../block/templates/src/template.template.hbs | 4 +- layouts/alignfull.hbs | 2 - layouts/container.hbs | 2 - layouts/images/icon-desktop.svg | 18 +++ layouts/images/icon-mobile.svg | 19 +++ layouts/images/icon-tablet.svg | 19 +++ layouts/index.hbs | 19 +++ layouts/partials/head.hbs | 8 +- layouts/partials/scripts.hbs | 7 +- layouts/partials/toolbar.hbs | 13 +++ layouts/scripts/page--toolbar.js | 39 +++++-- layouts/styles/_page--breakpoints.scss | 24 ++++ .../styles/_page--main--responsive-mode.scss | 38 ++++++ layouts/styles/page--main.css | 88 +++++++++++--- layouts/styles/page--main.css.map | 1 + layouts/styles/page--main.scss | 66 +++++++++++ layouts/styles/page--view.css | 19 +++ layouts/styles/page--view.css.map | 1 + layouts/styles/page--view.scss | 17 +++ package-lock.json | 110 ++++++++++++++++-- package.json | 5 +- server.js | 81 ++++++++----- 24 files changed, 535 insertions(+), 76 deletions(-) create mode 100644 layouts/images/icon-desktop.svg create mode 100644 layouts/images/icon-mobile.svg create mode 100644 layouts/images/icon-tablet.svg create mode 100644 layouts/index.hbs create mode 100644 layouts/styles/_page--breakpoints.scss create mode 100644 layouts/styles/_page--main--responsive-mode.scss create mode 100644 layouts/styles/page--main.css.map create mode 100644 layouts/styles/page--main.scss create mode 100644 layouts/styles/page--view.css create mode 100644 layouts/styles/page--view.css.map create mode 100644 layouts/styles/page--view.scss diff --git a/.gitignore b/.gitignore index 96e9c43..d7eed0b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ deploy-*.sh # Custom blocks +config +data +src diff --git a/README.md b/README.md index c9c950b..3db5e59 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,11 @@ environment. Generated blocks are including this repository. This project is running a nodejs script with `browsersync` and `gulp` which improves the development process. + +## Development / Testing the tool + +Run `npm run generate-block` command and give the `development` name to the block, it will generate the `/blocks` folder. + +Copy the `/development/data` and `/development/src` folders to root folder of project. +Now you're ready to run development process: `npm run dev`. + diff --git a/generators/block/templates/src/template.template.hbs b/generators/block/templates/src/template.template.hbs index 6afa5fe..e44d509 100644 --- a/generators/block/templates/src/template.template.hbs +++ b/generators/block/templates/src/template.template.hbs @@ -33,9 +33,9 @@

Image Example

- +
- <img src="images/demo.jpeg" alt=""> + <img src="/images/demo.jpeg" alt="">
diff --git a/layouts/alignfull.hbs b/layouts/alignfull.hbs index 915128d..ca72bd2 100644 --- a/layouts/alignfull.hbs +++ b/layouts/alignfull.hbs @@ -4,8 +4,6 @@ -{{> (include_partial "layouts/partials/toolbar") }} -
{{> (include_block_template) }}
diff --git a/layouts/container.hbs b/layouts/container.hbs index 936d8c3..2dd26e7 100644 --- a/layouts/container.hbs +++ b/layouts/container.hbs @@ -4,8 +4,6 @@ -{{> (include_partial "layouts/partials/toolbar") }} -
{{> (include_block_template) }} diff --git a/layouts/images/icon-desktop.svg b/layouts/images/icon-desktop.svg new file mode 100644 index 0000000..134ba5e --- /dev/null +++ b/layouts/images/icon-desktop.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/layouts/images/icon-mobile.svg b/layouts/images/icon-mobile.svg new file mode 100644 index 0000000..364fae4 --- /dev/null +++ b/layouts/images/icon-mobile.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/layouts/images/icon-tablet.svg b/layouts/images/icon-tablet.svg new file mode 100644 index 0000000..9d78584 --- /dev/null +++ b/layouts/images/icon-tablet.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/layouts/index.hbs b/layouts/index.hbs new file mode 100644 index 0000000..7939893 --- /dev/null +++ b/layouts/index.hbs @@ -0,0 +1,19 @@ + + + + + + + Block Development Tool + + + + +{{> (include_partial "layouts/partials/toolbar") }} + + + + + + + diff --git a/layouts/partials/head.hbs b/layouts/partials/head.hbs index 6b7ee45..9382c94 100644 --- a/layouts/partials/head.hbs +++ b/layouts/partials/head.hbs @@ -2,8 +2,10 @@ - {{#if config.cssUrl }} - {{/if}} - + {{#if config.cssUrl }} + + {{/if}} + {{# if config.blockName}} + {{/if}} diff --git a/layouts/partials/scripts.hbs b/layouts/partials/scripts.hbs index ded04ff..7991cb1 100644 --- a/layouts/partials/scripts.hbs +++ b/layouts/partials/scripts.hbs @@ -1,5 +1,4 @@ - -{{#if config.jsUrl }} -{{/if}} - +{{#if config.jsUrl }} +{{/if}}{{#if config.blockName }} +{{/if}} diff --git a/layouts/partials/toolbar.hbs b/layouts/partials/toolbar.hbs index 3fa8884..97cb42f 100644 --- a/layouts/partials/toolbar.hbs +++ b/layouts/partials/toolbar.hbs @@ -1,7 +1,20 @@
+ +
+ + + + + + + + +
+
+