A simple section for Kirby project Copy commonly used characters to your clipboard

Kirby Punctuation Section

This plugin provides a simple, customizable section for your Kirby project from which your clients can quickly copy commonly used characters to the clipboard.

Label translations are supported as well. See [usage] below.

Requirements

  • Kirby 3.5+

Installation

Download

Download and copy this repository to /site/plugins/kirby-punctuation-section.

Git Submodule

git submodule add https://github.com/johannschopplich/kirby-punctuation-section.git site/plugins/kirby-punctuation-section

Composer

composer require johannschopplich/kirby-punctuation-section

Usage

Create a section/punctuation-helper.yml in your blueprints folder and add characters you want to provide for clipboard copying.

A bare minimum section example:

type: punctuation
headline: Lil Punctuation Helper
fieldsets:
  - category:
    label: German Quotation Marks
    chars:
      - "„"
      - "‚"
      - "‘"
      - "“"

Now, you're already good to go! Of course, you probably want to adapt the characters to your needs.

Include the freshly created section anywhere in your pages blueprints:

sections:
  punctuation: sections/punctuation-helper

ℹ️ This Panel plugin uses the Clipboard API to write the character to the clipboard. It is only available to secure contexts, it cannot be used on http:-pages, only https:-pages.

Setting a browser flag can allow HTTP pages to be interpreted as secure, which might help you for local development.

Full Example

Take a look at the section blueprint below for a full fledged example, including label translations:

? Complete example
type: punctuation
headline:
  de: Kleine Interpunktionshilfe
  en: Lil Punctuation Helper
fieldsets:
  - category:
    label:
      de: Apostroph
      en: Apostrophe
    chars:
      - "’"
  - category:
    label:
      de: Gedankenstrich
      en: Hyphen
    chars:
      - "–"
  - category:
    label:
      de: Dt. Anführungszeichen
      en: German Quotation Marks
    chars:
      - "„"
      - "‚"
      - "‘"
      - "“"
  - category:
    label:
      de: Engl. Anführungszeichen
      en: English Quotation Marks
    chars:
      - "“"
      - "‘"
      - "’"
      - "”"
  - category:
    label: Guillemets
    chars:
      - "»"
      - "›"
      - "‹"
      - "«"
  - category:
    label:
      de: Sonstiges
      en: Other
    chars:
      - "…"
      - "×"

License

[MIT]( License © 2021 Johann Schopplich

GitHub

https://github.com/johannschopplich/kirby-punctuation-section