**D4Science Keycloak Themes** repository collects the implementations of base D4Science theme and a set of specific per gateway themes implementations.
Each Keycloak theme is made of a set of [Freemarker](https://freemarker.apache.org/) templates.
## Structure of the project
The source code is present in `src` folder.
The themes are in `src/themes` subfolder.
The `src/utils` subfolder contains some utility test scripts to create Keycloak clients that uses a specific theme.
As specified in [Deploying Themes](https://www.keycloak.org/docs/latest/server_development/#deploying-themes) section of the documentation, *themes can be deployed to Keycloak by copying the theme directory to themes or it can be deployed as an archive.*
In a future release of this project, when themes have been fully tested, a script to build a themes archive will be developed. Currently, in order to deploy themes in a Keycloak instance, the first approach is applied.
During the development phase, themes caching in Keycloak configuration file has to be disabled. To do this edit `standalone.xml`. For `theme` set `staticMaxAge` to `-1` and both `cacheTemplates` and `cacheThemes` to `false`.
If you are already logged-in in Keycloak administration console you have to logout and then re-login. At that you can set one of the new themes per Keycloak Realm or for a specific Keycloak Client in the realm.