# SPDX-FileCopyrightText: 2025 James Harton # # SPDX-License-Identifier: Apache-2.0 defmodule BB.LiveView.Layouts do @moduledoc """ Layout components for the BB Dashboard. Provides root and app layouts with bundled CSS and JavaScript. """ use Phoenix.Component alias BB.LiveView.Plugs.Static @doc """ Root layout that wraps all dashboard pages. Includes the bundled CSS and JavaScript assets. """ def root(assigns) do ~H""" {assigns[:page_title] || "BB Dashboard"} {@inner_content} """ end @doc """ App layout for dashboard content. This is the inner layout that wraps the LiveView content. """ def app(assigns) do ~H"""
<.flash_group flash={@flash} /> {@inner_content}
""" end defp flash_group(assigns) do ~H"""
<.flash :for={{kind, message} <- @flash} kind={kind} message={message} />
""" end defp flash(assigns) do ~H""" """ end end