openvibers/openvibe.mediahub Commits
MediaHub: openvibe.download's heading is one sentence, the tagline said once (#46)
Changes
@@@ -143,9 +143,10 @@ ${notice(p && p.detail ? p.detail : 'You are over the limit for this.', 'warn')}// ── Home ─────────────────────────────────────────────────r.get('/', (req, res) => {const hero = showcase.hero({-- eyebrow: `${SITE_NAME} · ${TAGLINE}`,-- title: 'OpenVibe.Download',-- accent: TAGLINE,++ // One sentence in the heading (it read "OpenVibe.Download Your files, …"), the tagline not said twice.++ eyebrow: `${SITE_NAME} · a private drive`,++ title: 'Your files,',++ accent: 'shared on your terms.',lede: 'A private drive for your files, with share links you control. Uploads and every file page need a signed-in OpenVibe account — there is no anonymous upload and no anonymous download here.',actions: signedIn(req)? [{ label: 'Your files', href: '/files', primary: true }, { label: 'The safety rules', href: '/safety' }]@@@ -63,6 +63,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#maiassert.match(r.headers.get('content-type'), /^text\/html/);assert.ok(r.text.includes('OpenVibe.MediaHub'), 'the service name is on the page');assert.ok(r.text.includes('Your files, shared on your terms.'), 'the tagline is on the page');++ const h1 = (/<h1[^>]*>([\s\S]*?)<\/h1>/.exec(r.text) || [])[1] || '';++ assert.strictEqual(h1.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim(), 'Your files, shared on your terms.', 'the heading is one sentence');assert.ok(r.text.includes('/shared/showcase.css'), 'the showcase stylesheet');assert.ok(!r.text.includes('/home/') && !r.text.includes('/mnt/'), 'no local filesystem path on the page');});
@@ -143,9 +143,10 @@ ${notice(p && p.detail ? p.detail : 'You are over the limit for this.', 'warn')}
@@ -143,9 +143,10 @@ ${notice(p && p.detail ? p.detail : 'You are over the limit for this.', 'warn')}
// ── Home ─────────────────────────────────────────────────
// ── Home ─────────────────────────────────────────────────
r.get('/', (req, res) => {
r.get('/', (req, res) => {
const hero = showcase.hero({
const hero = showcase.hero({
- eyebrow: `${SITE_NAME} · ${TAGLINE}`,
- title: 'OpenVibe.Download',
- accent: TAGLINE,
+ // One sentence in the heading (it read "OpenVibe.Download Your files, …"), the tagline not said twice.
+ eyebrow: `${SITE_NAME} · a private drive`,
+ title: 'Your files,',
+ accent: 'shared on your terms.',
lede: 'A private drive for your files, with share links you control. Uploads and every file page need a signed-in OpenVibe account — there is no anonymous upload and no anonymous download here.',
lede: 'A private drive for your files, with share links you control. Uploads and every file page need a signed-in OpenVibe account — there is no anonymous upload and no anonymous download here.',
actions: signedIn(req)
actions: signedIn(req)
? [{ label: 'Your files', href: '/files', primary: true }, { label: 'The safety rules', href: '/safety' }]
? [{ label: 'Your files', href: '/files', primary: true }, { label: 'The safety rules', href: '/safety' }]
@@ -63,6 +63,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#mai
@@ -63,6 +63,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#mai
assert.match(r.headers.get('content-type'), /^text\/html/);
assert.match(r.headers.get('content-type'), /^text\/html/);
assert.ok(r.text.includes('OpenVibe.MediaHub'), 'the service name is on the page');
assert.ok(r.text.includes('OpenVibe.MediaHub'), 'the service name is on the page');
assert.ok(r.text.includes('Your files, shared on your terms.'), 'the tagline is on the page');
assert.ok(r.text.includes('Your files, shared on your terms.'), 'the tagline is on the page');
+ const h1 = (/<h1[^>]*>([\s\S]*?)<\/h1>/.exec(r.text) || [])[1] || '';
+ assert.strictEqual(h1.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim(), 'Your files, shared on your terms.', 'the heading is one sentence');
assert.ok(r.text.includes('/shared/showcase.css'), 'the showcase stylesheet');
assert.ok(r.text.includes('/shared/showcase.css'), 'the showcase stylesheet');
assert.ok(!r.text.includes('/home/') && !r.text.includes('/mnt/'), 'no local filesystem path on the page');
assert.ok(!r.text.includes('/home/') && !r.text.includes('/mnt/'), 'no local filesystem path on the page');
});
});