├── .editorconfig ├── .eslintrc.json ├── .github ├── example-page-content.txt └── screenshot-grid-block.png ├── .gitignore ├── LICENSE ├── README.md ├── blueprints └── blocks │ └── grid.yml ├── composer.json ├── index.css ├── index.js ├── index.php ├── package-lock.json ├── package.json ├── snippets └── blocks │ └── grid.php └── src ├── components └── Grid.vue ├── index.css └── index.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.php] 13 | indent_size = 4 14 | 15 | [*.md,*.txt] 16 | trim_trailing_whitespace = false 17 | insert_final_newline = false 18 | 19 | [composer.json] 20 | indent_size = 4 21 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:vue/recommended", 9 | "prettier" 10 | ], 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/example-page-content.txt: -------------------------------------------------------------------------------- 1 | Title: Grid-Block Example 2 | 3 | ---- 4 | 5 | Mygrid: [{"content":{"title":"My 1st Grid-Block","grid":"[{\"attrs\":[],\"columns\":[{\"blocks\":[{\"content\":{\"level\":\"h2\",\"text\":\"How it works?\"},\"id\":\"539d8633-b529-4eb9-a36e-571e8db88b57\",\"isHidden\":false,\"type\":\"heading\"},{\"content\":{\"text\":\"

Create a Blocks- or Layouts-Field in your Template. Put 'grid' to your Fieldsets: Done!<\\\/p>\"},\"id\":\"9330a20a-0be4-4f6d-bc2e-a6ecf07fdd94\",\"isHidden\":false,\"type\":\"text\"}],\"id\":\"a0c99279-6e27-4fd8-857b-b3cea35000fb\",\"width\":\"1\\\/1\"}],\"id\":\"efa3bdb2-2506-498b-be46-2068626face3\"},{\"attrs\":[],\"columns\":[{\"blocks\":[{\"content\":{\"code\":\"mygrid:\\n label: My Awesome Content\\n type: blocks\\n fieldsets:\\n - grid\\n - heading\\n - text\\n - image\",\"language\":\"yaml\"},\"id\":\"542a6648-8fdf-420a-9099-775ae68d1b5f\",\"isHidden\":false,\"type\":\"code\"}],\"id\":\"c48435bd-7a9a-4317-921c-d84dcd8c6c77\",\"width\":\"1\\\/2\"},{\"blocks\":[{\"content\":{\"blah\":\"\",\"image\":[\"imagepool\\\/screenshot_blocktype.png\"],\"ratio\":\"\",\"crop\":\"false\"},\"id\":\"2b07da12-8dfb-46d4-915d-3076b9321e96\",\"isHidden\":false,\"type\":\"image\"}],\"id\":\"c2a05d3d-e3c6-4cd8-946e-099d1647fbee\",\"width\":\"1\\\/2\"}],\"id\":\"c00fad94-04c3-4996-82c8-8dc17483ffaa\"}]"},"id":"52099b6a-f30e-44d1-a54c-726fc9b1f137","isHidden":false,"type":"grid"},{"content":{"title":"My 2nd Grid-Block","grid":"[{\"attrs\":[],\"columns\":[{\"blocks\":[{\"content\":{\"text\":\"

To customize the Template in the block drawer, copy the code on the right to: blueprints\\\/block\\\/grid.yml<\\\/code><\\\/p>

Be careful! An empty YAML-File can cause data loss!<\\\/strong><\\\/p>\"},\"id\":\"a334ad1f-a4ba-42d6-a531-93b1c325436b\",\"isHidden\":false,\"type\":\"text\"},{\"content\":{\"level\":\"h2\",\"text\":\"What you'il find here?\"},\"id\":\"e0722965-311a-4541-b87d-b52c6db406e0\",\"isHidden\":false,\"type\":\"heading\"},{\"content\":{\"text\":\"