Allow select column width for widget cards #3252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Add cards to custom pages #3149
Background
Admins can create cards for homepage on
/admin/widget/cards/new
and since #3149 also for custom pages on/admin/widget/cards/new?page_id=N
.Objectives
Notes
For cards you can use from 1 to 12 columns, based on [Foundation Float Grid].(https://foundation.zurb.com/sites/docs/grid.html)
Visual Changes
New select on admin card new form
![screenshot 2019-01-31 at 15 53 34](https://user-images.githubusercontent.com/631897/52069163-79bc4780-257e-11e9-97d7-c4fd93d7bb4f.png)
![screenshot 2019-01-31 at 15 53 40](https://user-images.githubusercontent.com/631897/52069164-7a54de00-257e-11e9-9ba5-f6d501b82f21.png)
Now you can create more interesting layouts
![layout](https://user-images.githubusercontent.com/631897/52068940-01558680-257e-11e9-99c1-f11a69388fe9.png)
BEFORE if a card didn't have a label show a blank span
![screenshot 2019-01-31 at 14 10 49](https://user-images.githubusercontent.com/631897/52069107-5beee280-257e-11e9-8049-1c5a46fe7f45.png)
Now show card label only if it is present
![screenshot 2019-01-31 at 14 11 03](https://user-images.githubusercontent.com/631897/52069113-5e513c80-257e-11e9-8600-7a4d3c5bf83a.png)
You can use from 1 to 12 columns
![screenshot 2019-01-31 at 14 34 32](https://user-images.githubusercontent.com/631897/52069030-3bbf2380-257e-11e9-942d-5a1c657fe2f1.png)
![2](https://user-images.githubusercontent.com/631897/52069448-06670580-257f-11e9-8fde-4713b9d6735c.jpg)