Extensions/Assessment/themes/juniorQuest

Extensions add specific functionality to Items API. They rely on modules within LT being available.

Themes use sass files to style the UI. You will need to handle them using your build tool of choice. Here is a sample webpack config:

module.exports = {
    entry: {
        main: './src/index.js',
    },
    output: {
        path: __dirname + '/dist',
        filename: 'bundle.js',
    },
    module: {
        rules: [
            {
                test: /\.s[ac]ss$/i,
                use: ['style-loader', 'css-loader', 'sass-loader'],
            },
        ],
    },
};

--

This script loads a custom UI theme for Items API.

Use the following custom region configuration to load this theme:

{
    "config": {
        "regions": {
            "bottom-left": [
                {
                    "type": "previous_button",
                    "show_label_option": true
                }
            ],
            "bottom-right": [
                {
                    "type": "next_button"
                }
            ],
            "items": [
                {
                    "type": "items_progress_element",
                    "shown": false
                },
                {
                    "type": "slider_element"
                }
            ],
            "right": [
                {
                    "type": "verticaltoc_element"
                }
            ],
            "top-left": [
                {
                    "type": "title_element"
                }
            ]
        }
    }
}

Methods

run()

Loads the Junior Quest theme for Items API (the player).

Since
2.13.0
Example
import { LT } from '@caspingus/lt/src/assessment/core';
import * as theme from '@caspingus/lt/src/assessment/extensions/ui/themes/juniorQuest/index';

LT.init(itemsApp); // Set up LT with the Items API application instance variable
theme.run();