Good Accordion

Beschrijving

Simpele en goede accordion plugin die 2 blokken biedt: Accordion en Accordion-pane. Versleep een Accordion blok naar je bericht, pagina of extra berichttype en druk op de ‘Paneel toevoegen’ knop zo vaak als je nodig hebt.

Functies:

  • Instelling voor ‘Eén tegelijk’. Slechts één paneel binnen een accordeon kan worden geopend. Haal het vinkje weg om toe te staan dat alle panelen tegelijkertijd worden geopend.
  • Gebruik de ‘Tab’ toets om op de panelen te focussen en druk op ‘Enter’ om te openen
  • Extensive Use of Accessability attributes
  • Optionally choose for HTML and tags.
  • Panelen scrollen in beeld wanneer een vorig paneel gesloten wordt
  • Pas kleuren, marges en padding aan in de blok-editor
  • Styling toevoegen via css, css-vars of theme.json

Gebruik

Versleep een Accordion blok naar een bericht of pagina of CPT en gebruik de ‘Paneel toevoegen’ knop onderaan het blok om paneel-blokken toe te voegen.

stijling

Bij de basis worden enkele basisstijlvariabelen gedefinieerd die door je thema kunnen worden overschreven. Sommige hiervan kunnen ad hoc door de gebruiker in de blok-editor worden gewijzigd. Deze zijn:

    --wp--custom--accordion--transition-time: 0.1s;
    --wp--custom--accordion--margin-top: 0px;
    --wp--custom--accordion--margin-right: 0px;
    --wp--custom--accordion--margin-bottom: 0.1em;
    --wp--custom--accordion--margin-left: 0px;
    --wp--custom--accordion--header-padding-top: 0.5em;
    --wp--custom--accordion--header-padding-right: 2em;
    --wp--custom--accordion--header-padding-bottom: 0.5em;
    --wp--custom--accordion--header-padding-left: 2em;
    --wp--custom--accordion--content-padding-top: 0.5em;
    --wp--custom--accordion--content-padding-right: 2em;
    --wp--custom--accordion--content-padding-bottom: 0.5em;
    --wp--custom--accordion--content-padding-left: 2em;
    --wp--custom--accordion--header--text-color: #ffffff;
    --wp--custom--accordion--header--background-color: #666666;
    --wp--custom--accordion--header--active-text-color: #ffffff;
    --wp--custom--accordion--header--active-background-color: #999999;
    --wp--custom--accordion--body--text-color: #ffffff;
    --wp--custom--accordion--body--background-color: #666666;

De standaardwaarden kunnen ook worden gedefinieerd in de theme.json van je (sub-)thema:

Voeg ze toe aan de theme.json zoals dit:

{
    "$schema": "https://schemas.wp.org/wp/6.7/theme.json",
    "version": 3,
    "settings": {
        "custom": {
            "accordion": {
                "transitionTime": "0.1s",
                "marginTop": "0px",
                "marginRight": "0px",
                "marginBottom": "0.1em",
                "marginLeft": "0px",
                "headerPaddingTop": "1em",
                "headerPaddingRight": "1em",
                "headerPaddingBottom": "1em",
                "headerPaddingLeft": "1em",
                "contentPaddingTop": "0.5em",
                "contentPaddingRight": "2em",
                "contentPaddingBottom": "0.5em",
                "contentPaddingLeft": "2em",
                "headerTextColor": "#ffffff",
                "headerBackgroundColor" : "#666666",
                "activeHeaderTextColor": "#ffffff"
                "activeHeaderBackgroundColor": "#999999",
                "bodyTextColor": "#000000",
                "bodyBackgroundColor" : "#ffffff",
            }
        }
    }
}<h3>Accessability</h3>The pane-headers have a tab-index. If the Enter-key is pressed while a pane-header has focus, a click-event is triggered on that pane-header thereby activating / opening it.

Schermafdrukken

  • Good Accordion

Blokken

Deze plugin heeft 2 blokken.

  • Accordion Pane Accordion Pane Block for Accordion.
  • Accordion Accordion block, uses Accordion-pane block.

Installatie

Upload de plugin bestanden naar de /wp-content/plugins/good-accordion folder, of installeer de plugin direct via het WordPress plugins scherm.

Activeer de plugin op het ‘Plugins’ scherm in WordPress

FAQ

Kan ik het accordion blok in een ander accordion nesten?

Yes. Just pull another good-accordion block into the open pane of another good-accordion block.

Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

Bijdragers & ontwikkelaars

“Good Accordion” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Good Accordion” is vertaald in 1 locale. Dank voor de vertalers voor hun bijdragen.

Vertaal “Good Accordion” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

1.1

Release Date – june 2025

  • Added some more ARIA attributes;

  • Added optional details / summary tags. Div tags are default and allow for animated opening / closing of panes. Opening and closing of panes with details / summary tags are determined by browser behaviour;

  • Added seperate padding for header and content of the pane. Padding css-vars are renamed thus:

    –wp–custom–accordion–header-padding-top: 0.5em;
    –wp–custom–accordion–header-padding-right: 2em;
    –wp–custom–accordion–header-padding-bottom: 0.5em;
    –wp–custom–accordion–header-padding-left: 2em;
    –wp–custom–accordion–content-padding-top: 0.5em;
    –wp–custom–accordion–content-padding-right: 2em;
    –wp–custom–accordion–content-padding-bottom: 0.5em;
    –wp–custom–accordion–content-padding-left: 2em;

  • Added translations

1.0.2

Release Date – 14 April 2025

  • Replaced Dashicons with some SVG sources
  • Toggle switch for icon-position in header pane
  • Updated translation
  • Added nl_NL-formal translation

1.0.1

Release datum – 10 april 2025

  • Kleine bugfix in accordeon paneel header tag