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)
Changes
@@@ -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}`,
@@ -22,16 +22,16 @@ const NETWORK_URL = 'https://openvibe.network';
@@ -22,16 +22,16 @@ const NETWORK_URL = 'https://openvibe.network';
const SITE_NAME = 'OpenVibe.Food';
const SITE_NAME = 'OpenVibe.Food';
const TAGLINE = 'What should we eat?';
const TAGLINE = 'What should we eat?';
const PUBLIC_DIR = path.join(__dirname, '..', '..', 'public');
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 = [
const NAV = [
{ label: 'Food near you', href: '/near', icon: 'fa-location-dot' },
{ label: 'Food near you', href: '/near', icon: 'fa-location-dot' },
{ label: 'Meal plan', href: '/plan', icon: 'fa-list-check' },
{ label: 'Meal plan', href: '/plan', icon: 'fa-list-check' },
{ label: 'Food boxes', href: '/boxes', icon: 'fa-utensils' },
{ label: 'Food boxes', href: '/boxes', icon: 'fa-utensils' },
- { label: 'Cupboard', href: '/pantry', icon: 'fa-house' },
{ label: 'Recipes', href: '/recipes', icon: 'fa-book' },
{ 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();
const hashes = new Map();
@@ -62,7 +62,7 @@ function renderPage(o) {
@@ -62,7 +62,7 @@ function renderPage(o) {
const nav = {
const nav = {
service: 'food',
service: 'food',
apiBase: NETWORK_URL,
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)
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 },
history: { type: 'page', title: o.title || SITE_NAME },
silentLogin: `${o.config.baseUrl}/auth/login?silent=1&next={url}`,
silentLogin: `${o.config.baseUrl}/auth/login?silent=1&next={url}`,