Reference Omeka Classic theme

For Developers

Files

Path Contents
theme.ini Omeka's theme information, and the Theme Engine version the theme was built with (engine_version)
config.ini The Configure Theme form: Confetti's own settings (palette, fonts, decorations, dark mode, logo size, header layout and color), the engine settings it shows, and the form's sections
config/design.php Palettes, bundled fonts, stylesheets, the values of settings Confetti does not show, the decorations setting's body class, and Confetti's wording of some engine phrases
custom.php Boots the engine; templates reach it as $this->themeEngine()
asset/css/confetti.css Confetti's design, in the theme cascade layer
asset/css/confetti-integrations.css Styles for plugin markup (carousels, BlockSuite), loaded after plugin stylesheets
asset/fonts/ Fredoka, Baloo 2, Nunito, Andika and Atkinson Hyperlegible Next, with their OFL.txt
common/, items/, exhibit-builder/, simple-pages/… Templates, at the paths Omeka looks for them: links to the engine's
engine/ The Theme Engine for Omeka Classic, shared by RefBytes themes: settings logic, color math, design tokens, fonts, templates, base styles and scripts. engine/README.md documents it.

Confetti's own design tokens

Besides the --v-* design tokens (see Custom CSS and design tokens), Confetti defines a few of its own, which custom CSS can use too:

Token Use
--cf-radius, --cf-radius-sm Corner radius of cards and panels, and of smaller boxes
--cf-line Thickness of the sticker outlines
--cf-pop Offset of the sticker shadows
--cf-wave-w, --cf-wave-h Width and height of the wavy edges

The decorations setting adds cf-decor-playful or cf-decor-calm to the page's <body>, so custom CSS can target one or the other. The palette adds v-preset-sunshine, v-preset-bubblegum, v-preset-ocean or v-preset-meadow.

Settings resolution

$this->themeEngine()->get('key') returns a setting's value: the saved value, else the palette's value, else the config.ini default, else the value Confetti sets for settings it does not show (settings in config/design.php). Omeka's own get_theme_option() returns only the saved value, so use the helper.

Phrases

Confetti words some of the engine's messages its own way, such as "Oops! This page wandered off" for a missing page. They are in phrases in config/design.php, keyed by the engine's English text; templates print them with $this->themeEngine()->phrase('English text').

Changing a template

Every template is a link to the engine's file. To change one, replace the link with a real file at the same path (copy the engine's file first), and keep it when you upgrade. Keep Omeka's plugin hooks (public_head, public_body, public_content_top, public_items_show, public_home…) where the engine's file fires them, so plugins keep working.

For changes of style alone, use Advanced › Custom CSS: it is kept when the theme is upgraded.

Building

From the Omeka folder of the RefBytes repository:

php theme-engine/tools/link-theme.php themes/confetti
php theme-engine/tools/build-theme-config.php themes/confetti
php theme-engine/tests/contrast.php themes/confetti
./release.sh confetti --zip
Log in for Support