-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0808a84
commit 7a7f306
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Avatar | ||
description: Avatar Orchid Extra Fields | ||
extends: _layouts.documentation | ||
section: content | ||
locale: en | ||
--- | ||
|
||
# Avatar {#Avatar} | ||
A very simple Field to render a image and title under a picture. | ||
|
||
For example, you can use it like this. | ||
|
||
<img class="block m-auto" src="/assets/fields/avatar/single.png" alt="sinlge avatar" /> | ||
|
||
Even, You may use it in the table | ||
|
||
<img class="block m-auto" src="/assets/fields/avatar/table.png" alt="avatar in table" /> | ||
## Example code | ||
|
||
```php | ||
|
||
use agoalofalife\Orchid\Fields\Range; | ||
|
||
// value - url to source | ||
// heightByPercent - size avatar by percents | ||
// nameAvatar - text under a avatar like a "title" | ||
// sizeTitle - size a title | ||
// left or right or center - position avatar on layout | ||
|
||
Avatar::make('test') | ||
->value("https://avatars.githubusercontent.com/u/15719824?v=4") | ||
->heightByPercent(6) | ||
->nameAvatar('Ilia Chubarov') | ||
->sizeTitle(5) | ||
->left(), | ||
``` | ||
|
||
|
||
|