openvibers/openvibe.help Commits

Sign in with a button on signed-out pages (#167)

OP OpenVibers committed 12 days ago · 16904b5339 · 3 files, +7 −2

Changes

ddiff --git a/public/css/app.css b/public/css/app.css
iindex 75b5071..83b7317 100644
---- a/public/css/app.css
++++ b/public/css/app.css
@@@ -154,3 +154,7 @@ mark { background: var(--warning, #f59e0b); color: #10151f; border-radius: 3px;
.hp-fold-block > summary { cursor: pointer; }
.hp-fold-hint { display: inline; margin-left: 8px; font-size: .78rem; font-weight: 600; color: var(--text-secondary, #96a7c2); }
}
++
++/* A sign-in prompt: the sentence, then the button under it (2026-11-01). */
++.notice.signin-prompt { display: grid; gap: 12px; justify-items: start; }
++.notice.signin-prompt p { margin: 0; }
ddiff --git a/server/http/pages.js b/server/http/pages.js
iindex 6905f02..2794d5b 100644
---- a/server/http/pages.js
++++ b/server/http/pages.js
@@@ -98,7 +98,7 @@ function createPageRoutes(ctx) {
return html`<p class="prov small muted">Generated from <a href="${p.url}" rel="noopener nofollow">${p.source || p.name}</a>${files.length ? html` · ${files.map((f) => html`<code>${f}</code>`)}` : ''}${compact ? '' : html` · read ${time(catalog.generatedAt)}`}</p>`;
};
-- const signInPrompt = (what, next) => html`<div class="notice">${what} <a href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a>.</div>`;
++ const signInPrompt = (what, next) => html`<div class="notice signin-prompt"><p>${what}</p><p><a class="sc-btn sc-primary" href="/auth/login?next=${encodeURIComponent(next)}">Sign in with OpenVibe</a></p></div>`;
/**
* The ticket promise: what a reader gets back, and the first-reply time this service has measured. The number is
ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 7442ed6..2f749e2 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -98,7 +98,8 @@ function renderPage(o) {
head: `<meta name="referrer" content="${o.noReferrer ? 'no-referrer' : 'strict-origin-when-cross-origin'}">
${appIcon.headTags({ site: 'help' })}
<link rel="stylesheet" href="${asset('css/app.css')}">
--${(o.styles || []).map((name) => `<link rel="stylesheet" href="${esc(ovServe.url(name))}">`).join('\n')}
++<!-- The shared showcase stylesheet on every page, not only the home: inner pages use its buttons (sc-btn), and without it a sign-in button drew as a bare link (phone sweep, 2026-11-01). It is scoped to its own sc- classes. -->
++${[...new Set(['showcase.css', ...(o.styles || [])])].map((name) => `<link rel="stylesheet" href="${esc(ovServe.url(name))}">`).join('\n')}
${(o.inlineStyles || []).map((css) => `<style>${css}</style>`).join('\n')}
${render(scripts)}
<meta name="ov-boost" content="help@${esc(RELEASE)}">