top of page

click on a image to see full design

  • Facebook
  • Instagram

SOME OF MY FAVORITE PROJECTS

<!doctype html>

const basePerColor = 45; // design + separation per color

const setup = 60; // base setup

const runFactor = Math.max(1, Math.log10(Math.max(10, run))/0.5); // small discount for huge runs

const price = Math.round((setup + (colors * basePerColor)) * runFactor);

return price;

}

 

estimateBtn.addEventListener('click', (e)=>{

const colors = Math.max(1, parseInt(document.getElementById('colors').value||'1',10));

const run = Math.max(1, parseInt(document.getElementById('run').value||'1',10));

const p = estimate(colors, run);

leadResponse.style.color = 'var(--accent-2)';

leadResponse.textContent = `Estimated starting design & separations: $${p} — this excludes printing. Click Send to request a formal quote.`;

});

 

// basic file size check

filesInput.addEventListener('change', ()=>{

const maxMB = 20;

const files = Array.from(filesInput.files);

const tooLarge = files.find(f => f.size > maxMB * 1024 * 1024);

if (tooLarge) {

leadResponse.style.color = 'salmon';

leadResponse.textContent = `One or more files exceed ${maxMB}MB. Please reduce file size or use a transfer link (WeTransfer/Drive).`;

} else {

leadResponse.textContent = '';

}

});

 

// Demo lead send — replace with real endpoint when you integrate

leadForm.addEventListener('submit', async (e)=>{

e.preventDefault();

leadResponse.style.color = 'var(--muted)';

leadResponse.textContent = 'Preparing files & sending request…';

 

// Collect form data

const fd = new FormData(leadForm);

// Append client-side meta

fd.append('site', location.hostname);

fd.append('submitted_at', new Date().toISOString());

 

// Demo: show the data in console and simulate network send

console.log('Lead form data (demo):');

for (const pair of fd.entries()) console.log(pair[0], pair[1]);

 

// Replace the block below with your real API call, e.g. /api/lead

try {

// Example: await fetch('/api/lead', { method:'POST', body: fd });

await new Promise(r => setTimeout(r, 900));

leadResponse.style.color = 'var(--accent-2)';

leadResponse.textContent = 'Thanks — inquiry sent. I will reply within 1–2 business days.';

leadForm.reset();

} catch(err){

console.error(err);

leadResponse.style.color = 'salmon';

leadResponse.textContent = 'Something went wrong while sending. Try again or email bernard@designsbybernard.com';

}

});

 

// Print spec download (generates a simple checklist PDF-like text file on the fly)

specDownload.addEventListener('click', ()=>{

const text = `Print-Ready Art Checklist\n\n1) Vector files preferred (AI/EPS/SVG).\n2) Separate spot colors on their own layers.\n3) Provide simulated process/halftone info when needed.\n4) Indicate garment color and placement.\n5) Include desired pantone/spot colors if required.\n6) Unflatten files or include layered PSD if complex.\n7) Minimum 300 DPI for raster elements.\n8) Add bleed if printing posters.`;

const blob = new Blob([text], { type: 'text/plain' });

const url = URL.createObjectURL(blob);

const a = document.createElement('a');

a.href = url; a.download = 'print-spec-checklist.txt';

a.click();

URL.revokeObjectURL(url);

});

 

// Small conversion utility: if user lands with ?ref=... track it in localStorage

(function trackRef(){

const params = new URLSearchParams(location.search);

if (params.has('ref')) localStorage.setItem('referrer_code', params.get('ref'));

})();

 

})();

</script>

</body>

</html>

bottom of page