openvibers/openvibe.food 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 (#114)

OP OpenVibers committed 16 days ago · 0072e559ae · 1 file, +6 −6

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex d292c51..05fc955 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -22,16 +22,16 @@ const NETWORK_URL = 'https://openvibe.network';
const SITE_NAME = 'OpenVibe.Food';
const TAGLINE = 'What should we eat?';
const PUBLIC_DIR = path.join(__dirname, '..', '..', 'public');
--// The product's own 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: 'Food near you', href: '/near', icon: 'fa-location-dot' },
{ label: 'Meal plan', href: '/plan', icon: 'fa-list-check' },
{ label: 'Food boxes', href: '/boxes', icon: 'fa-utensils' },
-- { label: 'Cupboard', href: '/pantry', icon: 'fa-house' },
{ label: 'Recipes', href: '/recipes', icon: 'fa-book' },
-- { label: 'Food list', href: '/foods' },
-- { label: 'Delivery', href: '/delivery' },
-- { label: 'What shipped', href: '/updates' },
++ { label: 'Cupboard', href: '/pantry', icon: 'fa-house' },
++ { label: 'Food list', href: '/foods', more: true },
++ { label: 'Delivery', href: '/delivery', more: true },
];
const hashes = new Map();
@@@ -62,7 +62,7 @@ function renderPage(o) {
const nav = {
service: 'food',
apiBase: NETWORK_URL,
-- links: NAV.map((l) => ({ label: l.label, href: l.href, ...(l.icon ? { icon: l.icon } : {}), 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: true, // phones: the five places with icons as the bottom tab bar, More for the rest (Shared 4.20)
history: { type: 'page', title: o.title || SITE_NAME },
silentLogin: `${o.config.baseUrl}/auth/login?silent=1&next={url}`,