openvibers/openvibe.reviews Commits

The search row no longer repeats the site's name (#265)

OP OpenVibers committed 3 days ago · c4b5277579 · 1 file, +3 −1

The navbar says OpenVibe Reviews; the row under it said OpenVibe.Reviews again beside the search box. The name stays
in that row only where there is no navbar (without JavaScript).

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 693a2da..898abf8 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -114,7 +114,9 @@ function renderPage(o) {
agentHeadTags({ canonical: o.canonical || `${config.baseUrl}${o.path || '/'}` })].filter(Boolean).join('\n'),
release: RELEASE,
mainClass: 'rv-main',
-- header: `<header class="rv-bar"><a class="rv-brand" href="/">${SITE_NAME}</a><form class="rv-search" action="/search" method="get" role="search"><label for="rv-q" class="rv-sr">Search employers, landlords, restaurants and hosts</label><input id="rv-q" name="q" type="search" placeholder="An employer, landlord, restaurant or host" value="${esc(o.query || '')}"><button type="submit">Search</button></form><noscript><span class="rv-account">${who}</span></noscript></header>`,
++ // The site's name is in the navbar above; this row is the site's search, and says the name only where there is no
++ // navbar (without JavaScript).
++ header: `<header class="rv-bar"><noscript><a class="rv-brand" href="/">${SITE_NAME}</a></noscript><form class="rv-search" action="/search" method="get" role="search"><label for="rv-q" class="rv-sr">Search employers, landlords, restaurants and hosts</label><input id="rv-q" name="q" type="search" placeholder="An employer, landlord, restaurant or host" value="${esc(o.query || '')}"><button type="submit">Search</button></form><noscript><span class="rv-account">${who}</span></noscript></header>`,
body: o.body,
// The shipped list is a part a reader rarely needs: a fold on a phone, the section it was where there is room.
shipped: o.path === '/' ? foldBlock({ id: 'shipped', head: `<h2 id="rv-shipped-h">Recently shipped on ${SITE_NAME}</h2>`, html: frame.shipped({ service: 'reviews', title: `Recently shipped on ${SITE_NAME}` }) }) : '',