perf: self-host fonts and add /admin route
Self-hosted fonts: - Download all 10 typefaces (35 font files, 728KB) from Google Fonts - Create @font-face declarations in assets/css/fonts.css - Remove Google Fonts external dependency from layouts - Privacy improvement (no Google tracking) - Performance improvement (no DNS lookup to fonts.googleapis.com) - GDPR compliant (no third-party requests) Admin access: - Add /admin route that redirects to /admin/theme (requires auth) - Remove Admin link from footer (too visible for visitors) - Shop owners can bookmark or type /admin directly Layout improvements: - Create shop_root.html.heex as minimal root for shop pages - Shop pages no longer show admin nav bar Other: - Update .gitignore to exclude digested static files - Add PageSpeed 100% task to ROADMAP.md - Fix test to check /users/settings instead of shop homepage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user