Something went wrong. Try again.
an rss/atom feed reader web application
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970defmodule FeedReaderWeb.Layouts do @moduledoc """ This module holds layouts and related functionality used by your application. """ use FeedReaderWeb, :html
# Embed all files in layouts/* within this module. # The default root.html.heex file contains the HTML # skeleton of your application, namely HTML headers # and other static content. embed_templates "layouts/*"
@doc """ 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>
""" attr :flash, :map, required: true, doc: "the map of flash messages"
attr :current_scope, :map, default: nil, doc: "the current [scope](https://hexdocs.pm/phoenix/scopes.html)"
slot :inner_block, required: true
def app(assigns) do ~H""" <header class="navbar px-4 sm:px-6 lg:px-8"> <div class="flex-1"> <a href="/" class="flex-1 flex w-fit items-center gap-2"> <img src={~p"/images/logo.svg"} width="36" /> <span class="text-sm font-semibold">v{Application.spec(:phoenix, :vsn)}</span> </a> </div> <div class="flex-none"> <ul class="flex flex-column px-1 space-x-4 items-center"> <li> <a href="https://phoenixframework.org/" class="btn btn-ghost">Website</a> </li> <li> <a href="https://github.com/phoenixframework/phoenix" class="btn btn-ghost">GitHub</a> </li> <li> <a href="https://hexdocs.pm/phoenix/overview.html" class="btn btn-primary"> Get Started <span aria-hidden="true">→</span> </a> </li> </ul> </div> </header>
<main class="px-4 py-20 sm:px-6 lg:px-8"> <div class="mx-auto max-w-2xl space-y-4"> {render_slot(@inner_block)} </div> </main> """ endend