GameServer.Theme behaviour (game_server_core v1.0.958)

Copy Markdown

Behaviour for pluggable site theming providers.

Implementations should provide a map-like theme object that the UI and templates can render from. We ship a small JSON-backed default implementation that reads a JSON file (see GameServer.Theme.JSONConfig).

Recommended keys in the theme map:

  • "title" (string)
  • "tagline" (string)
  • "description" (string)
  • "theme_color" (string or map with light/dark keys)
  • "navigation" (map of nav link arrays)
  • "useful_links" (list)
  • "features" (list)
  • "metadata" (map)

Summary

Callbacks

get_setting(key)

@callback get_setting(key :: atom() | String.t()) :: any()

get_theme()

@callback get_theme() :: map()

reload()

@callback reload() :: :ok | {:error, term()}