mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-11-29 15:31:53 +00:00
feat(web): installable PWA manifest + icons for bbs.profullstack.com (#162)
Adds /manifest.webmanifest (standalone, black theme) and 192/512 PNG icons (plus maskable + SVG) to the site root, links them from the landing page head, and serves the manifest as application/manifest+json. Lets pwamart.com list AgentBBS. Co-authored-by: Anthony Ettinger <anthony@profullstack.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d2a5ce9605
commit
eb8e9ae9c5
4 changed files with 42 additions and 0 deletions
35
setup.sh
35
setup.sh
|
|
@ -200,6 +200,11 @@ cat > "$DATA_DIR/web/index.html" <<HTML
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>AgentBBS — a bulletin board system over SSH</title>
|
<title>AgentBBS — a bulletin board system over SSH</title>
|
||||||
<meta name="description" content="AgentBBS: a 1980s-style bulletin board system, reborn over SSH, for humans and AI agents. Arcade, IRC, Usenet, mail, git, a Linux pod and your own homepage.">
|
<meta name="description" content="AgentBBS: a 1980s-style bulletin board system, reborn over SSH, for humans and AI agents. Arcade, IRC, Usenet, mail, git, a Linux pod and your own homepage.">
|
||||||
|
<link rel="manifest" href="/manifest.webmanifest">
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/icon.svg">
|
||||||
|
<link rel="icon" type="image/png" sizes="192x192" href="/icon-192.png">
|
||||||
|
<link rel="apple-touch-icon" href="/icon-192.png">
|
||||||
|
<meta name="theme-color" content="#000000">
|
||||||
<script data-site="7a26cda8-3a26-409c-94e1-de4961bcfdac" src="https://crawlproof.com/stats.js" async></script>
|
<script data-site="7a26cda8-3a26-409c-94e1-de4961bcfdac" src="https://crawlproof.com/stats.js" async></script>
|
||||||
<style>
|
<style>
|
||||||
:root { --fg:#33ff66; --dim:#1f9e44; --link:#60a5fa; --bg:#000; }
|
:root { --fg:#33ff66; --dim:#1f9e44; --link:#60a5fa; --bg:#000; }
|
||||||
|
|
@ -346,6 +351,35 @@ if [ "$FETCH_ASSETS" = "1" ] && [ -x "$SRC_DIR/scripts/fetch-assets.sh" ]; then
|
||||||
( cd "$SRC_DIR" && ./scripts/fetch-assets.sh $fetch_flags ) || warn "asset fetch failed; arcade may be limited"
|
( cd "$SRC_DIR" && ./scripts/fetch-assets.sh $fetch_flags ) || warn "asset fetch failed; arcade may be limited"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# PWA: web app manifest + icons for the site root (installable; listed on
|
||||||
|
# pwamart.com). Icons are committed under web/ and copied from the fresh source;
|
||||||
|
# the manifest is templated here so name/start_url follow ${DOMAIN}.
|
||||||
|
for f in icon.svg icon-192.png icon-512.png; do
|
||||||
|
if [ -f "$SRC_DIR/web/$f" ]; then
|
||||||
|
install -o "$SVC_USER" -g "$SVC_USER" -m 0644 "$SRC_DIR/web/$f" "$DATA_DIR/web/$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cat > "$DATA_DIR/web/manifest.webmanifest" <<JSON
|
||||||
|
{
|
||||||
|
"name": "AgentBBS",
|
||||||
|
"short_name": "AgentBBS",
|
||||||
|
"description": "A bulletin board system over SSH, for humans and AI agents.",
|
||||||
|
"id": "/",
|
||||||
|
"start_url": "/",
|
||||||
|
"scope": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#000000",
|
||||||
|
"icons": [
|
||||||
|
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
|
||||||
|
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
|
||||||
|
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" },
|
||||||
|
{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
JSON
|
||||||
|
chown "$SVC_USER:$SVC_USER" "$DATA_DIR/web/manifest.webmanifest"
|
||||||
|
|
||||||
# Add swap on tiny droplets before the build (and for runtime headroom).
|
# Add swap on tiny droplets before the build (and for runtime headroom).
|
||||||
ensure_swap
|
ensure_swap
|
||||||
|
|
||||||
|
|
@ -881,6 +915,7 @@ ${DOMAIN} {
|
||||||
# site root
|
# site root
|
||||||
handle {
|
handle {
|
||||||
root * ${DATA_DIR}/web
|
root * ${DATA_DIR}/web
|
||||||
|
header /manifest.webmanifest Content-Type "application/manifest+json"
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
web/icon-192.png
Normal file
BIN
web/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
web/icon-512.png
Normal file
BIN
web/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
7
web/icon.svg
Normal file
7
web/icon.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||||
|
<rect width="512" height="512" fill="#000"/>
|
||||||
|
<g font-family="DejaVu Sans Mono, Menlo, Consolas, monospace" font-weight="700" fill="#33ff66">
|
||||||
|
<text x="256" y="250" font-size="150" text-anchor="middle">>_</text>
|
||||||
|
<text x="256" y="380" font-size="120" text-anchor="middle" letter-spacing="6">BBS</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 391 B |
Loading…
Add table
Add a link
Reference in a new issue