https://github.com/moritzebeling/kirby-panel-button
Custom Kirby Panel button field to open or trigger URLs
https://github.com/moritzebeling/kirby-panel-button
button-field kirby kirby-plugin panel-field
Last synced: 5 months ago
JSON representation
Custom Kirby Panel button field to open or trigger URLs
- Host: GitHub
- URL: https://github.com/moritzebeling/kirby-panel-button
- Owner: moritzebeling
- Created: 2022-09-18T09:32:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T20:20:51.000Z (over 2 years ago)
- Last Synced: 2023-12-09T13:01:01.053Z (over 2 years ago)
- Topics: button-field, kirby, kirby-plugin, panel-field
- Language: Vue
- Homepage: https://getkirby.com/plugins/moritzebeling/kirby-panel-button
- Size: 132 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kirby Panel Button Plugin

Custom Kirby Panel field, that displays a button that can be used to either open a URL in a new tab or to trigger some url or webhook and wait for success or error. This can be very helpful, when you have content that can be viewed or edited on some external service or domain.
## Installation
```bash
composer require moritzebeling/kirby-panel-button
composer update moritzebeling/kirby-panel-button
```
Or download/clone this repo into `site/plugins` of your Kirby project.
If you’re working on a plugin which requires this plugin:
```bash
cd site/plugins/your-plugin
composer require moritzebeling/kirby-panel-button
```
## Usage
```yml
myLinkButton:
type: button
label: Open URL in new tab
text: Open # Button text
url: "https://example.com/{{ page.slug }}"
icon: edit
open: true # open URL in new tab
myWebhookButton:
type: button
label: Refresh data
text: Refresh
url: /fetch-data
theme: positive
reload: true # trigger a page refresh on success to display updated data
```
## Development
1. Install a fresh Kirby StarterKit
2. `cd site/plugins`
3. `git clone` this repo
4. `cd` into this plugin folder
```
npm run dev
```
Roadmap
- [ ] Add multilang support
- [ ] Refactor and simplify yml field configuration
- [ ] Add a buttons section that allows to add some text and multiple buttons
- [ ] Option to display result in dialog popup
## ☕️ Support
If you like this plugin, I would be glad if you would invite me for a coffee via [PayPal](http://more.moritzebeling.com/support)
If you have any ideas for further development or stumble upon any problems, please open an issue or PR. Thank you!
## Warranty
This plugin is work in progress and comes without any warranty. Use at your own risk.