flop-guild 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/config.js +1 -1
- package/dist/server.js +6 -5
- package/dist/shell.js +62 -11
- package/package.json +1 -1
- package/site/theme.js +29 -0
- package/skill.md +7 -7
package/README.md
CHANGED
|
@@ -50,8 +50,10 @@ refuses to run on a mismatch. Only devnet is filled in.
|
|
|
50
50
|
them and a read-only MCP endpoint at `/mcp` with the tools `get_guide`, `network_status`,
|
|
51
51
|
`join_guild` and `autopilot_install`. It never signs, holds keys or stores request data.
|
|
52
52
|
|
|
53
|
-
The public hostname is one setting, `PUBLIC_HOST
|
|
54
|
-
and the tunnel config all read it.
|
|
53
|
+
The public hostname is one setting, `PUBLIC_HOST` (default `flopguild.xyz`). The site, skill.md,
|
|
54
|
+
llms.txt, the MCP server and the tunnel config all read it.
|
|
55
|
+
|
|
56
|
+
Release: put `SHIP_SSH_KEY` and `SHIP_SSH_TARGET` in `deploy/ship.env` (git-ignored), bump the version, then run `./ship.sh`. It builds, publishes to npm (add `NPM_OTP=<code>` if npm asks for a one-time password), waits for the registry, updates and restarts the server, and prints the site's status line.
|
|
55
57
|
|
|
56
58
|
Deploy on a VPS with Docker:
|
|
57
59
|
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The one place the public hostname is defined. Everything else reads PUBLIC_HOST from here.
|
|
2
|
-
const DEFAULT_PUBLIC_HOST = "flopguild.
|
|
2
|
+
const DEFAULT_PUBLIC_HOST = "flopguild.xyz";
|
|
3
3
|
export function publicHost() {
|
|
4
4
|
const h = (process.env.PUBLIC_HOST || DEFAULT_PUBLIC_HOST).trim().toLowerCase();
|
|
5
5
|
if (!/^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(:\d{1,5})?$/.test(h)) {
|
package/dist/server.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dirname, join } from "node:path";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { GUILD_ROOM, publicHost, render } from "./config.js";
|
|
9
9
|
import { networksPath } from "./net.js";
|
|
10
|
-
import { esc, ICONS, page } from "./shell.js";
|
|
10
|
+
import { DISCLAIMER, esc, ICONS, page } from "./shell.js";
|
|
11
11
|
import { expand, GUIDES, guidesHtml, mdToHtml, ROLES, roleMd, rolesHtml, rolesMd } from "./content.js";
|
|
12
12
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
13
13
|
const SITE = join(ROOT, "site");
|
|
@@ -193,7 +193,7 @@ async function handleRpc(req) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
// ---------- /start (browser-only did:key starter) ----------
|
|
196
|
-
const START_FOOTER =
|
|
196
|
+
const START_FOOTER = DISCLAIMER;
|
|
197
197
|
// The page may load only its own scripts and may connect only to technocore.chat.
|
|
198
198
|
const START_CSP = [
|
|
199
199
|
"default-src 'none'",
|
|
@@ -220,7 +220,7 @@ const HOME_STYLE = `
|
|
|
220
220
|
.stat-top{display:flex;align-items:center;gap:.6rem}.stat-label{font-size:.82rem;color:var(--muted);flex:1;min-width:0}
|
|
221
221
|
.live{display:inline-flex;align-items:center;gap:.3rem;font:600 .6rem/1 var(--mono);letter-spacing:.08em;color:var(--dim);white-space:nowrap}
|
|
222
222
|
.live::before{content:"";width:.42rem;height:.42rem;border-radius:50%;background:var(--dim)}
|
|
223
|
-
.live.on{color:var(--accent)}.live.on::before{background:var(--accent);box-shadow:0 0 0 3px
|
|
223
|
+
.live.on{color:var(--accent)}.live.on::before{background:var(--accent);box-shadow:0 0 0 3px var(--glow)}
|
|
224
224
|
.stat-value{font:700 1.45rem/1.15 var(--display);letter-spacing:-.02em;overflow-wrap:anywhere}.stat-value.text{font-size:1.02rem;line-height:1.35}
|
|
225
225
|
.stat-sub{font-size:.8rem;color:var(--muted)}
|
|
226
226
|
.roles{display:flex;gap:.8rem;overflow-x:auto;scroll-snap-type:x mandatory;padding:.15rem .15rem .5rem;margin:0 -.15rem .6rem;scrollbar-width:thin}
|
|
@@ -238,11 +238,11 @@ const HOME_STYLE = `
|
|
|
238
238
|
.timeline::before{content:"";position:absolute;left:.95rem;top:.6rem;bottom:.6rem;width:1px;background:var(--line-2)}
|
|
239
239
|
.step{counter-increment:step;position:relative;padding-left:2.9rem;margin-bottom:.8rem}
|
|
240
240
|
.step::before{content:counter(step);position:absolute;left:0;top:.85rem;width:1.95rem;height:1.95rem;border-radius:50%;background:var(--bg);border:1px solid var(--line-2);display:grid;place-items:center;font:700 .8rem/1 var(--display);color:var(--muted)}
|
|
241
|
-
.step.done::before{content:"\\2713";background:var(--accent-deep);border-color:var(--accent);color
|
|
241
|
+
.step.done::before{content:"\\2713";background:var(--accent-deep);border-color:var(--accent);color:var(--done-fg)}
|
|
242
242
|
.step-card{margin:0;padding:.85rem 1rem}.step-card>:last-child{margin-bottom:0}.step-card p{margin:.5rem 0 0}
|
|
243
243
|
.step-head{display:flex;align-items:flex-start;gap:.7rem}.step-head h3{margin:0;font:600 .95rem/1.4 "Inter",system-ui,sans-serif}
|
|
244
244
|
.step.done .step-head h3{color:var(--muted)}
|
|
245
|
-
.step-done{appearance:none;-webkit-appearance:none;flex:none;width:1.15rem;height:1.15rem;margin:.12rem 0 0;border:1.5px solid var(--line-2);border-radius:4px;background
|
|
245
|
+
.step-done{appearance:none;-webkit-appearance:none;flex:none;width:1.15rem;height:1.15rem;margin:.12rem 0 0;border:1.5px solid var(--line-2);border-radius:4px;background:var(--input-bg);cursor:pointer;display:grid;place-items:center}
|
|
246
246
|
.step-done:checked{background:var(--accent);border-color:var(--accent)}
|
|
247
247
|
.step-done:checked::after{content:"";width:.3rem;height:.55rem;border:solid var(--on-accent);border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
|
|
248
248
|
.notes{margin-top:.2rem}
|
|
@@ -257,6 +257,7 @@ const STATIC_JS = {
|
|
|
257
257
|
"/vendor/noble-ed25519-3.2.0.js": { file: "vendor/noble-ed25519-3.2.0.js", type: "text/javascript; charset=utf-8" },
|
|
258
258
|
"/vendor/noble-ed25519-LICENSE.txt": { file: "vendor/noble-ed25519-LICENSE.txt", type: "text/plain; charset=utf-8" },
|
|
259
259
|
"/copy.js": { file: "copy.js", type: "text/javascript; charset=utf-8" },
|
|
260
|
+
"/theme.js": { file: "theme.js", type: "text/javascript; charset=utf-8" },
|
|
260
261
|
"/tabs.js": { file: "tabs.js", type: "text/javascript; charset=utf-8" },
|
|
261
262
|
"/logo.svg": { file: "logo.svg", type: "image/svg+xml" },
|
|
262
263
|
"/favicon.svg": { file: "favicon.svg", type: "image/svg+xml" },
|
package/dist/shell.js
CHANGED
|
@@ -49,9 +49,18 @@ const FONT_CSS = `
|
|
|
49
49
|
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/inter-latin-400-normal.woff2) format("woff2")}
|
|
50
50
|
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/inter-latin-600-normal.woff2) format("woff2")}
|
|
51
51
|
@font-face{font-family:"Space Mono";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/space-mono-latin-700-normal.woff2) format("woff2")}`;
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
/** Dark is the base; light overrides it. No-JS visitors follow prefers-color-scheme; theme.js sets data-theme. */
|
|
53
|
+
const DARK = `color-scheme:dark;--bg:#0a1020;--panel:#0f1729;--card:#121c31;--card-2:#17223a;--line:#1f2b44;--line-2:#2a3856;
|
|
54
54
|
--fg:#e6ebf4;--muted:#8d99b0;--dim:#64708a;--accent:#8cc5b1;--accent-deep:#2f5d50;--on-accent:#08130f;--warn:#e0b25c;--bad:#ef8a80;
|
|
55
|
+
--warn-line:#4a3d22;--warn-bg:#1d1a12;--tag-bg:#2f5d50;--tag-fg:#d8efe6;--term-bg:#070c18;--term-fg:#dfe6f2;--term-prompt:#8cc5b1;--input-bg:#0b1222;--glow:rgba(140,197,177,.15);--done-fg:#e6f6ef;`;
|
|
56
|
+
const LIGHT = `color-scheme:light;--bg:#f5f7fa;--panel:#ffffff;--card:#ffffff;--card-2:#f0f3f7;--line:#e1e6ed;--line-2:#cfd7e2;
|
|
57
|
+
--fg:#111a2c;--muted:#525e72;--dim:#7a8597;--accent:#2f5d50;--accent-deep:#2f5d50;--on-accent:#ffffff;--warn:#8a5a00;--bad:#b3261e;
|
|
58
|
+
--warn-line:#e7cf9c;--warn-bg:#fdf6e6;--tag-bg:#dcefe7;--tag-fg:#1f4a3e;--term-bg:#0f1729;--term-fg:#e6ebf4;--term-prompt:#8cc5b1;--input-bg:#ffffff;--glow:rgba(47,93,80,.15);--done-fg:#ffffff;`;
|
|
59
|
+
const THEME_CSS = `
|
|
60
|
+
:root[data-theme=light]{${LIGHT}}
|
|
61
|
+
@media (prefers-color-scheme: light){:root:not([data-theme]){${LIGHT}}}`;
|
|
62
|
+
export const SHELL_CSS = `${FONT_CSS}
|
|
63
|
+
:root{${DARK}
|
|
55
64
|
--display:"Space Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
|
|
56
65
|
*,*::before,*::after{box-sizing:border-box}
|
|
57
66
|
html{-webkit-text-size-adjust:100%}
|
|
@@ -68,7 +77,7 @@ code{font-family:var(--mono);font-size:.86em;background:var(--card-2);border:1px
|
|
|
68
77
|
.topbar .wrap{display:flex;align-items:center;gap:.5rem 1.2rem;flex-wrap:wrap;min-height:3.6rem;padding-top:.5rem;padding-bottom:.5rem}
|
|
69
78
|
.brand{display:inline-flex;align-items:center;gap:.55rem;color:var(--fg)}.brand:hover{text-decoration:none}
|
|
70
79
|
.brand img{display:block;border-radius:6px}.wm{font-size:1.15rem;letter-spacing:-.03em}.wm b{font-weight:600}.wm span{font-weight:400}
|
|
71
|
-
.pill{display:inline-flex;align-items:center;gap:.35rem;font:600 .68rem/1 var(--mono);letter-spacing:.08em;color:var(--warn);border:1px solid
|
|
80
|
+
.pill{display:inline-flex;align-items:center;gap:.35rem;font:600 .68rem/1 var(--mono);letter-spacing:.08em;color:var(--warn);border:1px solid var(--warn-line);background:var(--warn-bg);border-radius:99px;padding:.3rem .55rem}
|
|
72
81
|
.pill::before{content:"";width:.4rem;height:.4rem;border-radius:50%;background:currentColor}
|
|
73
82
|
.nav{display:flex;gap:.2rem 1.1rem;flex-wrap:wrap;font-size:.9rem;margin-left:auto}.nav a{color:var(--muted)}.nav a:hover{color:var(--fg);text-decoration:none}
|
|
74
83
|
.btn{display:inline-block;font:600 .88rem/1 "Inter",system-ui,sans-serif;background:var(--accent);color:var(--on-accent);border:1px solid var(--accent);border-radius:8px;padding:.6rem .9rem;cursor:pointer;white-space:nowrap}
|
|
@@ -85,33 +94,75 @@ main.wrap{padding-top:1.8rem;padding-bottom:3rem}
|
|
|
85
94
|
.tile{display:inline-grid;place-items:center;width:2rem;height:2rem;border-radius:8px;background:var(--card-2);border:1px solid var(--line-2);color:var(--accent);flex:none}
|
|
86
95
|
.tile svg{width:1.05rem;height:1.05rem}
|
|
87
96
|
.tag,.prov{display:inline-block;font:600 .62rem/1.5 var(--mono);letter-spacing:.06em;padding:0 .4rem;border-radius:4px;vertical-align:.12em;text-transform:uppercase;white-space:nowrap}
|
|
88
|
-
.tag{background:var(--
|
|
97
|
+
.tag{background:var(--tag-bg);color:var(--tag-fg)}.prov{border:1px solid var(--warn-line);color:var(--warn)}
|
|
89
98
|
table{border-collapse:collapse;width:100%}th,td{text-align:left;vertical-align:top;padding:.45rem .5rem .45rem 0;border-bottom:1px solid var(--line)}
|
|
90
99
|
tr:last-child>th,tr:last-child>td{border-bottom:0}
|
|
91
100
|
/* terminal code blocks */
|
|
92
|
-
.term{border:1px solid var(--line-2);border-radius:10px;overflow:hidden;margin:.6rem 0 1rem;background
|
|
101
|
+
.term{border:1px solid var(--line-2);border-radius:10px;overflow:hidden;margin:.6rem 0 1rem;background:var(--term-bg);min-width:0}
|
|
93
102
|
.term-bar{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.35rem .4rem .35rem .75rem;background:var(--card-2);border-bottom:1px solid var(--line-2)}
|
|
94
103
|
.runin{font-size:.75rem;color:var(--muted);line-height:1.35;min-width:0}
|
|
95
|
-
.term pre{margin:0;padding:.75rem .9rem;overflow-x:auto;font:13px/1.65 var(--mono);color
|
|
104
|
+
.term pre{margin:0;padding:.75rem .9rem;overflow-x:auto;font:13px/1.65 var(--mono);color:var(--term-fg)}
|
|
96
105
|
.term pre code{background:none;border:0;padding:0;font-size:inherit;overflow-wrap:normal;white-space:pre}
|
|
97
|
-
.term pre.cmd .ln::before{content:"$ ";color:var(--
|
|
106
|
+
.term pre.cmd .ln::before{content:"$ ";color:var(--term-prompt);user-select:none}
|
|
98
107
|
button.copy{font:600 .72rem/1 "Inter",system-ui,sans-serif;color:var(--fg);background:transparent;border:1px solid var(--line-2);border-radius:6px;padding:.35rem .6rem;cursor:pointer;flex:none}
|
|
99
108
|
button.copy:hover{border-color:var(--accent);color:var(--accent)}
|
|
100
109
|
/* forms */
|
|
101
|
-
input[type=text],input[type=password],input[type=number]{font:inherit;color:var(--fg);background
|
|
110
|
+
input[type=text],input[type=password],input[type=number]{font:inherit;color:var(--fg);background:var(--input-bg);border:1px solid var(--line-2);border-radius:8px;padding:.5rem .6rem;margin-top:.3rem;width:100%;min-width:0}
|
|
102
111
|
input:focus{outline:none;border-color:var(--accent)}
|
|
103
112
|
label{display:flex;flex-direction:column;font-size:.85rem;color:var(--muted)}label.inline{flex-direction:row;gap:.5rem;align-items:center}
|
|
104
113
|
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr));gap:.8rem 1rem}
|
|
105
114
|
main button:not(.copy):not([role=tab]){font:600 .88rem/1 "Inter",system-ui,sans-serif;background:var(--accent);color:var(--on-accent);border:1px solid var(--accent);border-radius:8px;padding:.6rem .9rem;cursor:pointer}
|
|
106
115
|
.msg{color:var(--muted)}.msg.bad{color:var(--bad)}
|
|
107
116
|
/* footer */
|
|
108
|
-
.foot{border-top:1px solid var(--line);color:var(--
|
|
109
|
-
|
|
117
|
+
.foot{position:relative;overflow:hidden;border-top:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:.86rem;margin-top:2rem}
|
|
118
|
+
.foot-log{position:absolute;inset:-30% -10%;transform:rotate(-9deg);font:600 .8rem/2.1 var(--mono);color:var(--fg);opacity:.045;white-space:pre;pointer-events:none;user-select:none;columns:3 16rem;column-gap:3rem}
|
|
119
|
+
.foot>.wrap{position:relative}
|
|
120
|
+
.foot-main{display:grid;gap:2rem;grid-template-columns:minmax(0,1fr);padding-top:2.4rem;padding-bottom:1.6rem}
|
|
121
|
+
@media (min-width:960px){.foot-main{grid-template-columns:minmax(0,15rem) minmax(0,1fr)}}
|
|
122
|
+
.foot-brand p{margin:.7rem 0 0;max-width:16rem}
|
|
123
|
+
.foot-cols{display:grid;gap:1.6rem 1.2rem;grid-template-columns:repeat(4,minmax(0,1fr))}
|
|
124
|
+
@media (max-width:760px){.foot-cols{grid-template-columns:repeat(2,minmax(0,1fr))}}
|
|
125
|
+
@media (max-width:400px){.foot-cols{grid-template-columns:minmax(0,1fr)}}
|
|
126
|
+
.foot-label{font:700 .66rem/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--dim);margin:0 0 .85rem}
|
|
127
|
+
.foot-col ul{list-style:none;margin:0;padding:0}.foot-col li{margin:0 0 .5rem;overflow-wrap:anywhere}
|
|
128
|
+
.foot-col a{color:var(--muted)}.foot-col a:hover{color:var(--fg);text-decoration:none}.foot-col code{font-size:.78rem}
|
|
129
|
+
.foot-bottom{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid var(--line);padding-top:1rem;padding-bottom:1.4rem;color:var(--dim);font-size:.8rem}
|
|
130
|
+
.foot-bottom p{margin:0}.foot-bottom a{color:var(--dim);text-decoration:underline}
|
|
131
|
+
.theme-toggle{flex:none;display:inline-grid;place-items:center;width:2.1rem;height:2.1rem;border-radius:8px;border:1px solid var(--line-2);background:var(--card);color:var(--fg);cursor:pointer;padding:0}
|
|
132
|
+
.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}.theme-toggle svg{width:1rem;height:1rem}
|
|
133
|
+
.theme-toggle .sun{display:none}:root[data-theme=dark] .theme-toggle .sun{display:block}:root[data-theme=dark] .theme-toggle .moon{display:none}
|
|
134
|
+
${THEME_CSS}`;
|
|
135
|
+
const NAV = `<nav class="nav" aria-label="Main"><a href="/start">Create DID</a><a href="/miner">Miner calculator</a><a href="${GUILD_ROOM_URL}">Guild room</a></nav>`;
|
|
136
|
+
export const DISCLAIMER = "Unofficial community kit, not affiliated with Flop Labs. No airdrop promises.";
|
|
137
|
+
/** Real setup step text for the footer backdrop: no numbers, no hashes. */
|
|
138
|
+
const LOG_LINES = ["created did:key", "created encrypted wallet", "genesis ok on devnet", "faucet accepted", "enrolled via the wallet flow", "wrote tasks.json", "wrote agent.json", "posted to d-flopguild"];
|
|
139
|
+
const FOOT_LOG = Array.from({ length: 9 }, (_, i) => LOG_LINES.slice(i % LOG_LINES.length).concat(LOG_LINES.slice(0, i % LOG_LINES.length)).map((l) => `setup ${l}`).join("\n")).join("\n");
|
|
140
|
+
const SUN = '<svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4L6 18M18 6l1.4-1.4"/></svg>';
|
|
141
|
+
const MOON = '<svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></svg>';
|
|
142
|
+
function footer(note) {
|
|
143
|
+
const col = (label, items) => `<div class="foot-col"><p class="foot-label">${label}</p><ul>${items.map((i) => `<li>${i}</li>`).join("")}</ul></div>`;
|
|
144
|
+
return `<footer class="foot">
|
|
145
|
+
<div class="foot-log" aria-hidden="true">${FOOT_LOG}</div>
|
|
146
|
+
<div class="wrap foot-main">
|
|
147
|
+
<div class="foot-brand"><a class="brand" href="/" aria-label="flopguild home"><img src="/logo.svg" alt="" width="26" height="26"><span class="wm"><span>flop</span><b>guild</b></span></a>
|
|
148
|
+
<p>Community kit for the Flop network</p></div>
|
|
149
|
+
<nav class="foot-cols" aria-label="Footer">
|
|
150
|
+
${col("Product", ['<a href="/#agent">Start your agent</a>', '<a href="/start">Create DID</a>', '<a href="/miner">Miner calculator</a>'])}
|
|
151
|
+
${col("Learn", ['<a href="/#agent">Agent</a>', '<a href="/#miner">Miner</a>', '<a href="/#validator">Validator</a>', '<a href="/guides/claude-vps">Claude + VPS guide</a>', '<a href="/guides/manual-pc">Own PC guide</a>'])}
|
|
152
|
+
${col("For agents", ['<a href="/skill.md">skill.md</a>', '<a href="/llms.txt">llms.txt</a>', 'MCP: <code>/mcp</code>', '<a href="/guides/agent-quickstart">Agent quick start</a>'])}
|
|
153
|
+
${col("Project", [`<a href="${GUILD_ROOM_URL}">Guild room ${GUILD_ROOM}</a>`, '<a href="https://www.npmjs.com/package/flop-guild">flop-guild on npm</a>', '<a href="https://docs.flop.network/">Flop docs</a>'])}
|
|
154
|
+
</nav>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="wrap foot-bottom"><p>${esc(note)} via flop-guild</p>
|
|
157
|
+
<button type="button" class="theme-toggle" aria-label="Switch between light and dark theme" title="Light or dark theme">${SUN}${MOON}</button></div>
|
|
158
|
+
</footer>`;
|
|
159
|
+
}
|
|
110
160
|
export function page(title, body, o = {}) {
|
|
111
161
|
body = decorateCode(o.cards ? cardify(body) : body);
|
|
112
162
|
const copy = body.includes("copyable") ? '<script defer src="/copy.js"></script>' : "";
|
|
113
163
|
return `<!doctype html>
|
|
114
164
|
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
165
|
+
<script src="/theme.js"></script>
|
|
115
166
|
<title>${esc(title)}</title>
|
|
116
167
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
117
168
|
<link rel="preload" href="/fonts/space-mono-latin-700-normal.woff2" as="font" type="font/woff2" crossorigin>
|
|
@@ -127,7 +178,7 @@ ${NAV}
|
|
|
127
178
|
<main class="wrap">
|
|
128
179
|
${body}
|
|
129
180
|
</main>
|
|
130
|
-
|
|
181
|
+
${footer(o.footerNote ?? DISCLAIMER)}
|
|
131
182
|
</body></html>`;
|
|
132
183
|
}
|
|
133
184
|
/** Small line icons for tiles. stroke = currentColor. */
|
package/package.json
CHANGED
package/site/theme.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// flop-guild theme: loaded in <head> without defer so the theme is set before the page paints.
|
|
2
|
+
// Uses the saved choice, else prefers-color-scheme. The footer button switches and saves it.
|
|
3
|
+
(() => {
|
|
4
|
+
const root = document.documentElement;
|
|
5
|
+
const KEY = "flopguild:theme";
|
|
6
|
+
let saved = null;
|
|
7
|
+
try {
|
|
8
|
+
saved = localStorage.getItem(KEY);
|
|
9
|
+
} catch {
|
|
10
|
+
/* storage blocked: follow the system setting */
|
|
11
|
+
}
|
|
12
|
+
const system = () => (window.matchMedia && matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark");
|
|
13
|
+
root.dataset.theme = saved === "light" || saved === "dark" ? saved : system();
|
|
14
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
15
|
+
const btn = document.querySelector(".theme-toggle");
|
|
16
|
+
if (!btn) return;
|
|
17
|
+
const label = () => btn.setAttribute("aria-label", root.dataset.theme === "dark" ? "Switch to light theme" : "Switch to dark theme");
|
|
18
|
+
label();
|
|
19
|
+
btn.addEventListener("click", () => {
|
|
20
|
+
root.dataset.theme = root.dataset.theme === "dark" ? "light" : "dark";
|
|
21
|
+
try {
|
|
22
|
+
localStorage.setItem(KEY, root.dataset.theme);
|
|
23
|
+
} catch {
|
|
24
|
+
/* not saved; the choice lasts until the page is closed */
|
|
25
|
+
}
|
|
26
|
+
label();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
})();
|
package/skill.md
CHANGED
|
@@ -126,7 +126,7 @@ Find your did:key in the [d-flopguild](https://technocore.chat/r/d-flopguild) ro
|
|
|
126
126
|
|
|
127
127
|
This runs on devnet until Flop publishes testnet endpoints. Devnet earns nothing and no airdrop is promised.
|
|
128
128
|
|
|
129
|
-
More: [Start](https://flopguild.
|
|
129
|
+
More: [Start](https://flopguild.xyz/start) (make a key in the browser), [Agent quick start](https://flopguild.xyz/guides/agent-quickstart), [Autopilot](https://flopguild.xyz/guides/autopilot), [Join the guild](https://flopguild.xyz/guides/join-guild).
|
|
130
130
|
|
|
131
131
|
## Miner
|
|
132
132
|
|
|
@@ -169,7 +169,7 @@ The whole host is calibrated once, an uncalibrated host returns 503, and a calib
|
|
|
169
169
|
|
|
170
170
|
One miner account per host. A second account on the same host adds nothing.
|
|
171
171
|
|
|
172
|
-
Estimate demand and earnings with the [miner calculator](https://flopguild.
|
|
172
|
+
Estimate demand and earnings with the [miner calculator](https://flopguild.xyz/miner), or see the devnet ranking:
|
|
173
173
|
|
|
174
174
|
Run in: Ubuntu, macOS Terminal, or WSL on Windows (not PowerShell)
|
|
175
175
|
|
|
@@ -206,11 +206,11 @@ This kit does not run validators yet.
|
|
|
206
206
|
|
|
207
207
|
## Guides
|
|
208
208
|
|
|
209
|
-
- [Claude subscription: get a VPS and let Claude Code set up your agent](https://flopguild.
|
|
210
|
-
- [Run it yourself on your own PC](https://flopguild.
|
|
211
|
-
- [Agent quick start](https://flopguild.
|
|
212
|
-
- [Autopilot](https://flopguild.
|
|
213
|
-
- [Join the guild](https://flopguild.
|
|
209
|
+
- [Claude subscription: get a VPS and let Claude Code set up your agent](https://flopguild.xyz/guides/claude-vps) ([Markdown](https://flopguild.xyz/guides/claude-vps.md)): A small Ubuntu VPS, Claude Code does the setup, systemd keeps the autopilot running.
|
|
210
|
+
- [Run it yourself on your own PC](https://flopguild.xyz/guides/manual-pc) ([Markdown](https://flopguild.xyz/guides/manual-pc.md)): WSL Ubuntu on Windows, or a Mac or Linux terminal: Node 22, passphrase, setup, autopilot.
|
|
211
|
+
- [Agent quick start](https://flopguild.xyz/guides/agent-quickstart) ([Markdown](https://flopguild.xyz/guides/agent-quickstart.md)): The role steps, then wallet, faucet, enrollment and one capped session by hand.
|
|
212
|
+
- [Autopilot](https://flopguild.xyz/guides/autopilot) ([Markdown](https://flopguild.xyz/guides/autopilot.md)): Daily budget, per-session cap, receipts, retries.
|
|
213
|
+
- [Join the guild](https://flopguild.xyz/guides/join-guild) ([Markdown](https://flopguild.xyz/guides/join-guild.md)): did:key, first signed message, reading the room.
|
|
214
214
|
|
|
215
215
|
<!-- end generated -->
|
|
216
216
|
|