MishkaCmsCore.Accounts.SignInProvider.Widget (Mishka CMS Core v0.0.1)

Copy Markdown View Source

The buttons of the services a site signs in with, for the sign-in and registration pages: one link per provider the site offers (MishkaCmsCore.Accounts.SignInProvider.available/1), to its provider's request route, which sends the visitor to the provider. A site that offers none draws its empty slot instead, and no divider. Every runtime template can call it (MishkaCmsCore.Runtime.LiveViewHelpers.imports/1):

<.sign_in_providers site={assigns[:current_site]}>
  <:divider><div>or with email</div></:divider>
</.sign_in_providers>

A master signs in on the master site's address with the master site's providers, so site is the site the page is on, never the tenant.

Summary

Functions

Every class the buttons draw with, each provider's colour included, for whatever builds a site's stylesheet (MishkaCmsCore.Runtime.Compilers.TailwindCompiler).

Functions

classes()

@spec classes() :: String.t()

Every class the buttons draw with, each provider's colour included, for whatever builds a site's stylesheet (MishkaCmsCore.Runtime.Compilers.TailwindCompiler).

sign_in_providers(assigns)

Attributes

  • site (:map) - The site the page is on (@current_site). Defaults to nil.
  • id (:string) - Defaults to "auth-providers".
  • class (:any) - Defaults to nil.
  • continue_with (:string) - The button's accessible name with %{provider} in it, in the page's language. Defaults to nil.

Slots

  • divider - Drawn after the buttons, only when there are any.
  • empty - Drawn in their place when the site offers none.