Packages

WebSocket-first Elixir framework with auto-generated HTTP MCP APIs

Current section

Files

Jump to
dialup priv templates dialup.new layout.ex.eex
Raw

priv/templates/dialup.new/layout.ex.eex

defmodule Dialup.App.Layout do
@moduledoc """
Root layout shared across all pages.
Session data set here persists across navigation.
This layout renders inside the <main id="dialup-root"> element
defined by the shell (root.html.heex). Do not include <html>,
<head>, or <body> tags here.
Styles live in layout.css (colocated CSS — auto-scoped at compile time).
"""
use Dialup.Layout
@impl true
def mount(session) do
{:ok, session}
end
@impl true
def render(assigns) do
~H"""
<nav class="site-nav">
<div class="nav-inner">
<span class="nav-logo" ws-href="/"><%= mod %></span>
<span id="ws-status" class="ws-lamp" title="WebSocket status"></span>
</div>
</nav>
<main class="page-content">
<%= "<%=" %> raw(@inner_content) %>
</main>
<footer class="site-footer">
<p>Built with <a href="https://github.com/SouichiroTsujimoto/Dialup">Dialup</a> · 1 tab = 1 process</p>
</footer>
"""
end
end