2021-02-24 07:49:39 -05:00
|
|
|
defmodule Bones73kWeb.LayoutView do
|
|
|
|
use Bones73kWeb, :view
|
2021-02-25 18:21:43 -05:00
|
|
|
|
|
|
|
def nav_link_opts(conn, opts) do
|
|
|
|
case Keyword.get(opts, :to) == Phoenix.Controller.current_path(conn) do
|
|
|
|
false -> opts
|
|
|
|
true -> Keyword.update(opts, :class, "active", fn c -> "#{c} active" end)
|
|
|
|
end
|
|
|
|
end
|
2021-02-26 12:07:33 -05:00
|
|
|
|
|
|
|
def alert_kinds do
|
|
|
|
[
|
2021-02-26 12:10:00 -05:00
|
|
|
success: "success",
|
|
|
|
info: "info",
|
|
|
|
error: "danger",
|
|
|
|
warning: "warning",
|
|
|
|
primary: "primary",
|
|
|
|
secondary: "secondary"
|
2021-02-26 12:07:33 -05:00
|
|
|
]
|
|
|
|
end
|
2021-02-24 07:49:39 -05:00
|
|
|
end
|