Interactive Book: Add base color selector

Description

An eager user and supporter of H5P has sponsored new features for Interactive Book that have been pre-qualified with and I have kicked in some free hours myself on top to make it possible. For your convenience, there is a separate pull request for every new feature. Here’s 3/3:

Demo content:

Acceptance criteria:

Overall

  • Pull request has been reviewed and has improved it if necessary

  • Changes are ready for release and have been merged into the master branch of Interactive Book

Feature

  • “As an author, I can choose an alternative base color that’s not the default blue.”

    • If no custom color is set or a custom color that’s not the default blue is set, then the content type behaves as today (uses values defined in CSS).

    • If a custom color is set, then

      • the view of Interactive Book uses the base color and derived values such as lighter variants for the menu, etc.

      • the subcontents' stylesheet is overridden to also use the base color instead of the common JoubelUI blue, so the subcontents' view matches the overall base color

Acceptance Criteria

None

Activity

Oliver Tacke May 30, 2022 at 12:54 PM

Thanks for the review! Yes, since IB has been updated meanwhile, some dependencies might have been out of date. Thanks for covering that. Just for the record: I am not 100 % content myself with the automated color selection, in particular if the chosen color is bright. That might still need some tweaking and possibly some input from UX.

Bao Khanh Pham May 30, 2022 at 12:50 PM

Works perfectly as the AC. There was an with the show-when version since it was updated but has been fixed after being merged from master.
Thank you for the code, Oliver

Done

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged

Sprint

Priority

Created April 20, 2022 at 9:30 AM
Updated June 3, 2022 at 7:36 AM
Resolved May 31, 2022 at 6:12 AM