refactor: move profile size from img to degicated avatar shortcode (#817)
BREAKING CHANGE: The `size=profile` option was removed from the `img` shortcode. To create avatar images the new `avatar` shortcode can be used.
This commit is contained in:
parent
7b52c98f17
commit
6eb576575e
6 changed files with 134 additions and 25 deletions
46
exampleSite/content/en/shortcodes/avatar/_index.md
Normal file
46
exampleSite/content/en/shortcodes/avatar/_index.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: Avatar
|
||||
resources:
|
||||
- name: avatar
|
||||
src: "avatar.jpg"
|
||||
title: "Avatar"
|
||||
---
|
||||
|
||||
The avatar shortcode is another custom image shortcode.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Usage
|
||||
|
||||
Define a resource in the page front matter.
|
||||
|
||||
<!-- spellchecker-disable -->
|
||||
|
||||
```md
|
||||
---
|
||||
resources:
|
||||
- name: avatar
|
||||
src: "images/avatar.jpg"
|
||||
title: "Avatar"
|
||||
---
|
||||
|
||||
{{</* avatar name="avatar" */>}}
|
||||
```
|
||||
|
||||
<!-- spellchecker-enable -->
|
||||
|
||||
## Attributes
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- spellchecker-disable -->
|
||||
{{< propertylist name=shortcode-avatar sort=name order=asc >}}
|
||||
<!-- spellchecker-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Example
|
||||
|
||||
<!-- spellchecker-disable -->
|
||||
|
||||
{{< avatar name=avatar size="small" >}}
|
||||
|
||||
<!-- spellchecker-enable -->
|
Loading…
Add table
Add a link
Reference in a new issue