JOL/lib/jol_web/controllers/page_controller.ex

22 lines
460 B
Elixir
Raw Normal View History

defmodule JOLWeb.PageController do
use JOLWeb, :controller
@spec home(Plug.Conn.t(), any()) :: Plug.Conn.t()
def home(conn, _params) do
2024-06-28 16:54:48 +00:00
conn
2024-08-25 16:56:26 +00:00
|> render(:home, page_title: "Welcome!", posts: JOL.Blog.recent_posts())
end
2024-08-17 14:06:44 +00:00
def about(conn, _params) do
conn
|> assign(:page_title, "About Jessica")
|> render(:about)
end
def now(conn, _params) do
conn
|> assign(:page_title, "Current Status")
|> render(:now)
end
end