Potion/lib/potion_web/controllers/page_controller.ex
Hayden Hargreaves dac043d78f (FEAT): Simple navigation bar and router config.
It's likely not perfect, but it's there.
2025-05-26 22:08:07 -07:00

39 lines
791 B
Elixir

defmodule PotionWeb.PageController do
use PotionWeb, :controller
def home(conn, _params) do
conn
|> assign(:current_page, :home)
|> put_layout(html: :dashboard)
|> render(:home)
end
def favorites(conn, _params) do
conn
|> assign(:current_page, :favorites)
|> put_layout(html: :dashboard)
|> render(:favorites)
end
def create(conn, _params) do
conn
|> assign(:current_page, :create)
|> put_layout(html: :dashboard)
|> render(:create)
end
def list(conn, _params) do
conn
|> assign(:current_page, :list)
|> put_layout(html: :dashboard)
|> render(:list)
end
def profile(conn, _params) do
conn
|> assign(:current_page, :profile)
|> put_layout(html: :dashboard)
|> render(:profile)
end
end