SaltDnsWeb.Layouts (Salt v1.0.0)

The layouts of the web interface.

  • app/1 - the public and account pages: the lockup in the top bar and one column on the canvas.
  • console/1 - the signed-in console: the sidebar with the lockup and the navigation of the page's context, the top bar, then the page.
  • auth/1 - the pages before sign-in: the lockup on paper and one narrow card.

The colour scheme follows the browser. The salt band at the top of every page is in the root layout, so no page can forget it.

Summary

Functions

Renders the app layout: the top bar with the lockup, then the page. Used by the front page and the account settings.

The layout of the pages before sign-in: the lockup on paper and one narrow card.

The signed-in console: a sidebar with the lockup and the navigation, a top bar, then the page. Rendering is layout only; what to show comes from the assigns (see SaltDnsWeb.Console.Hooks).

Shows the flash group with standard titles and content.

The language switch: EN | PAP. The choice is kept for the visit and, when someone is signed in, on their user (SaltDnsWeb.LocaleController).

The mark: the salt and sun picture without the name. The name "Salt" is never part of the image: it is text next to it, in the wordmark style (s-wordmark), so the image is decorative. small uses the simplified square mark, which works down to 16 px.

Functions

app(assigns)

Renders the app layout: the top bar with the lockup, then the page. Used by the front page and the account settings.

Examples

<Layouts.app flash={@flash}>
  <h1>Content</h1>
</Layouts.app>

Attributes

  • flash (:map) (required) - the map of flash messages.
  • current_scope (:map) - the current scope. Defaults to nil.

Slots

  • inner_block (required)

auth(assigns)

The layout of the pages before sign-in: the lockup on paper and one narrow card.

Attributes

  • flash (:map) (required)

Slots

  • inner_block (required)

console(assigns)

The signed-in console: a sidebar with the lockup and the navigation, a top bar, then the page. Rendering is layout only; what to show comes from the assigns (see SaltDnsWeb.Console.Hooks).

Attributes

  • flash (:map) (required)
  • current_scope (:map) (required)
  • organisation (:any) - the current organisation, if any. Defaults to nil.
  • organisations (:list) - Defaults to [].
  • admin? (:boolean) - owner or admin: shows credentials and members. Defaults to false.
  • active (:atom) - Defaults to nil.Must be one of nil, :zones, :credentials, :provisioning, :members, :certificates, :certificate_providers, :registrar, :proxy, :nameservers, or :settings.

Slots

  • inner_block (required)

flash_group(assigns)

Shows the flash group with standard titles and content.

Examples

<.flash_group flash={@flash} />

Attributes

  • flash (:map) (required) - the map of flash messages.
  • id (:string) - the optional id of flash container. Defaults to "flash-group".

language_switch(assigns)

The language switch: EN | PAP. The choice is kept for the visit and, when someone is signed in, on their user (SaltDnsWeb.LocaleController).

Attributes

  • current (:string) (required)
  • class (:any) - Defaults to nil.

logo(assigns)

The mark: the salt and sun picture without the name. The name "Salt" is never part of the image: it is text next to it, in the wordmark style (s-wordmark), so the image is decorative. small uses the simplified square mark, which works down to 16 px.

One drawing for both colour schemes; on dark backgrounds its navy outlines get a light halo from the stylesheet (.s-mark).

Attributes

  • class (:any) - Defaults to "h-9".
  • small (:boolean) - Defaults to false.

root(assigns)