|
1 | | -# Little Layout plugin for Craft CMS 3.x |
| 1 | +# Little Layout plugin for Craft CMS 4.x |
2 | 2 |
|
3 | 3 | A compact, visual way to lay out fields, elements, and Matrix blocks. |
4 | 4 |
|
5 | 5 | ## Requirements |
6 | 6 |
|
7 | | -This plugin requires Craft CMS 3.6 or later. |
| 7 | +This plugin requires Craft CMS 4.0 or later. |
8 | 8 |
|
9 | 9 | ## Installation |
10 | 10 |
|
@@ -108,7 +108,7 @@ If you use a CSS framework, like Tailwind CSS, you could do something like this: |
108 | 108 | <div class="col-start-{{ element.fieldHandle.gridColumnStart }} col-span-{{ element.fieldHandle.gridColumnSpan }} row-start-{{ element.fieldHandle.gridRowStart }} row-span-{{ element.fieldHandle.gridRowSpan }}"></div> |
109 | 109 | ``` |
110 | 110 |
|
111 | | -While that could work, if you use Tailwind’s PurgeCSS feature, you may prefer to preserve full class names using logic and a lookup table: |
| 111 | +If your Twig template files are included in your Tailwind confguration’s `content` patterns, you may prefer to preserve full class names using logic and a lookup table: |
112 | 112 |
|
113 | 113 | ```twig |
114 | 114 | {% set columnStartClasses = { |
@@ -214,19 +214,6 @@ Then on the front-end, (assuming LTR reading order in this case), you can do som |
214 | 214 |
|
215 | 215 | In this case `element.fieldHandle.selectedColumns` gives us an array with the numbers `1`, `2`, or `3` as the value. |
216 | 216 |
|
217 | | -## Contributing |
218 | | - |
219 | | -The repo for this plugin includes config files that can be used to test and build the front-end assets for this plugin. _(NOTE: [DDEV-local](https://ddev.readthedocs.io/en/stable/) is required to spin up and run the full testing environment)_ |
220 | | - |
221 | | -To contribute a PR to this project please do the following: |
222 | | - |
223 | | -1. In the repo root directory, run `ddev start`. This should install Composer in the `_source/_craft/` directory, a fresh Craft install, and NPM in the `_source/_assets/` directory. |
224 | | -1. Find the `_source/_craft/.env` file and change the value of `PLUGIN_HMR` to `true` _(NOTE: this needs to be set back to `false` before submitting a PR)_ |
225 | | -1. Run `ddev npm run dev` to start up a Vite web server. |
226 | | -1. Log into the local CMS at `https://craft-little-layout.test/admin`, using credentials installed during `ddev start` and make code changes. |
227 | | -1. Return the `_source/_craft/.env` variable, `PLUGIN_HMR`, to `true` false and run `ddev npm run prod` to perform a Vite build. |
228 | | -1. Submit PR to [GitHub repo.](https://github.com/wbrowar/craft-little-layout/pulls) |
229 | | - |
230 | 217 | --- |
231 | 218 |
|
232 | 219 | Brought to you by [Will Browar](https://wbrowar.com) |
0 commit comments