Skip to content

Commit 08fd76d

Browse files
committed
Simplify main README.md
1 parent 0180463 commit 08fd76d

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1213
You 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
1516
composer 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

2527
public 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+
4752
There are a few packages with similar functionality.
4853
Our 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

5561
Please see [Releases](https://github.com/InteractionDesignFoundation/nova-html-card/releases) for more information on what has changed recently.
5662

63+
5764
## Contributing
5865

5966
Please 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

docs/CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
## Compiling Assets
3+
4+
```bash
5+
# Compile and minify your assets:
6+
npm run prod
7+
8+
# Compile your assets for local development:
9+
npm run dev
10+
11+
# Run the NPM "watch" command to auto-compile your assets when they are changed:
12+
npm run watch
13+
```

0 commit comments

Comments
 (0)