commit
344f7fdb47
2 changed files with 17 additions and 17 deletions
|
@ -12,17 +12,17 @@
|
||||||
"title": "Server Developer Guide",
|
"title": "Server Developer Guide",
|
||||||
"project": {
|
"project": {
|
||||||
"name": "Red Hat Single Sign-On",
|
"name": "Red Hat Single Sign-On",
|
||||||
"version": "7.0.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
"community": false,
|
"community": false,
|
||||||
"product": true,
|
"product": true,
|
||||||
"adminguide": {
|
"adminguide": {
|
||||||
"name": "Server Administration Guide",
|
"name": "Server Administration Guide",
|
||||||
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/server-administration-guide/"
|
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.1-Beta/server-administration-guide/"
|
||||||
},
|
},
|
||||||
"clientguide": {
|
"clientguide": {
|
||||||
"name": "Securing Applications and Services Guide",
|
"name": "Securing Applications and Services Guide",
|
||||||
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/securing-applications-and-services-guide/"
|
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.1-Beta/securing-applications-and-services-guide/"
|
||||||
|
|
||||||
},
|
},
|
||||||
"installguide": {
|
"installguide": {
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
},
|
},
|
||||||
"apidocs": {
|
"apidocs": {
|
||||||
"name": "API Documentation",
|
"name": "API Documentation",
|
||||||
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/api-documentation/"
|
"link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.1-Beta/api-documentation/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,17 +18,17 @@ A theme can provide one or more types to customize different aspects of {{book.p
|
||||||
|
|
||||||
=== Configure Theme
|
=== Configure Theme
|
||||||
|
|
||||||
All theme types, except welcome, is configured through the `Admin Console`. To change the theme used for a realm open the `Admin Console`, select
|
All theme types, except welcome, are configured through the `Admin Console`. To change the theme used for a realm open the `Admin Console`, select
|
||||||
your realm from the drop-down box in the top left corner. Under `Realm Settings` click on `Themes`.
|
your realm from the drop-down box in the top left corner. Under `Realm Settings` click on `Themes`.
|
||||||
|
|
||||||
NOTE: To set the theme for the `master` admin console you need to set the admin console theme for the `master` realm. To see the changes to the admin console
|
NOTE: To set the theme for the `master` admin console you need to set the admin console theme for the `master` realm. To see the changes to the admin console
|
||||||
refresh the page.
|
refresh the page.
|
||||||
|
|
||||||
To change the welcome theme you need to edit `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
To change the welcome theme you need to edit `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
||||||
See the link:{{book.installguide.link}}[{{book.installguide.name}}] for more details on
|
See the link:{{book.installguide.link}}[{{book.installguide.name}}] for more details on
|
||||||
where the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file lives.
|
where the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file lives.
|
||||||
|
|
||||||
Add `welcomeTheme` to the theme element, for example:
|
Add `welcomeTheme` to the theme element, for example:
|
||||||
|
|
||||||
[source,xml]
|
[source,xml]
|
||||||
----
|
----
|
||||||
|
@ -48,7 +48,7 @@ directly. Instead create your own theme that extends one of the bundle themes.
|
||||||
|
|
||||||
=== Creating a Theme
|
=== Creating a Theme
|
||||||
|
|
||||||
A theme consists of:
|
A theme consists of:
|
||||||
|
|
||||||
* HTML templates (http://freemarker.org[Freemarker Templates])
|
* HTML templates (http://freemarker.org[Freemarker Templates])
|
||||||
* Images
|
* Images
|
||||||
|
@ -78,7 +78,7 @@ restarting {{book.project.name}}. To do this edit `standalone.xml`. For `theme`
|
||||||
</theme>
|
</theme>
|
||||||
----
|
----
|
||||||
|
|
||||||
Remember to re-enable caching in production as it will significantly impact performance.
|
Remember to re-enable caching in production as it will significantly impact performance.
|
||||||
|
|
||||||
To create a new theme start by creating a new directory in the `themes` directory. The name of the directory becomes the name of the theme. For example to
|
To create a new theme start by creating a new directory in the `themes` directory. The name of the directory becomes the name of the theme. For example to
|
||||||
create a theme called `mytheme` create the directory `themes/mytheme`.
|
create a theme called `mytheme` create the directory `themes/mytheme`.
|
||||||
|
@ -98,7 +98,7 @@ import=common/keycloak
|
||||||
You have now created a theme with support for the login type. To check that it works open the admin console. Select your realm and click on `Themes`.
|
You have now created a theme with support for the login type. To check that it works open the admin console. Select your realm and click on `Themes`.
|
||||||
For `Login Theme` select `mytheme` and click `Save`. Then open the login page for the realm.
|
For `Login Theme` select `mytheme` and click `Save`. Then open the login page for the realm.
|
||||||
|
|
||||||
You can do this either by login through your application or by opening the Account Management console (`/realms/{realm name}/account`).
|
You can do this either by login through your application or by opening the Account Management console (`/realms/{realm name}/account`).
|
||||||
|
|
||||||
To see the effect of changing the parent theme, set `parent=keycloak` in `theme.properties` and refresh the login page.
|
To see the effect of changing the parent theme, set `parent=keycloak` in `theme.properties` and refresh the login page.
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ For example to replace `Username` on the login form with `Your Username` for the
|
||||||
usernameOrEmail=Your Username
|
usernameOrEmail=Your Username
|
||||||
----
|
----
|
||||||
|
|
||||||
Within a message values like `{0}` and `{1}` are replaced with arguments when the message is used. For example `{0} in `Log in to {0}` is replaced with the name
|
Within a message values like `{0}` and `{1}` are replaced with arguments when the message is used. For example {0} in `Log in to {0}` is replaced with the name
|
||||||
of the realm.
|
of the realm.
|
||||||
|
|
||||||
==== Internationalization
|
==== Internationalization
|
||||||
|
@ -331,7 +331,7 @@ To deploy `mytheme.zip` on Linux run:
|
||||||
[source,bash]
|
[source,bash]
|
||||||
----
|
----
|
||||||
bin/jboss-cli.sh --command="module add --name=org.example.mytheme --resources=mytheme.zip"
|
bin/jboss-cli.sh --command="module add --name=org.example.mytheme --resources=mytheme.zip"
|
||||||
----
|
----
|
||||||
|
|
||||||
On Windows run:
|
On Windows run:
|
||||||
|
|
||||||
|
@ -355,8 +355,8 @@ To manually create the module create the directory `modules/org/keycloak/example
|
||||||
</module>
|
</module>
|
||||||
----
|
----
|
||||||
|
|
||||||
You also need to register the module with {{book.project.name}}. This is done by editing `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
You also need to register the module with {{book.project.name}}. This is done by editing `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
||||||
See the link:{{book.installguide.link}}[{{book.installguide.name}}] for more details on
|
See the link:{{book.installguide.link}}[{{book.installguide.name}}] for more details on
|
||||||
where the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file lives.
|
where the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file lives.
|
||||||
|
|
||||||
Then find the `theme` tag under `keycloak-server` subsystem and add the module to `theme/modules/module`. For example:
|
Then find the `theme` tag under `keycloak-server` subsystem and add the module to `theme/modules/module`. For example:
|
||||||
|
@ -369,11 +369,11 @@ Then find the `theme` tag under `keycloak-server` subsystem and add the module t
|
||||||
<module>org.example.mytheme</module>
|
<module>org.example.mytheme</module>
|
||||||
</modules>
|
</modules>
|
||||||
</theme>
|
</theme>
|
||||||
----
|
----
|
||||||
|
|
||||||
If the server is running you need to restart the server after changing `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
If the server is running you need to restart the server after changing `standalone.xml`, `standalone-ha.xml`, or `domain.xml`.
|
||||||
|
|
||||||
[NOTE]
|
[NOTE]
|
||||||
====
|
====
|
||||||
If the same theme is deployed to both the `themes` directory and as a module the version in the `themes` directory is used.
|
If the same theme is deployed to both the `themes` directory and as a module the version in the `themes` directory is used.
|
||||||
====
|
====
|
||||||
|
|
Loading…
Reference in a new issue