# Layout Customization openvpn-auth-oauth2 supports custom templates for the login page. The template must a valid Go Template file. After rendering, valid HTML must be returned. The default template can be found here: [index.gohtml](https://github.com/jkroepke/openvpn-auth-oauth2/blob/main/internal/ui/index.gohtml) Available variables: - `{{.title}}`: `Access denied` or `Access granted` - `{{.message}}`: Potential error message or success message - `{{.errorID}}`: ErrorID of an error, if present - `{{.clientConfigProfiles}}`: List of available profiles, used to render the profile selection screen. - `{{.token}}`: An encrypted token to identify the user session, used for profile selection. The [Go HTML template engine](https://pkg.go.dev/html/template) is used to render the HTML file. Template values are contextually escaped before they are written to the rendered HTML. ## Client Profile Selector If the [Client Profile Selector](Client%20specific%20configuration.md#client-profile-selector) is enabled and multiple profiles are available for the user, a profile selection screen is shown. The custom template must handle this case by itself. Minimal example to render the profile selector: ```gotemplate {{- if .clientConfigProfiles }}
{{- end }} ``` The default style uses CSS classes to style the profile selector: - `profile-buttons`: Container for the profile buttons - `profile-form`: Form containing the profile buttons - `profile-button`: Individual profile button ## Overriding the default assets To override the default assets, you can configure `http.assets-path` with the path to the directory containing the assets. The default assets: - `style.css`: CSS file to enrich the default layout. By default, it is empty. - `mvp.css`: [MVP](https://github.com/andybrewer/mvp) CSS framework - `favicon.svg`: Favicon of the login page - `i18n.js`: Localization script - `i18n/