Skip to content

Commit

Permalink
updates from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lyleschemmerling committed May 30, 2024
1 parent 7e48363 commit e472534
Show file tree
Hide file tree
Showing 17 changed files with 567 additions and 255 deletions.
194 changes: 0 additions & 194 deletions astro/src/content/docs/apis/_themes/_theme-simple-variables.mdx

This file was deleted.

20 changes: 20 additions & 0 deletions astro/src/content/docs/apis/themes/_simple-theme-request-body.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<APIField name="theme.data" type="Object" optional>
An object that can hold any information about the Theme that should be persisted.
</APIField>
<APIField name="theme.defaultMessages" type="String" optional>
A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. Required if the <InlineField>theme.type</InlineField> is `advanced` and not copying an existing Theme.
</APIField>
<APIField name="theme.localizedMessages" type="Map<Locale,String>" optional>
A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.
</APIField>
<APIField name="theme.name" type="String" required>
A unique name for the Theme.
</APIField>
<APIField name="theme.stylesheet" type="String" optional>
A CSS stylesheet used to style the templates.
</APIField>
<APIField name="theme.type" type="String" optional defaults="advanced" since="1.51.0">
The type of the Theme. This value determines what content is required for the Theme. There are two distinct values.
* `advanced` - This is the default FusionAuth theme type. This type allows for full customization of the html, css, and messaging via [Freemarker](https://freemarker.apache.org) templates. If a Theme is `advanced` then the <InlineField>theme.defaultMessages</InlineField> and <InlineField>theme.templates</InlineField> fields are required. The <InlineField>theme.defaultMessages</InlineField> should specify every message in the message bundle. See [Theme Localization](/docs/customize/look-and-feel/localization).
* `simple` - A simple theme only requires a set of variables that will applied to css across the theme. If a Theme is `simple` then the <InlineField>theme.variables</InlineField> field is required. If a theme is `simple` then the <InlineField>theme.defaultMessages</InlineField> need only specify any text that you would like to change from what is included in theme.
</APIField>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ import JSON from 'src/components/JSON.astro';
#### Request Body

<APIBlock>
<APIField name="sourceThemeId" type="UUID" required>
<APIField name="sourceThemeId" type="UUID" required renderif={!props.simple}>
The Id of an existing Theme from which a copy will be made.

The <InlineField>defaultMessages</InlineField>, <InlineField>localizedMessages</InlineField>, <InlineField>templates</InlineField>, and <InlineField>stylesheet</InlineField> from the source Theme will be copied to the new Theme.
</APIField>
<APIField name="sourceThemeId" type="UUID" required renderif={!!props.simple}>
The Id of an existing Theme from which a copy will be made.

The <InlineField>defaultMessages</InlineField>, <InlineField>localizedMessages</InlineField>, and <InlineField>variables</InlineField> from the source Theme will be copied to the new Theme.
</APIField>
<APIField name="theme.name" type="String" required>
A unique name for the Theme.
</APIField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import APIField from 'src/components/api/APIField.astro';
An object that can hold any information about the Theme that should be persisted.
</APIField>
<APIField name="theme.defaultMessages" type="String" required>
A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. Required if not copying an existing Theme.
A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. {!props.simple && <span>Required if not copying an existing Theme.</span>}
</APIField>
<APIField name="theme.localizedMessages" type="Map<Locale,String>" optional>
A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.
</APIField>
<APIField name="theme.name" type="String" required>
A unique name for the Theme.
</APIField>
<APIField name="theme.stylesheet" type="String" optional>
<APIField name="theme.stylesheet" type="String" optional renderif={!props.simple}>
A CSS stylesheet used to style the templates.
</APIField>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import JSON from 'src/components/JSON.astro';

<JSON title="Example Advanced Theme Request JSON" src="themes/request.json" />

<JSON title="Example Simple Theme Request JSON" src="themes/simple-request.json" />
<JSON title="Example Advanced Theme Request JSON" src="themes/request.json" />
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import InlineField from 'src/components/InlineField.astro';
An object that can hold any information about the Theme that should be persisted.
</APIField>
<APIField name="theme.defaultMessages" type="String" optional>
A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. Required if the <InlineField>theme.type</InlineField> is `advanced` and not copying an existing Theme.
A properties file formatted String containing at least all of the message keys defined in the FusionAuth shipped messages file. {!props.simple && <span>Required if not copying an existing Theme.</span>}
</APIField>
<APIField name="theme.localizedMessages" type="Map<Locale,String>" optional>
A Map of localized versions of the messages. The key is the Locale and the value is a properties file formatted String.
</APIField>
<APIField name="theme.name" type="String" required>
A unique name for the Theme.
</APIField>
<APIField name="theme.stylesheet" type="String" optional>
<APIField name="theme.stylesheet" type="String" optional renderif={!props.simple}>
A CSS stylesheet used to style the templates.
</APIField>
<APIField name="theme.type" type="String" optional defaults="advanced" since="1.51.0">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import JSON from 'src/components/JSON.astro';

<JSON title="Example Advanced Theme Response JSON" src="themes/response.json" />

<JSON title="Example Simple Theme Response JSON" src="themes/simple-response.json" />
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import InlineField from 'src/components/InlineField.astro';
<APIField name="theme.name" type="String">
A unique name for the Theme.
</APIField>
<APIField name="theme.stylesheet" type="String">
A CSS stylesheet used to style the templates. Only present if <InlineField>theme.type</InlineField> is `advanced`.
<APIField name="theme.stylesheet" type="String" renderif={!props.simple}>
A CSS stylesheet used to style the templates.
</APIField>
</APIBlock>

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import APIField from 'src/components/api/APIField.astro';
<APIField name="themes[x].name" type="String">
A unique name for the Theme.
</APIField>
<APIField name="themes[x].stylesheet" type="String" optional>
<APIField name="themes[x].stylesheet" type="String" optional renderif={!props.simple}>
A CSS stylesheet used to style the templates.
</APIField>
</APIBlock>
Expand Down
134 changes: 134 additions & 0 deletions astro/src/content/docs/apis/themes/_theme-simple-variables-request.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import APIField from 'src/components/api/APIField.astro';
import InlineField from 'src/components/InlineField.astro';

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.alertBackgroundColor"} type="String" required>
The background color of the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.alertFontColor"} type="String" required>
The color of the font in the alert message. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.backgroundImageUrl"} type="String" optional>
The url of the background image. Will replace the page background color. Must be a valid absolute URL.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.backgroundSize"} type="String" optional>
Specifies the [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) of the background image. Valid values are `repeat`, `contain`, and `cover`.

Required if <InlineField>theme.variables.backgroundImageUrl</InlineField> is provided.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.borderRadius"} type="String" required>
Specifies the [border-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) property which is applied to buttons, panels, and form fields in the theme. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.deleteButtonColor"} type="String" required>
The color of the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.deleteButtonFocusColor"} type="String" required>
The color of the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.deleteButtonTextColor"} type="String" required>
The color of the text in the delete button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.deleteButtonTextFocusColor"} type="String" required>
The color of the text in the delete button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.errorIconColor"} type="String" required>
The color of the icon in error alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.errorFontColor"} type="String" required>
The color of the font for error messages. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.fontColor"} type="String" required>
The color of the text in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.fontFamily"} type="String" required>
Specifies the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) for the theme.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.footerDisplay"} type="Boolean" optional>
Determines if the "powered by FusionAuth" footer is displayed in the theme. A valid license is required to set this value to `false`.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.iconBackgroundColor"} type="String" required>
The color of the form field icon background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.iconColor"} type="String" required>
The color of the icons in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.infoIconColor"} type="String" required>
The color of the icon in info alert messages in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.inputBackgroundColor"} type="String" required>
The color of the form field background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.inputIconColor"} type="String" required>
The color of the form field icon. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.inputTextColor"} type="String" required>
The color of the form field text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.linkTextColor"} type="String" required>
The color of the text in hyperlinks. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.linkTextFocusColor"} type="String" required>
The color of the text in hyperlinks that have been visited. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.logoImageSize"} type="String" optional>
The size of the logo image. Must be a valid numeric value with a `px`, `em`, or `rem` suffix.

Required if <InlineField>theme.variables.logoImageUrl</InlineField> is provided.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.logoImageUrl"} type="String" optional>
The url of the logo image. Must be a valid absolute URL. Can be `null`.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.monoFontColor"} type="String" required>
The color of the monospaced text. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.monoFontFamily"} type="String" required>
The font [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family).
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.pageBackgroundColor"} type="String" required>
The color of the page background. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.panelBackgroundColor"} type="String" required>
The color of the panels in the theme. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.primaryButtonColor"} type="String" required>
The color of the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.primaryButtonFocusColor"} type="String" required>
The color of primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.primaryButtonTextColor"} type="String" required>
The color of the text in the primary button. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>

<APIField name={(props.search ? "themes[x]." : "theme.") + "variables.primaryButtonTextFocusColor"} type="String" required>
The color of the text in the primary button when clicked. [Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color) must be a valid hex color code, RGB, or HSL value.
</APIField>
Loading

0 comments on commit e472534

Please sign in to comment.