Class ThemesRest

java.lang.Object
jakarta.servlet.GenericServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig

public class ThemesRest extends PetstoreConsolePage
Themes: the stock console themes and one custom token theme, switchable with ?theme=.

The chosen name reaches base.ftlh as the petstoreTheme view attribute, which feeds <@console theme=...>. ?theme=custom also sets petstoreCustomTheme, which turns on a nameless <@theme> block (it inherits the page theme, light-brown here) with <@token> overrides: a leaf and an alias.

Example:

<@console brand="My app" theme="light-brown"> <@theme> <@token name="--jc-pill-red-bg" value="#fdeceb"/> <@token name="--jc-tab-bar-bg" alias="var(--jc-card-bg)"/> </@theme> ... </@console>

GET /console/dev/themes?theme=gray

See Also: