https://github.com/litstack/bricks
Pre-built repeatables for blocks
https://github.com/litstack/bricks
Last synced: 4 months ago
JSON representation
Pre-built repeatables for blocks
- Host: GitHub
- URL: https://github.com/litstack/bricks
- Owner: litstack
- Created: 2021-01-22T12:30:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T13:57:52.000Z (almost 2 years ago)
- Last Synced: 2025-01-15T11:10:47.578Z (5 months ago)
- Language: PHP
- Size: 169 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Litstack Bricks 🧱
Pre-built Repeatables and Templates for common Webcontents.
## Install
`composer require litstack/bricks`
`php artisan lit-bricks:install`
## Usage
Add the desired Repeatables to your blocks:
```php
use Litstack\Bricks\Repeatables\TextRepeatable;$page->card(function ($form) {
$form->block('content')
->title('My Content')
->repeatables(function ($repeatables) {
$repeatables->add(TextRepeatable::class);
});
});
```Return a view, pass it the formdata:
```php
return view('welcome')->with([
'form' => Form::load('pages', 'home')
]);
```Add the block to your template:
```php
@block($form->content)
```## Customize Templates
You can publish the templates to `resources/views/vendor/bricks/` and edit them to your needs:
```shell
php artisan vendor:publish --provider="Litstack\Bricks\BricksServiceProvider --tag=views"
```## Components
- [Carousel](docs/Carousel.md)
- [Edgedrop](docs/Edgedrop.md)
- [Map](docs/Map.md)
- [Modal](docs/Modal.md)
- [Navigation](docs/Navigation.md)
- [Tooltip](docs/Tooltip.md)## Repeatables
| Name | Fields | Â Usage |
| --------------------------- | ---------------------- | ---------------------------------------------------------------------- |
| TextRepeatable::class | WYSIWYG | Simple Text-Repeatable |
| ImageRepeatable::class | image | Single Image-Repeatable using `` Component |
| ImagesRepeatable::class | image | Multiple Image-Repeatable using `` Component |
| ImageSlideRepeatable::class | image, input, textarea | Image-Repeatable using `` Component, Input and Textarea |