Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/web/test_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a href="https://danielstephenson.dev">danielstephenson.dev</a>'
assert "More by Daniel Stephenson &rarr; " + credit in body
# After #app has closed, so the line sits below the game, not inside it.
assert body.index(credit) > body.index('<div id="app"></div>')

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()
Expand Down
4 changes: 4 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
/* 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; }
</style>
</head>
<body>
<h2>FishE <span class="tagline">— fish a seaside village and build a fortune of $10,000</span></h2>
<div id="status" class="status">Starting&hellip;</div>
<div id="app"></div>
<p class="controls">Tip: click an option or press its number key (1-9). Enter or Space continues. Your saved games live in this browser.</p>
<footer class="credit">More by Daniel Stephenson &rarr; <a href="https://danielstephenson.dev">danielstephenson.dev</a></footer>
<script src="/tak/client.js"></script>
<script src="/tak/boot.js"></script>
<script>
Expand Down
Loading