@@ -72,6 +45,11 @@ defmodule SimpleshopThemeWeb.Layouts do
"""
end
+ @doc false
+ def admin_nav_active?(current_path, link_path) do
+ if String.starts_with?(current_path, link_path), do: "active", else: nil
+ end
+
@doc """
Shows the flash group with standard titles and content.
diff --git a/lib/simpleshop_theme_web/components/layouts/admin.html.heex b/lib/simpleshop_theme_web/components/layouts/admin.html.heex
new file mode 100644
index 0000000..f59a5eb
--- /dev/null
+++ b/lib/simpleshop_theme_web/components/layouts/admin.html.heex
@@ -0,0 +1,102 @@
+