From c94ec9630bc8b88de20052a31cf727f175cb4c47 Mon Sep 17 00:00:00 2001 From: Maurice Renck Date: Fri, 19 Feb 2021 14:05:48 +0100 Subject: [PATCH] improvement: allow setting classenames for buttons --- README.md | 49 +++++++++++++++++++++------------------- composer.json | 2 +- config/options.php | 4 ++-- package.json | 2 +- snippets/kommentform.php | 6 ++--- 5 files changed, 33 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 2fb1b92..47e87d1 100644 --- a/README.md +++ b/README.md @@ -91,29 +91,32 @@ You could add it to your site.yml blueprint so you see the number of pending Kom You can fine tune the komments to behave as you whish, use this options in `config.php` file. -| Option | Default | Description | -| --------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `debug` | `false` | Enables debug mode and logs all webmentions to a file | -| `enable-webmention-support` | `true` | Listen to Webmentions and save them as komment | -| `webmention-auto-publish` | `true` | When you receive a webmention set status to published | -| `komment-auto-publish` | `false` | When you receive a komment set status to published | -| `send-mention-on-update` | `true` | Detect urls in your pages and send webmentions | -| `send-limit-to-templates` | `[]` | An array of template names (strings). When set webmentions will be sent only when this pages are updated | -| `send-mention-url-fields` | `['text']` | An array of fieldnames in which the plugin will search for urls | -| `send-to-mastodon-on-publish` | `false` | Send a post to mastodon when publishing a page | -| `mastodon-bearer` | - | Your Mastodon bearer Token | -| `mastodon-instance-url` | `'https://mastodon.social/api/v1/statuses‘` | Your Mastodon API Endpoint | -| `mastodon-text-field` | `'mastodonTeaser'` | The fieldname of the field you write your mastodon msg in, otherwise the title is used | -| `ping-archiveorg` | `false` | Enable if you want to inform archive.org when you update a page | -| `auto-delete-spam` | `true` | When comment spam is detected it will be rejected, set to false to just mark the comment as SPAM | -| `auto-disable-komments` | `0` | Disables the komment form after `n` number of days. Use `0` to never disable komments (default) | -| `auto-disable-komments-datefield` | `'date'` | Set a field to function as publish date field used for `auto-disable-komments` | -| `komment-icon-like` | '❤️' | The icon for likes in your komment list | -| `komment-icon-reply` | '💬' | The icon for replies/comments in your komment list | -| `komment-icon-repost` | '♻️' | The icon for reposts in your komment list | -| `komment-icon-mention` | '♻️' | The icon for mention in your komment list | -| `komment-icon-verified` | '✅' | The icon for the verify badge list | -| `replyClassNames` | '' | add classnames tto the reply link | +| Option | Default | Description | +| --------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `debug` | `false` | Enables debug mode and logs all webmentions to a file | +| `enable-webmention-support` | `true` | Listen to Webmentions and save them as komment | +| `webmention-auto-publish` | `true` | When you receive a webmention set status to published | +| `komment-auto-publish` | `false` | When you receive a komment set status to published | +| `send-mention-on-update` | `true` | Detect urls in your pages and send webmentions | +| `send-limit-to-templates` | `[]` | An array of template names (strings). When set webmentions will be sent only when this pages are updated | +| `send-mention-url-fields` | `['text']` | An array of fieldnames in which the plugin will search for urls | +| `send-to-mastodon-on-publish` | `false` | Send a post to mastodon when publishing a page | +| `mastodon-bearer` | - | Your Mastodon bearer Token | +| `mastodon-instance-url` | `'https://mastodon.social/api/v1/statuses‘` | Your Mastodon API Endpoint | +| `mastodon-text-field` | `'mastodonTeaser'` | The fieldname of the field you write your mastodon msg in, otherwise the title is used | +| `ping-archiveorg` | `false` | Enable if you want to inform archive.org when you update a page | +| `auto-delete-spam` | `true` | When comment spam is detected it will be rejected, set to false to just mark the comment as SPAM | +| `auto-disable-komments` | `0` | Disables the komment form after `n` number of days. Use `0` to never disable komments (default) | +| `auto-disable-komments-datefield` | `'date'` | Set a field to function as publish date field used for `auto-disable-komments` | +| `komment-icon-like` | '❤️' | The icon for likes in your komment list | +| `komment-icon-reply` | '💬' | The icon for replies/comments in your komment list | +| `komment-icon-repost` | '♻️' | The icon for reposts in your komment list | +| `komment-icon-mention` | '♻️' | The icon for mention in your komment list | +| `komment-icon-verified` | '✅' | The icon for the verify badge list | +| `replyClassNames` | '' | add classnames to the reply link | +| `form.submit.classNames` | `'button button-tiny button-primary'` | add classnames to the submit button | +| `form.twitter.classNames` | `'button button-tiny button-outlined share komment-share-twitter'` | add classnames to the twitter button | +| `form.mastodon.classNames` | `'button button-tiny button-outlined share komment-share-mastodon'` | add classnames to the mastodon button | **Please make sure to prefix all the options with `mauricerenck.komments.`**. For example the debug option should be set in your `config.php` like so: `'mauricerenck.komments.debug' => true` diff --git a/composer.json b/composer.json index 6272741..5a5e87b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mauricerenck/komments", - "version": "0.10.2", + "version": "0.10.3", "description": "A comment and webmention plugin for Kirby 3", "type": "kirby-plugin", "license": "MIT", diff --git a/config/options.php b/config/options.php index 60985ee..c4bc383 100644 --- a/config/options.php +++ b/config/options.php @@ -25,6 +25,6 @@ 'komment-icon-verified' => '✅', 'replyClassNames' => '', 'form.submit.classNames' => 'button button-tiny button-primary', - 'form.twitter.classNames' => '', - 'form.mastodon.classNames' => '', + 'form.twitter.classNames' => 'button button-tiny button-outlined share komment-share-twitter', + 'form.mastodon.classNames' => 'button button-tiny button-outlined share komment-share-mastodon', ]; diff --git a/package.json b/package.json index f0f73cd..9417865 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "komments", - "version": "0.10.2", + "version": "0.10.3", "description": "A comment and webmention plugin for Kirby 3", "main": "index.js", "author": "Maurice Renck", diff --git a/snippets/kommentform.php b/snippets/kommentform.php index fe7fa2c..da8c92d 100644 --- a/snippets/kommentform.php +++ b/snippets/kommentform.php @@ -15,8 +15,8 @@

- - + +
@@ -40,6 +40,6 @@ - +
\ No newline at end of file