diff --git a/tests/web/test_serve.py b/tests/web/test_serve.py index 280e0e1..025919f 100644 --- a/tests/web/test_serve.py +++ b/tests/web/test_serve.py @@ -53,6 +53,13 @@ def test_the_page_keeps_the_saves_database_name(): assert 'entry: "web/pyodide_main.py"' in html +def test_the_page_credits_the_author_outside_the_game_area(server): + body = get(server, "/").read().decode("utf-8") + credit = 'danielstephenson.dev' + assert "More by Daniel Stephenson → " + credit in body + # After #app has closed, so the line sits below the game, not inside it. + assert body.index(credit) > body.index('
') + def test_serves_the_kits_client_and_boot_script(server): assert b"window.TakClient" in get(server, "/tak/client.js").read() assert b"window.TakBoot" in get(server, "/tak/boot.js").read() diff --git a/web/index.html b/web/index.html index 648f2b9..ffa3523 100644 --- a/web/index.html +++ b/web/index.html @@ -13,6 +13,9 @@ /* Boot progress, shown until the first screen arrives. */ .status { color: #7fb0d0; margin: 1rem 0; } .status.error { color: #ff8a8a; } + /* A small credit line under the tip, outside #app so it never covers play. */ + .credit { font-size: .7rem; color: #6a8aa0; margin-top: .5rem; } + .credit a { color: #7fb0d0; } @@ -20,6 +23,7 @@Tip: click an option or press its number key (1-9). Enter or Space continues. Your saved games live in this browser.
+