Infographic
Title: "The Anatomy of a Great Credit Score"
- Header: A large, bold title with a graphic of a credit score dial.
- Key Points: Use icons and short text to represent each of the main takeaways.
- Data Viz: Include a pie chart showing the factors that make up a credit score (e.g., 35% Payment History).
- Footer: Your website/logo.
LinkedIn / X (Twitter) Carousel or Thread
Hook: "Your credit score is more than just a number. It's the key to your financial future. Here's a 5-part thread on how to improve it:"
${data.takeawayList.map((item, index) => `- Post ${index+1}/${data.takeawayList.length}: ${item}
`).join('')}
- Final Post: "Want a deep dive? I wrote a full guide on this. Link below."
Podcast Episode / Audiogram
Episode Title: "Demystifying Your Credit Score with [Your Name]"
- Talking Points: Use each takeaway as a discussion point.
- Expert Insight: Elaborate on why each point is important, providing real-world examples.
- Guest Spot: This topic is perfect for pitching yourself as a guest on personal finance podcasts.
`;
elements.outputContainer.innerHTML = ideasHTML;
};
const handleDownloadPdf = () => {
const { jsPDF } = window.jspdf;
if (!jsPDF) { console.error("jsPDF is not loaded."); return; }
const data = getFormData();
const doc = new jsPDF({ orientation: 'portrait', unit: 'in', format: 'letter' });
const margin = 0.75;
const pageWidth = doc.internal.pageSize.getWidth();
const usableWidth = pageWidth - (margin * 2);
let currentY = 0;
// --- PDF Header ---
doc.setFillColor('#ecfeff'); // cyan-50
doc.rect(0, 0, pageWidth, 1.25, 'F');
doc.setFont('helvetica', 'bold');
doc.setFontSize(20);
doc.setTextColor('#164e63'); // cyan-900
doc.text('Content Repurposing Strategy', margin, 0.7);
doc.setFontSize(10);
doc.setTextColor('#155e75'); // cyan-800
doc.text(new Date().toLocaleDateString('en-US'), pageWidth - margin, 0.7, { align: 'right' });
currentY = 1.6;
// --- Original Content Section ---
doc.setFont('helvetica', 'bold');
doc.setFontSize(11);
doc.setTextColor('#64748b'); // slate-500
doc.text('SOURCE CONTENT', margin, currentY);
doc.setLineWidth(0.01);
doc.setDrawColor('#cbd5e1'); // slate-300
doc.line(margin, currentY + 0.05, margin + 1.5, currentY + 0.05);
currentY += 0.3;
doc.setFontSize(12);
doc.setTextColor('#0f172a'); // slate-900
const titleLines = doc.splitTextToSize(data.blogTitle, usableWidth);
doc.text(titleLines, margin, currentY);
currentY += titleLines.length * 0.2 + 0.2;
// --- Function to add a repurposing idea card ---
const addIdeaCard = (title, points) => {
if (currentY > doc.internal.pageSize.getHeight() - 2) {
doc.addPage();
currentY = margin;
}
doc.setFont('helvetica', 'bold');
doc.setFontSize(12);
doc.setTextColor('#0891b2'); // cyan-600
doc.text(title, margin, currentY);
currentY += 0.25;
doc.setFont('times', 'normal');
doc.setFontSize(10);
doc.setTextColor('#334155'); // slate-700
points.forEach(point => {
const pointLines = doc.splitTextToSize(`• ${point}`, usableWidth - 0.2);
doc.text(pointLines, margin + 0.2, currentY);
currentY += pointLines.length * 0.18 + 0.05;
});
currentY += 0.2;
};
addIdeaCard('YouTube / Short-Form Video', [
'Hook: "Are you making these common credit mistakes? Fix them in 60 seconds."',
'Content: Cover 3 main takeaways with dynamic on-screen text.',
'CTA: "For all tips, check out the full blog post. Link in bio!"'
]);
addIdeaCard('Infographic', [
'Title: "The Anatomy of a Great Credit Score"',
'Key Points: Use icons and short text for each takeaway.',
'Data Viz: Include a pie chart of credit score factors (e.g., 35% Payment History).',
'Footer: Add your website/logo.'
]);
addIdeaCard('LinkedIn / X (Twitter) Thread', [
'Hook: "Your credit score is the key to your financial future. Here\'s a thread on how to improve it:"',
...data.takeawayList.map((item, index) => `Post ${index+1}/${data.takeawayList.length}: ${item}`),
'Final Post: "Want a deep dive? I wrote a full guide on this. Link below."'
]);
addIdeaCard('Podcast Episode', [
'Episode Title: "Demystifying Your Credit Score"',
'Talking Points: Use each takeaway as a discussion point with real-world examples.',
'Pitch Angle: Perfect topic for pitching yourself as a guest on personal finance podcasts.'
]);
doc.save('Content-Repurposing-Strategy.pdf');
};
// --- Event Listeners ---
elements.tabInput.addEventListener('click', () => switchTab('input'));
elements.tabIdeas.addEventListener('click', () => switchTab('ideas'));
elements.nextBtn.addEventListener('click', () => currentTab === 'input' && switchTab('ideas'));
elements.prevBtn.addEventListener('click', () => currentTab === 'ideas' && switchTab('input'));
elements.downloadPdfBtn.addEventListener('click', handleDownloadPdf);
});