Tableau.Layout behaviour (tableau v0.24.0)

View Source

A tableau layout.

Layouts will render @inner_content using the Tableau.Document.Helper.render/1 macro.

defmodule MySite.SidebarLayout do
  use Tableau.Page,
    layout: MySite.RootLayout

  def template(assigns) do
    """
    <nav>
      <a href="/home">
      <a href="/about">
    </nav>

    <p>
      <%= render @inner_content %>
    </p>
    """
  end
end

Summary

Callbacks

The layout template.

Types

assigns()

@type assigns() :: map()

template()

@type template() :: any()

Callbacks

template(assigns)

@callback template(assigns()) :: template()

The layout template.