Site assistant (Marty 2026-11-15): chat widget in the Stack POL look on every page, CANNED + FACTS from this repo (the on-page FAQ, programs.js, the 5-minute indexer, opt-in member pages, holds nothing, no income promise), retrieval over the shared network knowledge base on the hub (netkb.js as hub site stackpol; another site named = its answer, with its tracked LinkSpin link), reasoning off, account problems hand off to network support. Static server now serves .js/.css; Dockerfile copies the chat modules. chatbot.test 125 pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 13:11:04 -06:00
parent 3a6ac0a81e
commit 7446df2f4f
12 changed files with 916 additions and 3 deletions
+35
View File
@@ -0,0 +1,35 @@
/* Site assistant widget, Stack POL look (layout.js): deep violet night, gold for the stack, Sora headings, Manrope body.
Fallbacks match the layout's tokens. */
#scChat{--sc-bg:var(--panel,#130c24);--sc-bg2:var(--panel-2,#1b1232);--sc-ink:var(--ink,#f3efff);--sc-sub:var(--muted,#a8a0c6);--sc-line:var(--line,rgba(183,148,255,.18));
--sc-violet:var(--violet,#8247e5);--sc-violet-hi:var(--violet-hi,#b794ff);--sc-gold:var(--gold,#ffc24b);--sc-gold-d:var(--gold-d,#b9781a);
--sc-disp:var(--display,"Sora","Segoe UI",system-ui,sans-serif);--sc-font:var(--body,"Manrope",system-ui,sans-serif);
position:fixed;right:18px;bottom:18px;z-index:80;font-family:var(--sc-font)}
#scBtn{width:58px;height:58px;border-radius:18px;border:0;cursor:pointer;background:var(--sc-gold);color:#160b02;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 0 var(--sc-gold-d),0 14px 30px rgba(255,194,75,.2)}
#scBtn:focus-visible{outline:2px solid var(--sc-violet-hi);outline-offset:4px}
#scChat.open #scBtn{background:var(--sc-violet);color:#fff;box-shadow:0 5px 0 #4b2394}
#scPanel{position:absolute;right:0;bottom:76px;width:370px;max-width:calc(100vw - 32px);height:540px;max-height:calc(100vh - 110px);display:flex;flex-direction:column;
background:var(--sc-bg);color:var(--sc-ink);border:1px solid var(--sc-line);border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.55);overflow:hidden}
.sc-head{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;background:linear-gradient(135deg,rgba(130,71,229,.35),rgba(19,12,36,0) 75%),var(--sc-bg2);border-bottom:1px solid var(--sc-line)}
.sc-head>div{flex:1;min-width:0}
.sc-title{display:block;font:800 19px var(--sc-disp);letter-spacing:-.01em}
.sc-sub{display:block;font-size:12.5px;color:var(--sc-sub)}
#scClose{background:transparent;border:0;color:var(--sc-sub);font-size:26px;line-height:1;cursor:pointer;padding:0 2px}
.sc-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:9px}
.sc-m{max-width:88%;padding:9px 12px;font-size:14.5px;line-height:1.5;border-radius:14px;overflow-wrap:anywhere}
.sc-m.bot{align-self:flex-start;background:var(--sc-bg2);border:1px solid var(--sc-line);border-bottom-left-radius:4px}
.sc-m.me{align-self:flex-end;background:var(--sc-violet);color:#fff;border-bottom-right-radius:4px}
.sc-m a{color:var(--sc-gold);text-decoration:underline}
.sc-m.me a{color:#fff}
.sc-m.wait{opacity:.6}
.sc-cta{display:inline-block;background:var(--sc-gold);color:#160b02!important;text-decoration:none!important;font:800 14px var(--sc-disp);padding:8px 14px;border-radius:12px;box-shadow:0 4px 0 var(--sc-gold-d)}
.sc-handoff{background:transparent!important;border:0!important;padding:0!important}
.sc-topics{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 8px}
.sc-topics button{background:transparent;color:var(--sc-violet-hi);border:1px solid var(--sc-line);border-radius:999px;font:600 12.5px var(--sc-font);padding:5px 11px;cursor:pointer}
.sc-topics button:hover{border-color:var(--sc-violet-hi)}
.sc-input{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--sc-line)}
.sc-input input{flex:1;min-width:0;border:1px solid var(--sc-line);border-radius:12px;padding:10px 12px;font:15px var(--sc-font);color:var(--sc-ink);background:var(--ground,#0a0715)}
.sc-input input::placeholder{color:var(--sc-sub)}
.sc-input input:focus{outline:2px solid var(--sc-violet-hi);outline-offset:-1px}
.sc-input button{background:var(--sc-gold);color:#160b02;border:0;border-radius:12px;font:800 14px var(--sc-disp);padding:0 16px;cursor:pointer}
.sc-human{display:block;text-align:center;font-size:12.5px;color:var(--sc-sub);padding:0 0 10px}
@media (max-width:600px){#scChat{right:12px;bottom:12px}#scBtn{width:52px;height:52px}#scPanel{bottom:68px;height:calc(100vh - 100px)}}