Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Configurable Show/Hide Button Functionality #13

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PxaMMaxP
Copy link

This commit introduces the functionality of a configurable show/hide button for the menu.

Changes include:

  • Configuration Options:

    • toggle: Option to activate or deactivate the button.
    • initially_hide: Determines whether the menu is hidden initially.
    • hide_text: Text displayed on the button to hide the menu.
    • show_text: Text displayed on the button to show the menu.
  • CSS:

    • Added new classes associated with the show/hide button and its states (visible/hidden).
  • PHP:

    • Implemented logic to incorporate the show/hide button into the menu. This functionality is independent of whether a heading text is set or not.

Changes
- Configuration:
  - toggle
     Activate the button or not.
  - initially_hide
     Hidden in initial state or not.
  - hide_text
     The text of the button to hide the menu.
  - show_text
     The text of the button to make the menu visible.

- CSS:
   Corresponding classes created for the button (with ID) and for hiding or making visible.

- PHP:
   Added logic to add the button. This also works without a heading text being set.
The show/hide symbols are now displayed at the correct time.
… class, which led to the overwriting of the toc-$this->style class.

- Adjusted logic to ensure both toc-* and toc-$this->style classes are correctly applied to the top element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant