@@ -7,6 +7,7 @@ Adds a card to the Laravel Nova dashboard with any arbitrary HTML content.
77
88![ image] ( https://user-images.githubusercontent.com/5278175/60386958-35899080-9aa5-11e9-8e1f-b29e95c80d2c.png )
99
10+
1011## Installation
1112
1213You can install the package in to a Laravel app that uses [ Nova] ( https://nova.laravel.com ) via composer:
@@ -15,6 +16,7 @@ You can install the package in to a Laravel app that uses [Nova](https://nova.la
1516composer require idf/nova-html-card
1617```
1718
19+
1820## Usage
1921
2022[ Register your new card] ( https://nova.laravel.com/docs/2.0/customization/cards.html#registering-cards ) .
@@ -24,52 +26,45 @@ use IDF\HtmlCard\HtmlCard;
2426
2527public function cards()
2628{
27- return [
29+ return [
2830 (new HtmlCard())->width('1/3')->html('<h1 >Hello World!</h1 >'),
2931 (new HtmlCard())->width('1/3')->markdown('# Hello World!'),
3032 (new HtmlCard())->width('1/3')->view('cards.hello', ['name' => 'World']),
3133 ];
3234}
3335```
3436
37+
3538### Options
39+
3640 - Set content
3741 - ` ->html('<h1>Hello!</h1>') ` : Set HTML or plain content.
3842 - ` ->markdown('# Hello!') ` : Set Markdown content that will be converted into HTML.
3943 - ` ->view('path.to.view', []) ` : Specify blade view file and optionally pass an array of data to view.
4044 - Styling
41- - ` ->center(false) ` : Center card's content. ` false ` by default.
45+ - ` ->center(false) ` : Center card's content. ` false ` by default.
4246 - ` ->withoutCardStyles(true) ` : Whether to use standard Nova Card styles for a card (background, padding, etc). ` false ` by default.
43- - ` ->forceFullWidth(true) ` : Force the card to be full width. A fix for [ nova cards order] ( https://github.com/laravel/nova-issues/issues/1895 ) .
47+ - ` ->forceFullWidth(true) ` : Force the card to be full width. A fix for [ nova cards order] ( https://github.com/laravel/nova-issues/issues/1895 ) .
4448
4549
4650## Why this package?
51+
4752There are a few packages with similar functionality.
4853Our package provides an API to cover all cases covered by these packages plus additionally provides some unique features like:
4954 - markdown support
5055 - easy switch between class Nova-card look and raw-HTML look
5156 - Simple, Laravel-like API
5257
58+
5359## Changelog
5460
5561Please see [ Releases] ( https://github.com/InteractionDesignFoundation/nova-html-card/releases ) for more information on what has changed recently.
5662
63+
5764## Contributing
5865
5966Please see [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
6067
61- ### Compiling Assets
62-
63- ``` bash
64- # Compile and minify your assets:
65- npm run prod
66-
67- # Compile your assets for local development:
68- npm run dev
69-
70- # Run the NPM "watch" command to auto-compile your assets when they are changed:
71- npm run watch
72- ```
7368
7469## License
7570
0 commit comments