From adb9e1eef227afdfbda7fcb9dd66ccacf14d865c Mon Sep 17 00:00:00 2001 From: Erfan Ahmadi Date: Tue, 3 Nov 2026 18:12:41 +0400 Subject: [PATCH] Refer & Earn improvements --- app/components/Navbar.tsx | 2 +- app/data/partner-content.json | 12 ++++++++---- scripts/generate-partner-pdf.mjs | 16 ++++++++++++++-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 04eeb3f..6d68149 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -17,9 +17,9 @@ const links: Link[] = [ { name: "About", url: "/about" }, { name: "Services", url: "/services" }, { name: "When to Call", url: "/when-to-call-devsh" }, + { name: "Refer & Earn", url: "/partner.pdf" }, { name: "Sponsorship", url: "/#sponsorship" }, { name: "Pricing", url: "/pricing.pdf" }, - { name: "Referral Partners", url: "/partner.pdf" }, { name: "Nabla", url: "/nabla" }, { name: "Research", url: "/presentations" }, { name: "Blog", url: "/blog" }, diff --git a/app/data/partner-content.json b/app/data/partner-content.json index 0e41f17..cda52f1 100644 --- a/app/data/partner-content.json +++ b/app/data/partner-content.json @@ -6,7 +6,7 @@ }, { "type": "reward", - "text": "10% success reward" + "text": "10% closing reward" }, { "type": "subtitle", @@ -42,7 +42,7 @@ }, { "type": "paragraph", - "text": "Connect us with teams in CAD, gaming, simulation, visualization, or automotive requiring graphics dev, GPU computing, code audits, or corporate training." + "text": "Connect us with teams in gaming, CAD/CAE, simulation, digital twins, automotive, robotics, medical imaging, geospatial, VFX/animation, or scientific/HPC visualization requiring graphics dev, GPU computing, code audits, or corporate training." }, { "type": "subheading", @@ -58,7 +58,7 @@ }, { "type": "paragraph", - "text": "Earn 10% on all payments we receive across a new client’s projects for 12 months after introduction. No minimum project value or commission cap. For corporate training, earn 10% for its full duration. We pay once client payments are received and no longer subject to offsets, contractual penalties or refunds. When referring your employer or client, tell them immediately about your 10% commission." + "text": "Earn 10% on all payments we receive across a new client’s projects for 12 months after introduction. No minimum project value or commission cap.*" }, { "type": "heading", @@ -66,7 +66,7 @@ }, { "type": "bullet", - "text": "Industry networks: Existing contacts among CTOs, VPs of engineering, product directors, and R&D leads in gaming, CAD, simulation, automotive, or graphics technology." + "text": "Industry networks: Existing contacts among CTOs, VPs of engineering, product directors, and R&D leads in gaming, CAD/CAE, simulation, digital twins, automotive, robotics, medical imaging, geospatial, VFX/animation, or scientific/HPC visualization." }, { "type": "bullet", @@ -97,6 +97,10 @@ "text": "Ready to turn your network into revenue?", "prompt": "Contact our team at", "email": "partner@devsh.eu" + }, + { + "type": "footnote", + "text": "* For corporate training, earn 10% for its full duration. We pay once client payments are received and no longer subject to offsets, contractual penalties or refunds. When referring your employer or client, tell them immediately about your 10% commission." } ] } diff --git a/scripts/generate-partner-pdf.mjs b/scripts/generate-partner-pdf.mjs index bdde083..9b29312 100644 --- a/scripts/generate-partner-pdf.mjs +++ b/scripts/generate-partner-pdf.mjs @@ -24,9 +24,10 @@ const space = { stepToBody: 2, titleToReward: 3, rewardToSubtitle: 6.5, - intro: sectionGap * 2, + intro: sectionGap, quote: 3.5, quoteEnd: 1.5, + footnote: 1.5, }; const bodyColor = "#e5eae7"; const rewardColor = "#92dfd2"; @@ -98,7 +99,15 @@ for (const [index, block] of content.blocks.entries()) { drawSectionHeading(block.text); } else if (block.type === "subheading") { if (content.blocks[index - 1]?.type !== "heading") y += space.step; - drawText(block.text, { font: "FuturaDemi", size: 10.2, color: colors.white, after: space.stepToBody }); + const sectionStart = content.blocks.findLastIndex((other, otherIndex) => otherIndex < index && other.type === "heading"); + const number = content.blocks.slice(sectionStart + 1, index + 1).filter((other) => other.type === "subheading").length; + checkBounds(block.text); + const options = { width, lineGap: 1.2 }; + document.font("FuturaDemi").fontSize(10.2).fillColor(colors.accent) + .text(`${number}. `, left, y, { ...options, continued: true }); + document.fillColor(colors.white).text(block.text, { ...options, continued: false }); + y = document.y + space.stepToBody; + checkBounds(block.text); } else if (block.type === "contact") { drawSectionHeading(block.text); const baseline = y + 10.5; @@ -115,6 +124,9 @@ for (const [index, block] of content.blocks.entries()) { drawBullet(block.text, content.blocks[index + 1]); } else if (block.type === "paragraph") { drawText(block.text); + } else if (block.type === "footnote") { + y += space.footnote; + drawText(block.text, { size: 7.4, color: "#889692", after: 0 }); } else { throw new Error(`Unknown partner content block type: ${block.type}`); }