// Shared layout, icons and small HTML helpers for every page.
export const SITE = {
url: 'https://dylanmazzei.com',
email: 'dylan@dylanmazzei.com',
pressEmail: 'press@dylanmazzei.com',
linkedin: 'https://www.linkedin.com/in/dylanmazzei/',
instagram: 'https://www.instagram.com/caposins',
// Replace with the real scheduling link (Calendly, Cal.com, etc.).
calendar: 'mailto:dylan@dylanmazzei.com?subject=Scheduling%20a%20conversation',
};
const ICONS = {
arrow: '',
'arrow-ur': '',
check: '',
plus: '',
chev: '',
menu: '',
close: '',
brace: '',
search: '',
chip: '',
bottle: '',
edu: '',
shield: '',
bag: '',
umbrella: '',
megaphone: '',
heart: '',
shirt: '',
building: '',
gauge: '',
truck: '',
compass: '',
target: '',
users: '',
chart: '',
layers: '',
mic: '',
rocket: '',
route: '',
mail: '',
calendar: '',
pin: '',
book: '',
pen: '',
moon: '',
sun: '',
spark: '',
};
const SMALL = new Set(['arrow', 'arrow-ur', 'check', 'plus', 'chev', 'brace']);
export function icon(name, cls = '') {
const vb = SMALL.has(name) ? '0 0 16 16' : name === 'menu' || name === 'close' ? '0 0 18 18' : '0 0 24 24';
const sw = SMALL.has(name) || name === 'menu' || name === 'close' ? '' : ' stroke-width="1.75"';
return ``;
}
// Dylan Mazzei monogram: italic "D" (inherits text color) and the sky-blue blade.
export const mark = (cls = 'logo-mark') => ``;
export const logo = () => `${mark()}Dylan Mazzei`;
export const eyebrow = (t) => `${t}`;
export function btn(text, href, variant = 'primary', extra = '') {
const ext = /^https?:/.test(href) ? ' target="_blank" rel="noopener"' : '';
return ``;
}
export function textLink(text, href) {
const ext = /^https?:/.test(href) ? ' target="_blank" rel="noopener"' : '';
return `${text} ${icon('arrow')}`;
}
export const paras = (arr, cls = '') => arr.map((t) => `
${t}
`).join('');
export function faq(items) {
return `${items
.map(
([q, a], i) => `
${q}${icon('plus')}
${paras(a)}
`
)
.join('')}
`;
}
const NAV = [
{ label: 'Portfolio', href: '/portfolio/' },
{ label: 'About', href: '/about/' },
{
label: 'Consulting',
href: '/consulting/',
children: [
{ label: 'Consulting', desc: 'Find the Real Problem. Then Fix the Right One.', href: '/consulting/', icon: 'compass' },
{ label: 'Marketing & AI Search', desc: 'Get Found Where Attention Is Moving.', href: '/consulting/marketing/', icon: 'search' },
{ label: 'Business Setup', desc: 'Start With Fewer Expensive Mistakes.', href: '/consulting/business-setup/', icon: 'building' },
],
},
{ label: 'Press', href: '/press/' },
];
function nav(path) {
const isActive = (href) => (href === '/' ? path === '/' : path.startsWith(href));
const desktop = NAV.map((item) => {
if (!item.children) {
return `${item.label}`;
}
return `
`;
}).join('');
const mobile = NAV.map((item) => {
const top = `${item.label} ${icon('arrow', 'check')}`;
if (!item.children) return top;
return top + item.children.slice(1).map((c) => `${c.label}`).join('');
}).join('');
return `Skip to content
`;
}
function footer() {
return ``;
}
export function page({ path, title, description, body, schema = [] }) {
const canonical = SITE.url + path;
const person = {
'@context': 'https://schema.org',
'@type': 'Person',
'@id': SITE.url + '/#dylan',
name: 'Dylan Mazzei',
url: SITE.url,
email: SITE.email,
image: SITE.url + '/assets/dylan-portrait.jpg',
jobTitle: 'Founder & Operator',
sameAs: [SITE.linkedin, SITE.instagram],
};
const ld = [person, ...schema].map((s) => ``).join('\n');
return `
${title}
${ld}
${nav(path)}
${body}
${footer()}
`;
}