Customizing themes with Restyle
Restyle can utilize user-supplied themes.
These themes are stored in the Restyle Configuration Store.
Restyle Themes
A Restyle theme is a JSON-formatted document containing configuration elements that control how Restyle updates the design elements of a Notes database. A JSON schema, describing the structure of a Restyle theme, is used to validate a theme document before Restyle uses it.
Prerequisites
- HCL Domino Designer installed on your machine.
- Understand the JSON (JavaScript Object Notation) format at a basic level.
- A JSON-compatible editor.
- A local replica of
restyle.nsf
. For more information, see Restyle Configuration Store.
Exporting Themes from Restyle.nsf
The best way to create a custom theme is to start with an existing theme and modify
it as needed. Export a theme and the theme schema from restyle.nsf
by following these steps:
- Create a directory to use as a destination for the theme and schema files.
- Launch Domino Designer.
- Open the local replica of
restyle.nsf
. - Navigate to Resources/Files and double-click the Files entry.
- Select
reserved/schema/theme-<version>.json
and click Export. This is the "theme schema". - Select the directory created in step 1 and click Save to save the schema file.
- Select any document under
reserved/theme
to use as a starting theme and click Export.
Note: The file names contain the sequence
2f
instead of the '/'. Since you aren't importing these files after changing, you
can rename to remove the 2f
if desired.Creating a theme
- With your JSON-capable editor, open the exported theme and Save
As a new theme, for example:
my_custom_theme.json
. - For best results, configure your editor to associate the theme schema with your new theme. This provides auto-complete functionality and validates the document before Restyle uses it.
- Modify the theme document as needed.
- Import the new theme into
restyle.nsf
:- Launch Domino Designer.
- Open the local replica of
restyle.nsf
. - Navigate to Resources/Files and double-click the Files entry.
- At the top of the "Files" collection, click New File Resource.
- Enter
theme/my_custom-theme.json
(or whatever you named your theme filename) as the name.Note: The "theme/" prefix is required to allow the Restyle feature to find the custom theme. - Enter a user-friendly display name as the alias value.
- Comment is not currently used but may be useful for documentation purposes.
- In your JSON editor, select the entire document and copy to the clipboard.
- Paste the contents of the clipboard into the newly created file resource in Domino Designer.
Verify your changes are available
- Using Notes, select a database template to restyle.
- Click to display the restyle options.
- Your custom theme should appear in a dropdown under the built-in theme choices.