openvibers/openvibe.watch Commits

The bar: the main places with icons (the phone app bar), the rest under More, What shipped in the footer, Search is the magnifier (#119)

OP OpenVibers committed 16 days ago · 6acde28963 · 1 file, +6 −5

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 63ac673..cd3d71a 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -21,11 +21,11 @@ const NETWORK_URL = 'https://openvibe.network';
const SITE_NAME = 'OpenVibe.Watch';
const TAGLINE = 'Get told when a page or a feed changes.';
const PUBLIC_DIR = path.join(__dirname, '..', '..', 'public');
--// The product's navigation: one entry per public page it serves.
++// The product's own places: the main ones carry an icon (phones get them as the bottom tab bar), the rest fold into
++// the navbar's More (Shared 4.22). Search is the navbar's magnifier and What shipped is the footer's.
const NAV = [
-- { label: 'Your watches', href: '/watches' },
-- { label: 'How it checks', href: '/how-it-works' },
-- { label: 'What shipped', href: '/updates' },
++ { label: 'Your watches', href: '/watches', icon: 'fa-bell' },
++ { label: 'How it checks', href: '/how-it-works', icon: 'fa-circle-info' },
];
const hashes = new Map();
@@@ -53,7 +53,8 @@ function renderPage(o) {
const nav = {
service: 'watch',
apiBase: NETWORK_URL,
-- links: NAV.map((l) => ({ label: l.label, href: l.href, active: pathNow === l.href || pathNow.startsWith(`${l.href}/`) })),
++ links: NAV.map((l) => ({ label: l.label, href: l.href, ...(l.icon ? { icon: l.icon } : {}), ...(l.more ? { more: true } : {}), active: pathNow === l.href || pathNow.startsWith(`${l.href}/`) })),
++ appBar: [{ label: 'Home', href: '/', icon: 'fa-house' }, { label: 'Watches', href: '/watches', icon: 'fa-bell' }, { label: 'How it checks', href: '/how-it-works', icon: 'fa-circle-info' }], // phones: the bottom tab bar (Shared 4.20)
history: { type: 'page', title: o.title || SITE_NAME },
sessionUrl: '/auth/me',
loginUrl: '/auth/login?next={path}',