Skip to content

Commit

Permalink
Merge pull request #5 from swisnl/feature/triangles
Browse files Browse the repository at this point in the history
Triangles!
  • Loading branch information
JaZo authored Nov 29, 2023
2 parents f42caad + 842b8d3 commit a444802
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ public function panel(Panel $panel): Panel
}
```

### Available image providers

#### `Swis\Filament\Backgrounds\Images\CuratedBySwis`

Default curated set of (free to use) images from [multiple sources](#license), based on the day of the month. You can find the images in the [resources/images/curated-by-swis](resources/images/curated-by-swis) directory.

#### `Swis\Filament\Backgrounds\Images\MyImages`

[Use your own images](#use-your-own-images).

#### `Swis\Filament\Backgrounds\Images\Triangles`

A set of low poly patterns created using [Trianglify](https://github.com/qrohlf/trianglify). You can find the patterns in the [resources/images/triangles](resources/images/triangles) directory.

### Writing a custom image provider

To create your own image provider, you need to implement the `ProvidesImages` interface. This interface has one method, `getImage`, which should return an `Image` object. The image object takes two arguments, the first is the CSS `background-image` property, the second is the attribution text. The image will be directly used as background-image in CSS, so it should include `url()`, which allows you to even use gradients or other fancy stuff!
Expand Down
1 change: 1 addition & 0 deletions resources/images/triangles/01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/triangles/02.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/triangles/03.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/triangles/04.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a444802

Please sign in to comment.