Skip to content

Commit

Permalink
Reference icons: add link to Remix Icon set
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Nov 29, 2023
1 parent c81e1dc commit 188358a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Title: Icons

Intro:

Kirby comes with a set of icons that you can use in blueprints and extensions.
Kirby comes with a set of icons that you can use in blueprints and extensions. They are based on the (link: https://remixicon.com text: Remix Icon) set.

----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Text:

With the `icons` extension, you can register additional icons for use in the Panel.

The default icons are based on the (link: https://remixicon.com text: Remix Icon) set which you can also use for finding matching ones for your custom icons.

## Example

As always, you first have to register the Plugin in a plugin folder's `index.php`.
Expand Down Expand Up @@ -37,3 +39,15 @@ icon: my-icon

# other stuff
```

## Viewbox

Kirby assumes that all icons are based on a `0 0 24 24` viewbox. If your SVG is based on a different viewbox, you can include the wrapping `<svg>` tag to specifc the viewbox.

```js "/site/plugins/icons/index.js"
panel.plugin('my/icons', {
icons: {
'my-icon': '<svg viewBox="0 0 18 18"><path d="M7,3V13H5v2H8a1,1,0,0,0,1-1V4h2V2H8A1,1,0,0,0,7,3Z" /><circle cx="2" cy="14" r="2" /><polygon points="12 0 12 6 16 3 12 0" /></svg>'
}
});
```

0 comments on commit 188358a

Please sign in to comment.