Search documentation of nucleus

# NucleusWeb.Layouts (nucleus v0.1.1)

Copy Markdown

This module holds layouts and related functionality used by your application.

## Summary

### Functions

app(assigns)

Renders your app layout.

flash_group(assigns)

Shows the flash group with standard titles and content.

root(assigns)
theme_toggle(assigns)

Provides dark vs light theme toggle based on themes defined in app.css.

## Functions

# app(assigns)

Renders your app layout.

This function is typically invoked from every template, and it often contains your application menu, sidebar, or similar.

## 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)

# 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"`.

# root(assigns)

# theme_toggle(assigns)

Provides dark vs light theme toggle based on themes defined in app.css.

See <head> in root.html.heex which applies the theme before page load.