+
+
+
+ <.live_title default="SimpleshopTheme">
+ {assigns[:page_title]}
+
+
+
+
+
+ {@inner_content}
+
+
diff --git a/lib/simpleshop_theme_web/controllers/admin_controller.ex b/lib/simpleshop_theme_web/controllers/admin_controller.ex
new file mode 100644
index 0000000..7b56584
--- /dev/null
+++ b/lib/simpleshop_theme_web/controllers/admin_controller.ex
@@ -0,0 +1,7 @@
+defmodule SimpleshopThemeWeb.AdminController do
+ use SimpleshopThemeWeb, :controller
+
+ def index(conn, _params) do
+ redirect(conn, to: ~p"/admin/theme")
+ end
+end
diff --git a/lib/simpleshop_theme_web/router.ex b/lib/simpleshop_theme_web/router.ex
index 1cf72f6..1d3dda7 100644
--- a/lib/simpleshop_theme_web/router.ex
+++ b/lib/simpleshop_theme_web/router.ex
@@ -18,6 +18,7 @@ defmodule SimpleshopThemeWeb.Router do
end
pipeline :shop do
+ plug :put_root_layout, html: {SimpleshopThemeWeb.Layouts, :shop_root}
plug SimpleshopThemeWeb.Plugs.LoadTheme
end
@@ -72,6 +73,13 @@ defmodule SimpleshopThemeWeb.Router do
## Authentication routes
+ # /admin redirects to theme editor (requires auth, will redirect to login if needed)
+ scope "/admin", SimpleshopThemeWeb do
+ pipe_through [:browser, :require_authenticated_user]
+
+ get "/", AdminController, :index
+ end
+
scope "/", SimpleshopThemeWeb do
pipe_through [:browser, :require_authenticated_user]
diff --git a/priv/static/fonts/cormorant-garamond-v21-latin-500.woff2 b/priv/static/fonts/cormorant-garamond-v21-latin-500.woff2
new file mode 100644
index 0000000..efade81
Binary files /dev/null and b/priv/static/fonts/cormorant-garamond-v21-latin-500.woff2 differ
diff --git a/priv/static/fonts/cormorant-garamond-v21-latin-600.woff2 b/priv/static/fonts/cormorant-garamond-v21-latin-600.woff2
new file mode 100644
index 0000000..937e014
Binary files /dev/null and b/priv/static/fonts/cormorant-garamond-v21-latin-600.woff2 differ
diff --git a/priv/static/fonts/cormorant-garamond-v21-latin-regular.woff2 b/priv/static/fonts/cormorant-garamond-v21-latin-regular.woff2
new file mode 100644
index 0000000..096df0a
Binary files /dev/null and b/priv/static/fonts/cormorant-garamond-v21-latin-regular.woff2 differ
diff --git a/priv/static/fonts/dm-sans-v17-latin-500.woff2 b/priv/static/fonts/dm-sans-v17-latin-500.woff2
new file mode 100644
index 0000000..48e1612
Binary files /dev/null and b/priv/static/fonts/dm-sans-v17-latin-500.woff2 differ
diff --git a/priv/static/fonts/dm-sans-v17-latin-600.woff2 b/priv/static/fonts/dm-sans-v17-latin-600.woff2
new file mode 100644
index 0000000..5e39dbc
Binary files /dev/null and b/priv/static/fonts/dm-sans-v17-latin-600.woff2 differ
diff --git a/priv/static/fonts/dm-sans-v17-latin-700.woff2 b/priv/static/fonts/dm-sans-v17-latin-700.woff2
new file mode 100644
index 0000000..26edc56
Binary files /dev/null and b/priv/static/fonts/dm-sans-v17-latin-700.woff2 differ
diff --git a/priv/static/fonts/dm-sans-v17-latin-regular.woff2 b/priv/static/fonts/dm-sans-v17-latin-regular.woff2
new file mode 100644
index 0000000..0b8bc55
Binary files /dev/null and b/priv/static/fonts/dm-sans-v17-latin-regular.woff2 differ
diff --git a/priv/static/fonts/fraunces-v38-latin-500.woff2 b/priv/static/fonts/fraunces-v38-latin-500.woff2
new file mode 100644
index 0000000..969f099
Binary files /dev/null and b/priv/static/fonts/fraunces-v38-latin-500.woff2 differ
diff --git a/priv/static/fonts/fraunces-v38-latin-600.woff2 b/priv/static/fonts/fraunces-v38-latin-600.woff2
new file mode 100644
index 0000000..58cee1f
Binary files /dev/null and b/priv/static/fonts/fraunces-v38-latin-600.woff2 differ
diff --git a/priv/static/fonts/fraunces-v38-latin-700.woff2 b/priv/static/fonts/fraunces-v38-latin-700.woff2
new file mode 100644
index 0000000..71bbace
Binary files /dev/null and b/priv/static/fonts/fraunces-v38-latin-700.woff2 differ
diff --git a/priv/static/fonts/fraunces-v38-latin-regular.woff2 b/priv/static/fonts/fraunces-v38-latin-regular.woff2
new file mode 100644
index 0000000..83cbd8f
Binary files /dev/null and b/priv/static/fonts/fraunces-v38-latin-regular.woff2 differ
diff --git a/priv/static/fonts/inter-v20-latin-300.woff2 b/priv/static/fonts/inter-v20-latin-300.woff2
new file mode 100644
index 0000000..ece952c
Binary files /dev/null and b/priv/static/fonts/inter-v20-latin-300.woff2 differ
diff --git a/priv/static/fonts/inter-v20-latin-500.woff2 b/priv/static/fonts/inter-v20-latin-500.woff2
new file mode 100644
index 0000000..54f0a59
Binary files /dev/null and b/priv/static/fonts/inter-v20-latin-500.woff2 differ
diff --git a/priv/static/fonts/inter-v20-latin-600.woff2 b/priv/static/fonts/inter-v20-latin-600.woff2
new file mode 100644
index 0000000..d189794
Binary files /dev/null and b/priv/static/fonts/inter-v20-latin-600.woff2 differ
diff --git a/priv/static/fonts/inter-v20-latin-700.woff2 b/priv/static/fonts/inter-v20-latin-700.woff2
new file mode 100644
index 0000000..a68fb10
Binary files /dev/null and b/priv/static/fonts/inter-v20-latin-700.woff2 differ
diff --git a/priv/static/fonts/inter-v20-latin-regular.woff2 b/priv/static/fonts/inter-v20-latin-regular.woff2
new file mode 100644
index 0000000..f15b025
Binary files /dev/null and b/priv/static/fonts/inter-v20-latin-regular.woff2 differ
diff --git a/priv/static/fonts/manrope-v20-latin-500.woff2 b/priv/static/fonts/manrope-v20-latin-500.woff2
new file mode 100644
index 0000000..70447ee
Binary files /dev/null and b/priv/static/fonts/manrope-v20-latin-500.woff2 differ
diff --git a/priv/static/fonts/manrope-v20-latin-600.woff2 b/priv/static/fonts/manrope-v20-latin-600.woff2
new file mode 100644
index 0000000..7cc09a3
Binary files /dev/null and b/priv/static/fonts/manrope-v20-latin-600.woff2 differ
diff --git a/priv/static/fonts/manrope-v20-latin-700.woff2 b/priv/static/fonts/manrope-v20-latin-700.woff2
new file mode 100644
index 0000000..84f7af5
Binary files /dev/null and b/priv/static/fonts/manrope-v20-latin-700.woff2 differ
diff --git a/priv/static/fonts/manrope-v20-latin-regular.woff2 b/priv/static/fonts/manrope-v20-latin-regular.woff2
new file mode 100644
index 0000000..7eaaa95
Binary files /dev/null and b/priv/static/fonts/manrope-v20-latin-regular.woff2 differ
diff --git a/priv/static/fonts/playfair-display-v40-latin-500.woff2 b/priv/static/fonts/playfair-display-v40-latin-500.woff2
new file mode 100644
index 0000000..64d6e11
Binary files /dev/null and b/priv/static/fonts/playfair-display-v40-latin-500.woff2 differ
diff --git a/priv/static/fonts/playfair-display-v40-latin-700.woff2 b/priv/static/fonts/playfair-display-v40-latin-700.woff2
new file mode 100644
index 0000000..39eefe0
Binary files /dev/null and b/priv/static/fonts/playfair-display-v40-latin-700.woff2 differ
diff --git a/priv/static/fonts/playfair-display-v40-latin-regular.woff2 b/priv/static/fonts/playfair-display-v40-latin-regular.woff2
new file mode 100644
index 0000000..141ea84
Binary files /dev/null and b/priv/static/fonts/playfair-display-v40-latin-regular.woff2 differ
diff --git a/priv/static/fonts/raleway-v37-latin-300.woff2 b/priv/static/fonts/raleway-v37-latin-300.woff2
new file mode 100644
index 0000000..8498009
Binary files /dev/null and b/priv/static/fonts/raleway-v37-latin-300.woff2 differ
diff --git a/priv/static/fonts/raleway-v37-latin-500.woff2 b/priv/static/fonts/raleway-v37-latin-500.woff2
new file mode 100644
index 0000000..ceda164
Binary files /dev/null and b/priv/static/fonts/raleway-v37-latin-500.woff2 differ
diff --git a/priv/static/fonts/raleway-v37-latin-regular.woff2 b/priv/static/fonts/raleway-v37-latin-regular.woff2
new file mode 100644
index 0000000..b8dd014
Binary files /dev/null and b/priv/static/fonts/raleway-v37-latin-regular.woff2 differ
diff --git a/priv/static/fonts/source-serif-4-v14-latin-600.woff2 b/priv/static/fonts/source-serif-4-v14-latin-600.woff2
new file mode 100644
index 0000000..fcbd11d
Binary files /dev/null and b/priv/static/fonts/source-serif-4-v14-latin-600.woff2 differ
diff --git a/priv/static/fonts/source-serif-4-v14-latin-regular.woff2 b/priv/static/fonts/source-serif-4-v14-latin-regular.woff2
new file mode 100644
index 0000000..e8c6f71
Binary files /dev/null and b/priv/static/fonts/source-serif-4-v14-latin-regular.woff2 differ
diff --git a/priv/static/fonts/space-grotesk-v22-latin-500.woff2 b/priv/static/fonts/space-grotesk-v22-latin-500.woff2
new file mode 100644
index 0000000..0db251f
Binary files /dev/null and b/priv/static/fonts/space-grotesk-v22-latin-500.woff2 differ
diff --git a/priv/static/fonts/space-grotesk-v22-latin-600.woff2 b/priv/static/fonts/space-grotesk-v22-latin-600.woff2
new file mode 100644
index 0000000..a1db41a
Binary files /dev/null and b/priv/static/fonts/space-grotesk-v22-latin-600.woff2 differ
diff --git a/priv/static/fonts/space-grotesk-v22-latin-regular.woff2 b/priv/static/fonts/space-grotesk-v22-latin-regular.woff2
new file mode 100644
index 0000000..0e63471
Binary files /dev/null and b/priv/static/fonts/space-grotesk-v22-latin-regular.woff2 differ
diff --git a/priv/static/fonts/work-sans-v24-latin-300.woff2 b/priv/static/fonts/work-sans-v24-latin-300.woff2
new file mode 100644
index 0000000..05cbc2a
Binary files /dev/null and b/priv/static/fonts/work-sans-v24-latin-300.woff2 differ
diff --git a/priv/static/fonts/work-sans-v24-latin-500.woff2 b/priv/static/fonts/work-sans-v24-latin-500.woff2
new file mode 100644
index 0000000..2bad175
Binary files /dev/null and b/priv/static/fonts/work-sans-v24-latin-500.woff2 differ
diff --git a/priv/static/fonts/work-sans-v24-latin-600.woff2 b/priv/static/fonts/work-sans-v24-latin-600.woff2
new file mode 100644
index 0000000..1ec3048
Binary files /dev/null and b/priv/static/fonts/work-sans-v24-latin-600.woff2 differ
diff --git a/priv/static/fonts/work-sans-v24-latin-regular.woff2 b/priv/static/fonts/work-sans-v24-latin-regular.woff2
new file mode 100644
index 0000000..02a6a42
Binary files /dev/null and b/priv/static/fonts/work-sans-v24-latin-regular.woff2 differ
diff --git a/test/simpleshop_theme_web/controllers/user_session_controller_test.exs b/test/simpleshop_theme_web/controllers/user_session_controller_test.exs
index f22a249..f971ae0 100644
--- a/test/simpleshop_theme_web/controllers/user_session_controller_test.exs
+++ b/test/simpleshop_theme_web/controllers/user_session_controller_test.exs
@@ -20,8 +20,8 @@ defmodule SimpleshopThemeWeb.UserSessionControllerTest do
assert get_session(conn, :user_token)
assert redirected_to(conn) == ~p"/"
- # Now do a logged in request and assert on the menu
- conn = get(conn, ~p"/")
+ # Now do a logged in request to an admin page and assert on the menu
+ conn = get(conn, ~p"/users/settings")
response = html_response(conn, 200)
assert response =~ user.email
assert response =~ ~p"/users/settings"
@@ -84,8 +84,8 @@ defmodule SimpleshopThemeWeb.UserSessionControllerTest do
assert get_session(conn, :user_token)
assert redirected_to(conn) == ~p"/"
- # Now do a logged in request and assert on the menu
- conn = get(conn, ~p"/")
+ # Now do a logged in request to an admin page and assert on the menu
+ conn = get(conn, ~p"/users/settings")
response = html_response(conn, 200)
assert response =~ user.email
assert response =~ ~p"/users/settings"
@@ -108,8 +108,8 @@ defmodule SimpleshopThemeWeb.UserSessionControllerTest do
assert Accounts.get_user!(user.id).confirmed_at
- # Now do a logged in request and assert on the menu
- conn = get(conn, ~p"/")
+ # Now do a logged in request to an admin page and assert on the menu
+ conn = get(conn, ~p"/users/settings")
response = html_response(conn, 200)
assert response =~ user.email
assert response =~ ~p"/users/settings"