2024-05-21 16:52:37 +00:00
|
|
|
defmodule JOLWeb.PageController do
|
|
|
|
use JOLWeb, :controller
|
2024-05-21 16:43:36 +00:00
|
|
|
|
2024-07-30 15:46:47 +00:00
|
|
|
@spec home(Plug.Conn.t(), any()) :: Plug.Conn.t()
|
2024-05-21 16:43:36 +00:00
|
|
|
def home(conn, _params) do
|
2024-06-28 16:54:48 +00:00
|
|
|
conn
|
|
|
|
|> assign(:page_title, "Home")
|
|
|
|
|> render(:home)
|
2024-05-21 16:43:36 +00:00
|
|
|
end
|
2024-07-30 15:46:47 +00:00
|
|
|
|
|
|
|
@spec tags(Plug.Conn.t(), any()) :: Plug.Conn.t()
|
|
|
|
def tags(conn, _params) do
|
|
|
|
conn
|
|
|
|
|> assign(:tags, JOL.Blog.unique_tag_list())
|
|
|
|
|> assign(:page_title, "Post Tags")
|
|
|
|
|> render(:tags)
|
|
|
|
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
|
2024-05-21 16:43:36 +00:00
|
|
|
end
|