39 lines
791 B
Elixir
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
|