covata-theme-builder v0.1.14
WebApp Theme Builder
Index
- Overview
- Requirements
- Getting started
- Creating/updating themes
- Deploying themes
- Upgrading the WebApp Theme Builder tool
- Additional
buildthemescommand options - Changelog
Overview
The Covata/WebApp Theme Builder tool allows you to build themes (locally on your own computer) for SafeShare's web-based interfaces.
Themes allow the color schemes and logos utilised throughout the SafeShare web application user interface to be customised for individual organisations, where each individual organisation is associated with its own theme. (For more information about adding/configuring organisations through SafeShare Administration, see Administering organisations in the SafeShare Administrator's Guide.)
These color scheme and logo customisations are also utilised throughout:
- the Organisation Administration interface,
- the SafeShare Administration interface, as well as
- email notifications sent out by the Covata Platform.
Newly installed instances of SafeShare are pre-packaged with the Covata default theme. This theme is initially used for all organisations' SafeShare web application and Organisation Administration interfaces, email notifications, as well as the SafeShare Administration interface.
Using this WebApp Theme Builder tool, you can generate different themes - one for each organisation - as well as your own default theme (aka the 'system' theme), which is used for:
- any organisation that does not have a theme defined for it,
- the SafeShare Administration interface and
- the My Account feature.
Be aware that:
- This default/'system' theme is distinct from the Covata default theme (pre-packaged with SafeShare).
- When using the WebApp Theme Builder tool, you must generate the 'system' theme.
Requirements
The WebApp Theme Builder tool requires the following to be installed on your local machine:
For each organisation you wish to create a theme for, make a note of its Organisation ID. A SafeShare administrator can obtain an Organisation's ID through the Organisations page of SafeShare Administration. (For more information, see Administering organisations in the SafeShare Administrator's Guide.)
Getting started
Tip: You should only need to run through this Getting Started procedure once. If you are updating existing and/or creating more themes, please skip to the Creating/updating themes section below.
Ensure you have met the Requirements (above).
Open your terminal/command prompt.
Run the command
sudo npm install covata-theme-builder -gto install the WebApp Theme Builder tool.Do either of the following to set up your local 'working'
sourcesdirectory (which the WebApp Theme Builder tool will use to generate themes):Manually set up your
sourcesdirectory:Create a directory named
sourcesat an appropriate location on your computer.Within this
sourcesdirectory, create subdirectory namedsystem.Visit Covata's public BitBucket repository for the source of the WebApp Theme Builder tool and click through to the
sources/systemfolder.At this location:
Click the
theme.propertiesfile to access its content.Copy and paste this content into a text editor.
Save this text file with the same name (
theme.properties) in thesystemsubdirectory created above.
Navigate back to the
sources/systemfolder and note the image/logo files. These types of files are required for this tool to successfully build a theme.
Set up your
sourcesdirectory from the example provided within the WebApp Theme Builder tool's installation directory:Identify the directory where the WebApp Theme Builder tool was installed by the
npmcommand. This directory should be namedcovata-theme-builder.Note: On Mac OS X / Linux-based computers, this directory is typically within
/usr/local/lib/node_modules. On Microsoft Windows-based computers, this directory is the location of thenode.exebinary.Copy the
sourcesdirectory (within thecovata-theme-builderinstallation directory) to an appropriate location on your computer.
Note: The directory named
system(withinsources) contains the theme resources - i.e. color schemes and logos - for the default/'system' theme.
Creating/updating themes
Ensure you have completed the Getting Started procedure above before proceeding.
Notes:
- If you are only updating existing themes, begin at step 3, although skip steps 3 and 4 for any existing themes you do not intend to change.
- Check if you are running the latest version of the WebApp Theme Builder tool using the command
buildthemes --version. If you are not, follow the Upgrading the WebApp Theme Builder tool procedure below before continuing.
Create new directories (one for each new organisation a theme will be created for) immediately inside the
sourcesdirectory you set up (above).Important: The names of these directories must match their respective Organisation IDs (obtained in Requirements above) and each of these directories must be siblings of the
systemdirectory.For each (sub-)directory you created in the previous step, copy the
theme.propertiesfile from thesources/systemsubdirectory to each of these othersources/{OrganisationID}subdirectories.For each theme, copy their image/logo files to their respective
sources/{OrganisationID}subdirectories (similar to thesources/systemsubdirectory for the default/'system' theme):header-logo.(png|jpg|gif|bmp)- The image/logo used in the header of the SafeShare web application and Organisation Administration interfaces.Notes:
- The image/logo in the
systemdirectory is used for the default organisation theme, as well as for the SafeShare Administration interface. This principle applies to the other logo files described below. - For simplicity (espcially when upgrading the WebApp Theme Builder tool), ensure your image/logo file names match the names mentioned in this list.
- The image/logo in the
footer-logo.(png|jpg|gif|bmp)- The image/logo used in the footer of the SafeShare web application on the main Sign-in page.footer-logo-white.(png|jpg|gif|bmp)- The image/logo used in the footer of the SafeShare web application and Organisation Administration interfaces after user sign-in.favicon.ico- A 16x16 pixel (organisation-specific) favicon used by web browsers (e.g. on browser tabs).email-logo.(png|jpg|gif|bmp)- The image/logo used for all email notifications sent out by the Covata Platform.Note: SafeShare only makes use of the image/logo contained in the
systemdirectory. Therefore, copy this image/logo file contained in thesystemdirectory to all other organisation directories. (If anemail-logoimage file is not present in any organisation directory, then running thebuildthemescommand towards the end of this procedure will fail.)login-logo.(png|jpg|gif|bmp)- The image/logo used on the Covata/SafeShare Sign-in page.Note: SafeShare only makes use of the image/logo contained in the
systemdirectory. Therefore, for the same reason that applies to theemail-logofile (above), copy thelogin-logoimage file contained in thesystemdirectory to all other organisation directories.
For each theme, configure the values of each property in its
theme.propertiesfile (copied to the theme's subdirectory withinsourcesabove), with the theme's colors and image file names:Tip: Refer to the Themable areas of the SafeShare web application and Other themable SafeShare areas sections of the SafeShare Administrator's Guide for diagrams that depict where the following properties affect SafeShare's user interfaces.
header-logo- The name of the header image/logo file (located in this directory).footer-logo- The name of the footer image/logo file as seen on the sign-in page (located in this directory).footer-logo-white- The name of the footer image/logo file as seen after user sign-in (located in this directory).email-logo- The name of the email image/logo file (located in this directory).login-logo- The name of the sign-in page image/logo file (located in this directory).favicon- The name of the favicon file (located in this directory).header-color- The background color used for the header bar of the SafeShare web application and Organisation Administration interfaces, which also includes the header of email notifications.Note: The value of this property defined in the
systemdirectory'stheme.propertiesfile is used for the default organisation theme, the SafeShare Administration interface and all email notifications. This principle applies to the other color properties described below.header-text-color- The text color used in the header bar of the SafeShare web application and Organisation Administration interfaces. Be aware that this excludes the color of any text forming part of theheader-logoimage/logo (described above).hyperlink-active-color- The text color used when the Application menu at the top-right of the SafeShare web application or Organisation Administration interface (which contains the signed-in user's email address) is selected.primary-color- The main application color used for:The Folder button in the SafeShare web application.
The background color of dialog box headers throughout the SafeShare web application and Organisation Administration interfaces.
The background color of the left selected option on the Organisation Administration interface.
The SIGN IN button on the sign-in page.
Note: SafeShare only makes use of the value of this property defined in the
systemdirectory'stheme.propertiesfile.
primary-button-color- The color used for buttons associated with (i.e. to complement) areas where theprimary-coloris expressed. This can be considered the secondary color of SafeShare's web-based interfaces, which includes:The Upload button in the SafeShare web application.
Action buttons on:
Dialog boxes used throughout the SafeShare web application and Organisation Administration interfaces.
Pages throughout SafeShare's web-based My Account feature and on pages throughout the Organisation Administration interface.
create-button-color- The color used for the Create button in the SafeShare web application.email-divider-color- The color used for the underlining band below theheader-colorblock in email notifications, whose value is defined in thesystemdirectory'stheme.propertiesfile.Note: SafeShare only makes use of the value of this property defined in the
systemdirectory'stheme.propertiesfile. Therefore, copy this property's value to thetheme.propertiesfile in all other organisations' directories. (If a valid value is not specified for this property in thetheme.propertiesfile of any organisation directory, then running thebuildthemescommand towards the end of this procedure will fail.)selected-item-color- The color used for a selected item on the main SafeShare page.selected-item-text-color- The text color used for a selected item on the main SafeShare page.footer-color- The background color used for the footer bar of the SafeShare web application and Organisation Administration interfaces.footer-text-color- The text color used in the footer bar of the SafeShare web application and Organisation Administration interfaces. Be aware that this excludes the color of any text forming part of thefooter-logoimage/logo (decsribed above).alert-success-color- The background color used for the success alert popup of the SafeShare web application and Organisation Administration interfaces.alert-success-text-color- The text color used in the success alert popup of the SafeShare web application and Organisation Administration interfaces. Be aware that this excludes the color of any text forming part of thefooter-logoimage/logo (decsribed above).
If you do not intend to use any Additional
buildthemescommand options (see below for details), ensure your current directory is the parent directory ofsources.Compile your themes by running the command
buildthemes.Assuming you have followed the procedure above correctly, the
buildthemescommand generates anoutputdirectory (based on the contents of thesourcesdirectory), whose content is deployed to the SafeShare web application installation directory.Tip: The
buildthemescommand can be run without the need to specify a path.
Deploying themes
Once you have created/updated your themes (above), copy the output directory to the root directory of the SafeShare web application (of the Covata Platform instance) and rename this output directory to themes.
Typically, this process would be conducted by a systems administrator who installed your SafeShare/Covata Platform instance, which is deployed using Puppet. Therefore, this theme deployment process would also be managed by Puppet.
Covata provides two BitBucket repositories for managing Puppet-based deployments of SafeShare instances:
SafeShare Puppet module - contains Puppet configurations for the core components of the SafeShare instance.
Reference tree - contains additional Puppet configurations that support the SafeShare Puppet module above, as well as additional configurations for assisting with deployments of SafeShare to virtual machines (using Vagrant) and other hardware.
Note: All themes compiled by running
buildthemesmust be deployed to a Covata Platform instance. Copying a single theme's subdirectory from your localoutputfolder to thethemesdirectory of the SafeShare web application will not work.
Upgrading the WebApp Theme Builder tool
Ensure you have completed the Getting Started procedure above before proceeding.
Run the command
sudo npm update covata-theme-builder -gto update the WebApp Theme Builder tool.Note: Check to ensure that this command has upgraded the WebApp Theme Builder tool to the version indicated on this page by running the command
buildthemes --version. If thisnpm updatedid not successfully upgrade the tool, run the following commands:sudo npm uninstall covata-theme-builder -gsudo npm install covata-theme-builder -g
To verify you have the updated version of the tool, run
buildthemes --versionagain.Ensure your local 'working'
sourcesdirectory is up to date (since this is required for updated versions of the WebApp Theme Builder tool to function correctly). To do this:Identify the directory where the WebApp Theme Builder tool was installed by the
npmcommand. This directory should be namedcovata-theme-builder.Note: On Mac OS X / Linux-based computers, this directory is typically within
/usr/local/lib/node_modules. On Microsoft Windows-based computers, this directory is the location of thenode.exebinary.Change directory into the
sources/systemsubdirectory ofcovata-theme-builder.Ensure that the types of image/logo files and properties in the
theme.propertiesfile in each subdirectory of your local 'working'sourcesdirectory are consistent with those in thissources/systemsubdirectory ofcovata-theme-builder(which will contain any updates from the previousnpm updatestep).Tip: It might be easier opening your local 'working'
sourcesdirectory in a separate window to perform this substep.For any new image/logo files and properties of the
theme.propertiesfile in thesources/systemsubdirectory that do not exist in the subdirectories of your 'working'sourcesdirectory, copy these across to each of these subdirectories.( Optional, but recommended for tidiness ) Similarly, for any image/logo files and properties of the
theme.propertiesfile in the subdirectories of your 'working'sourcesdirectory that do not exist in thesources/systemsubdirectory, remove the relevant files/properties intheme.propertiesfrom the subdirectories of your 'working'sourcesdirectory.
Additional buildthemes command options
The buildthemes command has some additional options.
For help on what you can do with the tool, type the command:
buildthemes --help
Command option details
-o, --output- allows you to specify a different location and name to which the content of theoutputdirectory will be generated.Example for Mac OS X or Linux:
buildthemes -o /User/someuser/safesharethemes/outputExample for Windows:
buildthemes -o C:\Users\someuser\safesharethemes\outputSimply specify the directory name (eg.
buildthemes -o output) to generate theoutputdirectory within your current directory.
-s, --source- allows you to specify a different location and name to which the content of thesourcesdirectory will be read from.Example on Mac or Linux:
buildthemes -s /User/someuser/safesharethemes/sources.Example on Windows:
buildthemes -s C:\Users\someuser\ safesharethemes\sources.Simply specify the directory name (eg.
buildthemes -o sources) if thesourcesdirectory is located within your current directory.
-c, --config- allows you to specify a different location and name for thesettings.jsonfile. This file 'pre-defines' the location and name of yoursourcesandoutputdirectories.Example for Mac OS X or Linux:
buildthemes -c /User/someuser/safesharethemes/settings.jsonExample for Windows:
buildthemes -c C:\Users\someuser\safesharethemes\settings.jsonSimply specify the name of this file (eg.
buildthemes -c settings.json) if this file is located within your current directory.
Changelog
Changes in 0.1.12 - 0.1.14
- Introduced a new field to customise the Create Button Color, and
README.mdfile updates.
Changes in 0.1.11
- Introduced a new footer-logo-white logo/image that appears after user login, and
README.mdfile updates.
Changes in 0.1.10
README.mdfile updates - Content/detail improvements and corrections.
Changes in 0.1.9
buildthemesnow allows the colors of success messages (which appear temporarily over the header) to be customised.
Changes in 0.1.8
- Fixed a bug in which the SIGN IN button was determined by the
primary-button-colorproperty instead ofprimary-color.buildthemesnow correctly uses theprimary-colorproperty value for its color.
Changes in 0.1.3 - 0.1.7
README.mdfile updates - Minor formatting fixes + content/detail improvements and corrections.
Changes in 0.1.2
README.mdfile updates - Added new sections - one on 'Upgrading the WebApp Theme Builder tool' and another for this Changelog.Fixed the functionality of the
builthemescommand's--versionoption.
Changes in 0.1.1
README.mdfile updates - Documented the footer customisation changes in 0.1.0.
Changes in 0.1.0
buildthemesnow allows the footer's background and text colors to be customised.
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago