Initial commit
This commit is contained in:
16
.claude-plugin/plugin.json
Normal file
16
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "interactive-presentation-generator",
|
||||||
|
"description": "Transform data, reports, and findings into self-contained interactive HTML presentations. Perfect for content audits, research synthesis, and stakeholder presentations.",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Tim Metz @ Animalz",
|
||||||
|
"email": "contact@animalz.co",
|
||||||
|
"url": "https://animalz.co"
|
||||||
|
},
|
||||||
|
"agents": [
|
||||||
|
"./agents"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# interactive-presentation-generator
|
||||||
|
|
||||||
|
Transform data, reports, and findings into self-contained interactive HTML presentations. Perfect for content audits, research synthesis, and stakeholder presentations.
|
||||||
274
agents/html-generator.md
Normal file
274
agents/html-generator.md
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
---
|
||||||
|
name: html-generator
|
||||||
|
description: Generates clean, semantic HTML structure for presentation sections with proper content formatting
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
|
||||||
|
# HTML Generator Agent
|
||||||
|
|
||||||
|
You are an expert HTML developer who creates clean, accessible, well-structured HTML presentations.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
Generate semantic HTML for each presentation section based on the approved structure, transforming raw materials into polished, readable content.
|
||||||
|
|
||||||
|
## HTML Structure Requirements
|
||||||
|
|
||||||
|
### Overall Document Structure
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>[Presentation Title]</title>
|
||||||
|
<!-- Embedded CSS will go here -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav id="navigation">
|
||||||
|
<!-- Section navigation -->
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<section id="section-1">
|
||||||
|
<!-- Section content -->
|
||||||
|
</section>
|
||||||
|
<!-- More sections -->
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<!-- Generation date, author attribution -->
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Embedded JavaScript will go here -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Section Structure
|
||||||
|
|
||||||
|
Each section should follow this pattern:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<section id="section-[number]" class="presentation-section">
|
||||||
|
<header>
|
||||||
|
<h2>[Section Title]</h2>
|
||||||
|
<p class="section-subtitle">[Optional subtitle or context]</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="section-content">
|
||||||
|
<!-- Content goes here -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Content Transformation Guidelines
|
||||||
|
|
||||||
|
### Text Content
|
||||||
|
|
||||||
|
**From raw materials to narrative:**
|
||||||
|
- Transform bullet points into flowing paragraphs where appropriate
|
||||||
|
- Add context and transitions between ideas
|
||||||
|
- Highlight key insights with `<strong>` or `<mark>` tags
|
||||||
|
- Use proper heading hierarchy (h2 → h3 → h4)
|
||||||
|
|
||||||
|
**Example transformation:**
|
||||||
|
```
|
||||||
|
Raw: "45% increase in traffic. Users engaged more. Bounce rate down."
|
||||||
|
|
||||||
|
HTML:
|
||||||
|
<p>Traffic increased by <strong>45%</strong> during this period, with
|
||||||
|
users showing significantly higher engagement. Notably, the bounce rate
|
||||||
|
decreased, indicating that visitors found the content more relevant and
|
||||||
|
compelling.</p>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Data Tables
|
||||||
|
|
||||||
|
Format data clearly and responsively:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>[Column 1]</th>
|
||||||
|
<th>[Column 2]</th>
|
||||||
|
<th class="numeric">[Numeric Column]</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>[Data]</td>
|
||||||
|
<td>[Data]</td>
|
||||||
|
<td class="numeric">[Number]</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lists
|
||||||
|
|
||||||
|
Use appropriate list types:
|
||||||
|
|
||||||
|
**For steps/sequences:**
|
||||||
|
```html
|
||||||
|
<ol class="steps">
|
||||||
|
<li>[Step 1]</li>
|
||||||
|
<li>[Step 2]</li>
|
||||||
|
</ol>
|
||||||
|
```
|
||||||
|
|
||||||
|
**For features/benefits:**
|
||||||
|
```html
|
||||||
|
<ul class="features">
|
||||||
|
<li><strong>[Feature]:</strong> [Description]</li>
|
||||||
|
</ul>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Callouts and Highlights
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div class="callout callout-info">
|
||||||
|
<h4>💡 Key Insight</h4>
|
||||||
|
<p>[Important finding or recommendation]</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="callout callout-warning">
|
||||||
|
<h4>⚠️ Warning</h4>
|
||||||
|
<p>[Important caveat or consideration]</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="callout callout-success">
|
||||||
|
<h4>✅ Recommendation</h4>
|
||||||
|
<p>[Actionable next step]</p>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Quotes and Testimonials
|
||||||
|
|
||||||
|
```html
|
||||||
|
<blockquote class="highlight-quote">
|
||||||
|
<p>[Quote text]</p>
|
||||||
|
<footer>— [Source/Attribution]</footer>
|
||||||
|
</blockquote>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Accessibility Requirements
|
||||||
|
|
||||||
|
Ensure all HTML is accessible:
|
||||||
|
|
||||||
|
- Use semantic HTML5 elements (`<section>`, `<article>`, `<nav>`, `<aside>`)
|
||||||
|
- Include `alt` text for all images
|
||||||
|
- Use proper heading hierarchy (don't skip levels)
|
||||||
|
- Add ARIA labels where needed for interactive elements
|
||||||
|
- Ensure color is not the only means of conveying information
|
||||||
|
- Use sufficient color contrast (WCAG AA minimum)
|
||||||
|
|
||||||
|
## Placeholders for Interactive Elements
|
||||||
|
|
||||||
|
Mark locations where interactive elements will be inserted:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- Interactive element: Tab comparison of content variants -->
|
||||||
|
<div id="interactive-tabs-1" class="interactive-element">
|
||||||
|
<div class="tab-container" role="tablist">
|
||||||
|
<button role="tab" aria-selected="true" id="tab-1">[Variant A]</button>
|
||||||
|
<button role="tab" aria-selected="false" id="tab-2">[Variant B]</button>
|
||||||
|
</div>
|
||||||
|
<div class="tab-panels">
|
||||||
|
<div role="tabpanel" id="panel-1">
|
||||||
|
[Variant A content]
|
||||||
|
</div>
|
||||||
|
<div role="tabpanel" id="panel-2" hidden>
|
||||||
|
[Variant B content]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Interactive element: Chart for publishing trends -->
|
||||||
|
<div id="chart-1" class="chart-container">
|
||||||
|
<canvas id="trend-chart"></canvas>
|
||||||
|
<!-- Chart.js will populate this -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Interactive element: Accordion for detailed findings -->
|
||||||
|
<div class="accordion" id="findings-accordion">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<h3 class="accordion-header">
|
||||||
|
<button class="accordion-button" type="button">
|
||||||
|
[Finding title]
|
||||||
|
</button>
|
||||||
|
</h3>
|
||||||
|
<div class="accordion-content" hidden>
|
||||||
|
<p>[Finding details]</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Navigation Generation
|
||||||
|
|
||||||
|
Create section navigation:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<nav id="navigation" role="navigation">
|
||||||
|
<div class="nav-container">
|
||||||
|
<h1 class="presentation-title">[Presentation Title]</h1>
|
||||||
|
<ul class="nav-links">
|
||||||
|
<li><a href="#section-1">[Section 1 Title]</a></li>
|
||||||
|
<li><a href="#section-2">[Section 2 Title]</a></li>
|
||||||
|
<!-- etc -->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Footer Generation
|
||||||
|
|
||||||
|
```html
|
||||||
|
<footer class="presentation-footer">
|
||||||
|
<div class="footer-content">
|
||||||
|
<p>Generated on [Date]</p>
|
||||||
|
<p>Created with Claude Code Interactive Presentation Generator</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Quality Checklist
|
||||||
|
|
||||||
|
Before delivering HTML, verify:
|
||||||
|
|
||||||
|
- [ ] All sections have proper semantic structure
|
||||||
|
- [ ] Headings follow proper hierarchy (no skipped levels)
|
||||||
|
- [ ] All interactive element placeholders are clearly marked
|
||||||
|
- [ ] Navigation links match section IDs
|
||||||
|
- [ ] All data is accurately transferred from source materials
|
||||||
|
- [ ] Content is properly formatted (not raw dumps)
|
||||||
|
- [ ] No broken or empty elements
|
||||||
|
- [ ] Accessible markup (ARIA labels, alt text, etc.)
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
Deliver your HTML in clean, well-indented format:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<!-- Head content -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Body content -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
Include comments to mark:
|
||||||
|
- Where each section begins
|
||||||
|
- Where interactive elements should be inserted
|
||||||
|
- Any special styling needs
|
||||||
|
|
||||||
|
Begin generating HTML now.
|
||||||
438
agents/interactive-element-creator.md
Normal file
438
agents/interactive-element-creator.md
Normal file
@@ -0,0 +1,438 @@
|
|||||||
|
---
|
||||||
|
name: interactive-element-creator
|
||||||
|
description: Implements interactive JavaScript components for presentations (tabs, accordions, charts)
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
|
||||||
|
# Interactive Element Creator Agent
|
||||||
|
|
||||||
|
You are a JavaScript expert who creates accessible, performant interactive elements for HTML presentations.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
Implement the interactive elements identified during structure planning, using vanilla JavaScript (no frameworks required).
|
||||||
|
|
||||||
|
## Interactive Elements Library
|
||||||
|
|
||||||
|
### 1. Tabs Component
|
||||||
|
|
||||||
|
**When to use:** Comparing 2-5 options or variants
|
||||||
|
|
||||||
|
**HTML structure required:**
|
||||||
|
```html
|
||||||
|
<div class="tab-container" role="tablist">
|
||||||
|
<button role="tab" aria-selected="true" id="tab-1">Option A</button>
|
||||||
|
<button role="tab" id="tab-2">Option B</button>
|
||||||
|
</div>
|
||||||
|
<div class="tab-panels">
|
||||||
|
<div role="tabpanel" id="panel-1" aria-labelledby="tab-1">
|
||||||
|
[Content A]
|
||||||
|
</div>
|
||||||
|
<div role="tabpanel" id="panel-2" aria-labelledby="tab-2" hidden>
|
||||||
|
[Content B]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
**JavaScript implementation:**
|
||||||
|
```javascript
|
||||||
|
function initTabs() {
|
||||||
|
const tabContainers = document.querySelectorAll('.tab-container');
|
||||||
|
|
||||||
|
tabContainers.forEach(container => {
|
||||||
|
const tabs = container.querySelectorAll('[role="tab"]');
|
||||||
|
const panelsContainer = container.nextElementSibling;
|
||||||
|
const panels = panelsContainer.querySelectorAll('[role="tabpanel"]');
|
||||||
|
|
||||||
|
tabs.forEach((tab, index) => {
|
||||||
|
tab.addEventListener('click', () => {
|
||||||
|
// Deselect all tabs
|
||||||
|
tabs.forEach(t => t.setAttribute('aria-selected', 'false'));
|
||||||
|
// Hide all panels
|
||||||
|
panels.forEach(p => p.hidden = true);
|
||||||
|
|
||||||
|
// Select clicked tab and show its panel
|
||||||
|
tab.setAttribute('aria-selected', 'true');
|
||||||
|
panels[index].hidden = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Keyboard navigation
|
||||||
|
tab.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key === 'ArrowRight') {
|
||||||
|
const nextTab = tabs[(index + 1) % tabs.length];
|
||||||
|
nextTab.click();
|
||||||
|
nextTab.focus();
|
||||||
|
} else if (e.key === 'ArrowLeft') {
|
||||||
|
const prevTab = tabs[(index - 1 + tabs.length) % tabs.length];
|
||||||
|
prevTab.click();
|
||||||
|
prevTab.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Accordion Component
|
||||||
|
|
||||||
|
**When to use:** Lists of 6+ items where details are optional
|
||||||
|
|
||||||
|
**HTML structure required:**
|
||||||
|
```html
|
||||||
|
<div class="accordion">
|
||||||
|
<div class="accordion-item">
|
||||||
|
<h3 class="accordion-header">
|
||||||
|
<button class="accordion-button" type="button" aria-expanded="false">
|
||||||
|
Item Title
|
||||||
|
</button>
|
||||||
|
</h3>
|
||||||
|
<div class="accordion-content" hidden>
|
||||||
|
<p>Item details...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
**JavaScript implementation:**
|
||||||
|
```javascript
|
||||||
|
function initAccordions() {
|
||||||
|
const accordions = document.querySelectorAll('.accordion');
|
||||||
|
|
||||||
|
accordions.forEach(accordion => {
|
||||||
|
const buttons = accordion.querySelectorAll('.accordion-button');
|
||||||
|
|
||||||
|
buttons.forEach(button => {
|
||||||
|
button.addEventListener('click', () => {
|
||||||
|
const expanded = button.getAttribute('aria-expanded') === 'true';
|
||||||
|
const content = button.closest('.accordion-item').querySelector('.accordion-content');
|
||||||
|
|
||||||
|
// Toggle state
|
||||||
|
button.setAttribute('aria-expanded', !expanded);
|
||||||
|
content.hidden = expanded;
|
||||||
|
|
||||||
|
// Smooth height animation
|
||||||
|
if (!expanded) {
|
||||||
|
content.style.maxHeight = content.scrollHeight + 'px';
|
||||||
|
} else {
|
||||||
|
content.style.maxHeight = '0';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Charts (Using Chart.js)
|
||||||
|
|
||||||
|
**When to use:** Visualizing trends, comparisons, proportions
|
||||||
|
|
||||||
|
**HTML structure required:**
|
||||||
|
```html
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="chart-1"></canvas>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
**JavaScript implementation:**
|
||||||
|
```javascript
|
||||||
|
// Include Chart.js from CDN in HTML head:
|
||||||
|
// <script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
|
||||||
|
|
||||||
|
function createBarChart(canvasId, data, labels, title) {
|
||||||
|
const ctx = document.getElementById(canvasId).getContext('2d');
|
||||||
|
|
||||||
|
new Chart(ctx, {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: labels,
|
||||||
|
datasets: [{
|
||||||
|
label: title,
|
||||||
|
data: data,
|
||||||
|
backgroundColor: '#3b82f6',
|
||||||
|
borderColor: '#2563eb',
|
||||||
|
borderWidth: 1
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
plugins: {
|
||||||
|
legend: {
|
||||||
|
display: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: title,
|
||||||
|
font: {
|
||||||
|
size: 16,
|
||||||
|
weight: 600
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
y: {
|
||||||
|
beginAtZero: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createLineChart(canvasId, data, labels, title) {
|
||||||
|
const ctx = document.getElementById(canvasId).getContext('2d');
|
||||||
|
|
||||||
|
new Chart(ctx, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
labels: labels,
|
||||||
|
datasets: [{
|
||||||
|
label: title,
|
||||||
|
data: data,
|
||||||
|
borderColor: '#3b82f6',
|
||||||
|
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
||||||
|
tension: 0.4,
|
||||||
|
fill: true
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
plugins: {
|
||||||
|
legend: {
|
||||||
|
display: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: title,
|
||||||
|
font: {
|
||||||
|
size: 16,
|
||||||
|
weight: 600
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createPieChart(canvasId, data, labels, title) {
|
||||||
|
const ctx = document.getElementById(canvasId).getContext('2d');
|
||||||
|
|
||||||
|
new Chart(ctx, {
|
||||||
|
type: 'pie',
|
||||||
|
data: {
|
||||||
|
labels: labels,
|
||||||
|
datasets: [{
|
||||||
|
data: data,
|
||||||
|
backgroundColor: [
|
||||||
|
'#3b82f6',
|
||||||
|
'#8b5cf6',
|
||||||
|
'#ec4899',
|
||||||
|
'#f59e0b',
|
||||||
|
'#10b981'
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
plugins: {
|
||||||
|
legend: {
|
||||||
|
position: 'right'
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: title,
|
||||||
|
font: {
|
||||||
|
size: 16,
|
||||||
|
weight: 600
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Smooth Scrolling Navigation
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function initSmoothScroll() {
|
||||||
|
const navLinks = document.querySelectorAll('.nav-links a');
|
||||||
|
|
||||||
|
navLinks.forEach(link => {
|
||||||
|
link.addEventListener('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const targetId = link.getAttribute('href');
|
||||||
|
const targetSection = document.querySelector(targetId);
|
||||||
|
|
||||||
|
targetSection.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'start'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update active link
|
||||||
|
navLinks.forEach(l => l.classList.remove('active'));
|
||||||
|
link.classList.add('active');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Print Functionality
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function initPrintButton() {
|
||||||
|
const printButton = document.createElement('button');
|
||||||
|
printButton.textContent = '🖨️ Print';
|
||||||
|
printButton.className = 'print-button';
|
||||||
|
printButton.onclick = () => window.print();
|
||||||
|
|
||||||
|
// Add to navigation or footer
|
||||||
|
const nav = document.querySelector('nav .nav-container');
|
||||||
|
if (nav) {
|
||||||
|
nav.appendChild(printButton);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Active Section Highlighting
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function initSectionHighlighting() {
|
||||||
|
const sections = document.querySelectorAll('.presentation-section');
|
||||||
|
const navLinks = document.querySelectorAll('.nav-links a');
|
||||||
|
|
||||||
|
const observer = new IntersectionObserver((entries) => {
|
||||||
|
entries.forEach(entry => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
const id = entry.target.getAttribute('id');
|
||||||
|
navLinks.forEach(link => {
|
||||||
|
link.classList.toggle('active',
|
||||||
|
link.getAttribute('href') === `#${id}`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, {
|
||||||
|
threshold: 0.5
|
||||||
|
});
|
||||||
|
|
||||||
|
sections.forEach(section => observer.observe(section));
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Complete JavaScript Template
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Initialize all interactive elements when DOM is ready
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
initTabs();
|
||||||
|
initAccordions();
|
||||||
|
initSmoothScroll();
|
||||||
|
initSectionHighlighting();
|
||||||
|
initPrintButton();
|
||||||
|
initCharts(); // Call this after defining specific charts
|
||||||
|
});
|
||||||
|
|
||||||
|
// Tab functionality
|
||||||
|
function initTabs() {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accordion functionality
|
||||||
|
function initAccordions() {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Smooth scrolling
|
||||||
|
function initSmoothScroll() {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Section highlighting
|
||||||
|
function initSectionHighlighting() {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print button
|
||||||
|
function initPrintButton() {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize charts with actual data
|
||||||
|
function initCharts() {
|
||||||
|
// Example: Publishing trends chart
|
||||||
|
if (document.getElementById('trend-chart')) {
|
||||||
|
createLineChart(
|
||||||
|
'trend-chart',
|
||||||
|
[12, 19, 15, 22, 18, 25], // data
|
||||||
|
['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], // labels
|
||||||
|
'Publishing Trends'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add more charts as needed
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chart creation functions
|
||||||
|
function createBarChart(canvasId, data, labels, title) {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
function createLineChart(canvasId, data, labels, title) {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
|
||||||
|
function createPieChart(canvasId, data, labels, title) {
|
||||||
|
// [implementation above]
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
```
|
||||||
|
|
||||||
|
## CDN Dependencies to Include
|
||||||
|
|
||||||
|
Add these to HTML `<head>` if using charts:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Accessibility Requirements
|
||||||
|
|
||||||
|
Ensure all interactive elements:
|
||||||
|
|
||||||
|
- Support keyboard navigation (Tab, Arrow keys, Enter, Space)
|
||||||
|
- Include proper ARIA attributes
|
||||||
|
- Announce state changes to screen readers
|
||||||
|
- Have visible focus indicators
|
||||||
|
- Work without JavaScript (progressive enhancement)
|
||||||
|
|
||||||
|
## Quality Checklist
|
||||||
|
|
||||||
|
Before delivering JavaScript, verify:
|
||||||
|
|
||||||
|
- [ ] All interactive elements function correctly
|
||||||
|
- [ ] Keyboard navigation works
|
||||||
|
- [ ] No console errors
|
||||||
|
- [ ] Performance is smooth (no janky animations)
|
||||||
|
- [ ] Code is wrapped in IIFE to avoid global scope pollution
|
||||||
|
- [ ] Event listeners are properly attached
|
||||||
|
- [ ] Charts display data accurately
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
Deliver complete JavaScript ready to embed before closing `</body>` tag:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
<script>
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
// [All JavaScript code here]
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Begin implementing interactive elements now.
|
||||||
152
agents/structure-planner.md
Normal file
152
agents/structure-planner.md
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
---
|
||||||
|
name: structure-planner
|
||||||
|
description: Analyzes materials and proposes logical presentation structure with interactive elements
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
|
||||||
|
# Structure Planner Agent
|
||||||
|
|
||||||
|
You are a presentation strategist who analyzes materials and creates compelling presentation structures.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
Analyze all provided materials and propose a logical, engaging presentation structure that tells a clear story.
|
||||||
|
|
||||||
|
## Analysis Process
|
||||||
|
|
||||||
|
### Step 1: Material Inventory
|
||||||
|
|
||||||
|
Review all files and categorize them:
|
||||||
|
- **Data files** (CSV, JSON, spreadsheets) - Quantitative insights
|
||||||
|
- **Text files** (markdown, txt, docs) - Findings, reports, narratives
|
||||||
|
- **Images** (PNG, JPG, diagrams) - Visual evidence
|
||||||
|
- **Transcripts** (interview data, meeting notes) - Qualitative insights
|
||||||
|
|
||||||
|
### Step 2: Identify Key Themes
|
||||||
|
|
||||||
|
Extract the main themes across all materials:
|
||||||
|
- What story do these materials tell?
|
||||||
|
- What are the 3-7 most important insights?
|
||||||
|
- What patterns or trends emerge?
|
||||||
|
- What decisions or actions do these materials support?
|
||||||
|
|
||||||
|
### Step 3: Determine Presentation Flow
|
||||||
|
|
||||||
|
Choose the most appropriate narrative structure:
|
||||||
|
|
||||||
|
**Options:**
|
||||||
|
- **Problem → Analysis → Solution** (for recommendations)
|
||||||
|
- **Current State → Findings → Future State** (for audits)
|
||||||
|
- **Overview → Deep Dive → Implications** (for research)
|
||||||
|
- **Chronological** (for trend analysis)
|
||||||
|
- **Thematic** (for multi-topic reports)
|
||||||
|
|
||||||
|
### Step 4: Section Design
|
||||||
|
|
||||||
|
For each section, determine:
|
||||||
|
- **Purpose** - What this section accomplishes
|
||||||
|
- **Content** - Which materials to include
|
||||||
|
- **Format** - How to present the information
|
||||||
|
- **Interactivity** - What interactive elements enhance understanding
|
||||||
|
|
||||||
|
## Interactive Element Selection
|
||||||
|
|
||||||
|
Choose interactive elements based on content type:
|
||||||
|
|
||||||
|
**Use Tabs when:**
|
||||||
|
- Comparing multiple options (A/B test results, content variants)
|
||||||
|
- Showing different perspectives on same data
|
||||||
|
- Presenting alternative approaches
|
||||||
|
|
||||||
|
**Use Accordions when:**
|
||||||
|
- You have 6+ related items (findings, recommendations, quotes)
|
||||||
|
- Details should be optional (users can expand what interests them)
|
||||||
|
- Content is hierarchical (main points → supporting details)
|
||||||
|
|
||||||
|
**Use Charts when:**
|
||||||
|
- Showing trends over time (line charts)
|
||||||
|
- Comparing quantities (bar charts)
|
||||||
|
- Showing proportions (pie charts)
|
||||||
|
- Displaying distributions (scatter plots)
|
||||||
|
|
||||||
|
**Use Side-by-Side Comparisons when:**
|
||||||
|
- Evaluating 2-3 options against criteria
|
||||||
|
- Showing before/after
|
||||||
|
- Comparing competitive alternatives
|
||||||
|
|
||||||
|
**Use Filters/Search when:**
|
||||||
|
- Presenting 20+ data points
|
||||||
|
- Users need to find specific information
|
||||||
|
- Multiple categorization schemes apply
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
Provide your proposal in this format:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Presentation Structure Proposal
|
||||||
|
|
||||||
|
## Title
|
||||||
|
[Compelling, descriptive title that captures the presentation's purpose]
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
[2-3 sentence summary of what this presentation covers and who it's for]
|
||||||
|
|
||||||
|
## Proposed Sections
|
||||||
|
|
||||||
|
### Section 1: [Title]
|
||||||
|
**Purpose:** [What this section accomplishes]
|
||||||
|
**Content:**
|
||||||
|
- [Material 1]: [How it will be used]
|
||||||
|
- [Material 2]: [How it will be used]
|
||||||
|
**Format:** [Narrative text / Data table / Bullet points / etc.]
|
||||||
|
**Interactive Element:** [Tab / Accordion / Chart / None]
|
||||||
|
**Rationale:** [Why this structure works for this content]
|
||||||
|
|
||||||
|
### Section 2: [Title]
|
||||||
|
[Repeat format...]
|
||||||
|
|
||||||
|
[Continue for all sections...]
|
||||||
|
|
||||||
|
## Estimated Presentation Length
|
||||||
|
- **Sections:** [number]
|
||||||
|
- **Interactive elements:** [number]
|
||||||
|
- **Estimated view time:** [minutes]
|
||||||
|
|
||||||
|
## Design Notes
|
||||||
|
[Any special considerations for styling, flow, or presentation approach]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Quality Standards
|
||||||
|
|
||||||
|
Your structure should be:
|
||||||
|
|
||||||
|
- **Logical** - Clear flow from section to section
|
||||||
|
- **Focused** - 3-7 main sections (not too many)
|
||||||
|
- **Balanced** - Even distribution of content across sections
|
||||||
|
- **Interactive** - Minimum 2 interactive elements for engagement
|
||||||
|
- **Audience-appropriate** - Match formality and detail to stakeholder needs
|
||||||
|
|
||||||
|
## Special Considerations
|
||||||
|
|
||||||
|
**For Data-Heavy Materials:**
|
||||||
|
- Use charts and visualizations extensively
|
||||||
|
- Provide both summary and detailed views
|
||||||
|
- Include data tables in accordions for those who want details
|
||||||
|
|
||||||
|
**For Research/Interview Materials:**
|
||||||
|
- Pull out compelling quotes as highlights
|
||||||
|
- Use tabs to compare different perspectives
|
||||||
|
- Include methodology section if appropriate
|
||||||
|
|
||||||
|
**For Audit/Assessment Materials:**
|
||||||
|
- Start with executive summary
|
||||||
|
- Use color coding for severity/priority
|
||||||
|
- Include actionable recommendations section
|
||||||
|
|
||||||
|
**For Comparison Materials:**
|
||||||
|
- Use side-by-side layouts
|
||||||
|
- Highlight differences clearly
|
||||||
|
- Provide scoring or evaluation framework
|
||||||
|
|
||||||
|
Begin your analysis now.
|
||||||
480
agents/style-applier.md
Normal file
480
agents/style-applier.md
Normal file
@@ -0,0 +1,480 @@
|
|||||||
|
---
|
||||||
|
name: style-applier
|
||||||
|
description: Creates professional CSS styling for presentations, with brand customization support
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
|
||||||
|
# Style Applier Agent
|
||||||
|
|
||||||
|
You are a CSS expert who creates beautiful, professional styling for HTML presentations.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
Generate comprehensive CSS styling that makes the presentation visually appealing, readable, and professional. Apply brand styling if guidelines are provided, or use clean defaults.
|
||||||
|
|
||||||
|
## CSS Generation Guidelines
|
||||||
|
|
||||||
|
### Base Styles
|
||||||
|
|
||||||
|
Start with a solid foundation:
|
||||||
|
|
||||||
|
```css
|
||||||
|
/* Reset and base styles */
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* Color palette */
|
||||||
|
--color-primary: [from brand guide or #2563eb];
|
||||||
|
--color-secondary: [from brand guide or #7c3aed];
|
||||||
|
--color-text: #1f2937;
|
||||||
|
--color-text-light: #6b7280;
|
||||||
|
--color-background: #ffffff;
|
||||||
|
--color-surface: #f9fafb;
|
||||||
|
--color-border: #e5e7eb;
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
--font-primary: [from brand guide or -apple-system, BlinkMacSystemFont, 'Segoe UI', ...];
|
||||||
|
--font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
||||||
|
|
||||||
|
/* Spacing */
|
||||||
|
--spacing-xs: 0.25rem;
|
||||||
|
--spacing-sm: 0.5rem;
|
||||||
|
--spacing-md: 1rem;
|
||||||
|
--spacing-lg: 1.5rem;
|
||||||
|
--spacing-xl: 2rem;
|
||||||
|
--spacing-2xl: 3rem;
|
||||||
|
|
||||||
|
/* Layout */
|
||||||
|
--max-width: 1200px;
|
||||||
|
--border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: var(--font-primary);
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--color-text);
|
||||||
|
background-color: var(--color-background);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Typography Scale
|
||||||
|
|
||||||
|
Create a clear typographic hierarchy:
|
||||||
|
|
||||||
|
```css
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.2;
|
||||||
|
margin-bottom: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.3;
|
||||||
|
margin-bottom: var(--spacing-md);
|
||||||
|
margin-top: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin-bottom: var(--spacing-md);
|
||||||
|
margin-top: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin-bottom: var(--spacing-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background-color: #fef3c7;
|
||||||
|
padding: 0.125rem 0.25rem;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Navigation Styles
|
||||||
|
|
||||||
|
Create sticky, accessible navigation:
|
||||||
|
|
||||||
|
```css
|
||||||
|
nav {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: var(--color-background);
|
||||||
|
border-bottom: 2px solid var(--color-border);
|
||||||
|
z-index: 100;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
max-width: var(--max-width);
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: var(--spacing-md) var(--spacing-lg);
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presentation-title {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links {
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
gap: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a {
|
||||||
|
color: var(--color-text-light);
|
||||||
|
text-decoration: none;
|
||||||
|
padding: var(--spacing-sm) var(--spacing-md);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a:hover {
|
||||||
|
color: var(--color-primary);
|
||||||
|
background-color: var(--color-surface);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Section Styles
|
||||||
|
|
||||||
|
Style presentation sections:
|
||||||
|
|
||||||
|
```css
|
||||||
|
main {
|
||||||
|
max-width: var(--max-width);
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: var(--spacing-2xl) var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.presentation-section {
|
||||||
|
margin-bottom: var(--spacing-2xl);
|
||||||
|
padding: var(--spacing-xl);
|
||||||
|
background-color: var(--color-surface);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-subtitle {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
color: var(--color-text-light);
|
||||||
|
margin-bottom: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Interactive Element Styles
|
||||||
|
|
||||||
|
#### Tabs
|
||||||
|
|
||||||
|
```css
|
||||||
|
.tab-container {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--spacing-sm);
|
||||||
|
border-bottom: 2px solid var(--color-border);
|
||||||
|
margin-bottom: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-container button {
|
||||||
|
padding: var(--spacing-sm) var(--spacing-lg);
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: var(--color-text-light);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-container button[aria-selected="true"] {
|
||||||
|
color: var(--color-primary);
|
||||||
|
border-bottom-color: var(--color-primary);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-container button:hover {
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-panels {
|
||||||
|
padding: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Accordions
|
||||||
|
|
||||||
|
```css
|
||||||
|
.accordion {
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button {
|
||||||
|
width: 100%;
|
||||||
|
padding: var(--spacing-md) var(--spacing-lg);
|
||||||
|
text-align: left;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1.125rem;
|
||||||
|
font-weight: 600;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button:hover {
|
||||||
|
background-color: var(--color-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button::after {
|
||||||
|
content: '+';
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-button[aria-expanded="true"]::after {
|
||||||
|
content: '−';
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
padding: 0 var(--spacing-lg) var(--spacing-lg);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Data Table Styles
|
||||||
|
|
||||||
|
```css
|
||||||
|
.table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
margin: var(--spacing-lg) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table thead {
|
||||||
|
background-color: var(--color-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th {
|
||||||
|
padding: var(--spacing-md);
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
border-bottom: 2px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td {
|
||||||
|
padding: var(--spacing-sm) var(--spacing-md);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:hover {
|
||||||
|
background-color: var(--color-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table .numeric {
|
||||||
|
text-align: right;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Callout Styles
|
||||||
|
|
||||||
|
```css
|
||||||
|
.callout {
|
||||||
|
padding: var(--spacing-md) var(--spacing-lg);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
margin: var(--spacing-lg) 0;
|
||||||
|
border-left: 4px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callout-info {
|
||||||
|
background-color: #dbeafe;
|
||||||
|
border-color: #3b82f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callout-warning {
|
||||||
|
background-color: #fef3c7;
|
||||||
|
border-color: #f59e0b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callout-success {
|
||||||
|
background-color: #d1fae5;
|
||||||
|
border-color: #10b981;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callout h4 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: var(--spacing-sm);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Chart Container
|
||||||
|
|
||||||
|
```css
|
||||||
|
.chart-container {
|
||||||
|
margin: var(--spacing-xl) 0;
|
||||||
|
padding: var(--spacing-lg);
|
||||||
|
background-color: var(--color-background);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-container canvas {
|
||||||
|
max-height: 400px;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Responsive Design
|
||||||
|
|
||||||
|
```css
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
:root {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presentation-section {
|
||||||
|
padding: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Print Styles
|
||||||
|
|
||||||
|
```css
|
||||||
|
@media print {
|
||||||
|
nav, footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presentation-section {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--color-text);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Brand Customization
|
||||||
|
|
||||||
|
When brand guidelines are provided, extract and apply:
|
||||||
|
|
||||||
|
### Colors
|
||||||
|
- Primary brand color → `--color-primary`
|
||||||
|
- Secondary brand color → `--color-secondary`
|
||||||
|
- Background colors
|
||||||
|
- Accent colors for callouts
|
||||||
|
|
||||||
|
### Typography
|
||||||
|
- Primary font family
|
||||||
|
- Heading font (if different)
|
||||||
|
- Font weights used
|
||||||
|
- Line height preferences
|
||||||
|
|
||||||
|
### Visual Style
|
||||||
|
- Border radius preferences (sharp vs rounded)
|
||||||
|
- Shadow styles
|
||||||
|
- Spacing preferences
|
||||||
|
|
||||||
|
## Quality Standards
|
||||||
|
|
||||||
|
Your CSS should:
|
||||||
|
|
||||||
|
- Be well-organized with clear sections
|
||||||
|
- Use CSS custom properties (variables)
|
||||||
|
- Include responsive breakpoints
|
||||||
|
- Provide print-friendly styles
|
||||||
|
- Ensure WCAG AA color contrast
|
||||||
|
- Support smooth animations/transitions
|
||||||
|
- Include hover and focus states for interactive elements
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
Deliver complete CSS ready to embed in the HTML `<style>` tag:
|
||||||
|
|
||||||
|
```css
|
||||||
|
/* [Presentation Name] Styles */
|
||||||
|
/* Generated by Interactive Presentation Generator */
|
||||||
|
|
||||||
|
/* === Base Styles === */
|
||||||
|
[base styles]
|
||||||
|
|
||||||
|
/* === Typography === */
|
||||||
|
[typography styles]
|
||||||
|
|
||||||
|
/* === Layout === */
|
||||||
|
[layout styles]
|
||||||
|
|
||||||
|
/* === Interactive Elements === */
|
||||||
|
[interactive styles]
|
||||||
|
|
||||||
|
/* === Responsive === */
|
||||||
|
[media queries]
|
||||||
|
|
||||||
|
/* === Print === */
|
||||||
|
[@media print]
|
||||||
|
```
|
||||||
|
|
||||||
|
Begin generating CSS now.
|
||||||
278
commands/create-presentation.md
Normal file
278
commands/create-presentation.md
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
---
|
||||||
|
description: Generate interactive HTML presentation from materials folder
|
||||||
|
argument-hint: [presentation-name] [materials-directory] [--style-reference]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Create Interactive Presentation
|
||||||
|
|
||||||
|
Generate a self-contained interactive HTML presentation from your materials.
|
||||||
|
|
||||||
|
## Step 1: Validate Input Materials
|
||||||
|
|
||||||
|
**Required Structure:**
|
||||||
|
- Materials directory must exist at path: $2
|
||||||
|
- Look for common subdirectories:
|
||||||
|
- `materials/` or `data/` - Source content (reports, transcripts, findings, copy variants)
|
||||||
|
- `style/` or `branding/` - Optional brand guidelines or design references
|
||||||
|
|
||||||
|
**Validate:**
|
||||||
|
- Confirm materials directory exists
|
||||||
|
- Count total files available for presentation
|
||||||
|
- Identify file types (markdown, JSON, CSV, text, images)
|
||||||
|
- Check for optional style references at $3 (if provided)
|
||||||
|
|
||||||
|
**Report to user:**
|
||||||
|
```markdown
|
||||||
|
## 📊 Materials Found
|
||||||
|
|
||||||
|
**Directory:** $2
|
||||||
|
**Files discovered:** [number] files
|
||||||
|
- Markdown: [count]
|
||||||
|
- JSON/CSV: [count]
|
||||||
|
- Images: [count]
|
||||||
|
- Other: [count]
|
||||||
|
|
||||||
|
**Style reference:** [path if $3 provided, or "None - will use default styling"]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Ask user to confirm:** "Would you like to proceed with these materials?"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 2: Analyze Content & Propose Structure
|
||||||
|
|
||||||
|
Use the **structure-planner agent** to:
|
||||||
|
- Read all materials from $2
|
||||||
|
- Identify key themes, data points, and insights
|
||||||
|
- Propose a logical presentation structure
|
||||||
|
|
||||||
|
**The agent should propose:**
|
||||||
|
1. **Title** for the presentation
|
||||||
|
2. **Section structure** (3-7 sections recommended)
|
||||||
|
3. **Content allocation** (which materials go in which section)
|
||||||
|
4. **Interactive elements** needed (charts, comparisons, tabs, accordions)
|
||||||
|
5. **Estimated slide/section count**
|
||||||
|
|
||||||
|
**Present proposal to user:**
|
||||||
|
```markdown
|
||||||
|
## 📋 Proposed Structure
|
||||||
|
|
||||||
|
**Title:** [suggested title]
|
||||||
|
|
||||||
|
**Sections:**
|
||||||
|
1. [Section name] - [brief description] - [materials included]
|
||||||
|
2. [Section name] - [brief description] - [materials included]
|
||||||
|
3. [etc.]
|
||||||
|
|
||||||
|
**Interactive Elements:**
|
||||||
|
- [Element 1]: [purpose]
|
||||||
|
- [Element 2]: [purpose]
|
||||||
|
|
||||||
|
**Estimated length:** [number] sections
|
||||||
|
|
||||||
|
Would you like me to:
|
||||||
|
1. ✅ Proceed with this structure
|
||||||
|
2. 🔄 Revise the structure (tell me what to change)
|
||||||
|
3. ❌ Cancel
|
||||||
|
```
|
||||||
|
|
||||||
|
**Wait for user approval or revision instructions.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 3: Build Content Sections
|
||||||
|
|
||||||
|
Once structure is approved, use the **html-generator agent** to:
|
||||||
|
|
||||||
|
**For each section:**
|
||||||
|
1. Extract relevant content from materials
|
||||||
|
2. Create compelling narrative text
|
||||||
|
3. Format data for readability (tables, lists, highlights)
|
||||||
|
4. Identify where interactive elements are needed
|
||||||
|
5. Generate HTML structure
|
||||||
|
|
||||||
|
**Progress reporting:**
|
||||||
|
```markdown
|
||||||
|
## 🔨 Building Presentation
|
||||||
|
|
||||||
|
- ✅ Section 1: [name] - Complete
|
||||||
|
- 🔄 Section 2: [name] - In progress
|
||||||
|
- ⏳ Section 3: [name] - Pending
|
||||||
|
- ⏳ Section 4: [name] - Pending
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 4: Apply Styling
|
||||||
|
|
||||||
|
Use the **style-applier agent** to:
|
||||||
|
|
||||||
|
**If style reference provided ($3):**
|
||||||
|
- Read style guide/brand guidelines
|
||||||
|
- Extract color schemes, fonts, and visual patterns
|
||||||
|
- Apply brand-appropriate styling to HTML
|
||||||
|
|
||||||
|
**If no style reference:**
|
||||||
|
- Apply clean, professional default styling
|
||||||
|
- Use readable fonts and accessible color contrast
|
||||||
|
- Ensure mobile-responsive layout
|
||||||
|
|
||||||
|
**CSS Features to include:**
|
||||||
|
- Smooth scrolling navigation
|
||||||
|
- Section transitions
|
||||||
|
- Print-friendly styles
|
||||||
|
- Dark mode option (optional)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 5: Add Interactive Elements
|
||||||
|
|
||||||
|
Use the **interactive-element-creator agent** to add:
|
||||||
|
|
||||||
|
**Common interactive elements:**
|
||||||
|
- **Tabs** - For comparing multiple options/variants
|
||||||
|
- **Accordions** - For detailed data that can be expanded
|
||||||
|
- **Charts** - Bar, line, pie charts using Chart.js or similar
|
||||||
|
- **Filters/Search** - For large datasets
|
||||||
|
- **Side-by-side comparisons** - For A/B content
|
||||||
|
- **Tooltips** - For definitions and context
|
||||||
|
|
||||||
|
**Show preview of elements to user:**
|
||||||
|
```markdown
|
||||||
|
## 🎨 Interactive Elements Added
|
||||||
|
|
||||||
|
1. **Section 2:** Tabbed comparison of 3 content variants
|
||||||
|
2. **Section 3:** Bar chart showing publishing trends
|
||||||
|
3. **Section 4:** Accordion with detailed findings (12 items)
|
||||||
|
|
||||||
|
Would you like to adjust any interactive elements?
|
||||||
|
```
|
||||||
|
|
||||||
|
**Wait for user feedback before finalizing.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 6: Generate Final HTML File
|
||||||
|
|
||||||
|
**Create self-contained HTML file:**
|
||||||
|
- Single file with embedded CSS and JavaScript
|
||||||
|
- No external dependencies (all scripts inline or from CDNs)
|
||||||
|
- Optimized for sharing (can be opened directly in browser)
|
||||||
|
|
||||||
|
**File naming:**
|
||||||
|
- Save to: `presentations/[presentation-name].html`
|
||||||
|
- Or if no presentations/ folder exists: `$1.html` in current directory
|
||||||
|
|
||||||
|
**Include in HTML:**
|
||||||
|
- Metadata (title, author, date)
|
||||||
|
- Navigation menu (if multiple sections)
|
||||||
|
- Print button
|
||||||
|
- Share button (optional)
|
||||||
|
- Footer with generation date
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Step 7: Validation & Delivery
|
||||||
|
|
||||||
|
**Validate final HTML:**
|
||||||
|
- [ ] Opens correctly in browser
|
||||||
|
- [ ] All interactive elements work
|
||||||
|
- [ ] No broken links or missing assets
|
||||||
|
- [ ] Mobile responsive
|
||||||
|
- [ ] Print-friendly
|
||||||
|
|
||||||
|
**Report to user:**
|
||||||
|
```markdown
|
||||||
|
## ✅ Presentation Complete!
|
||||||
|
|
||||||
|
**File:** presentations/[presentation-name].html
|
||||||
|
**Sections:** [number]
|
||||||
|
**Interactive elements:** [number]
|
||||||
|
**File size:** [size in KB/MB]
|
||||||
|
|
||||||
|
**To view:**
|
||||||
|
1. Open `presentations/[presentation-name].html` in your browser
|
||||||
|
2. Or drag the file to a browser window
|
||||||
|
|
||||||
|
**To share:**
|
||||||
|
- Email the HTML file directly (self-contained)
|
||||||
|
- Host on any web server
|
||||||
|
- Upload to Google Drive/Dropbox and share link
|
||||||
|
|
||||||
|
**Next steps:**
|
||||||
|
- Review content for accuracy
|
||||||
|
- Test interactive elements
|
||||||
|
- Share with stakeholders
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
**If materials directory doesn't exist:**
|
||||||
|
```
|
||||||
|
❌ Materials directory not found: $2
|
||||||
|
|
||||||
|
Please provide a valid directory path containing your materials.
|
||||||
|
|
||||||
|
Example structure:
|
||||||
|
my-presentation/
|
||||||
|
├── materials/
|
||||||
|
│ ├── report.md
|
||||||
|
│ ├── data.csv
|
||||||
|
│ └── findings.txt
|
||||||
|
└── style/
|
||||||
|
└── brand-guide.md
|
||||||
|
```
|
||||||
|
|
||||||
|
**If insufficient materials:**
|
||||||
|
```
|
||||||
|
⚠️ Warning: Only [number] files found
|
||||||
|
|
||||||
|
Interactive presentations work best with multiple materials (3+ files).
|
||||||
|
|
||||||
|
Would you like to:
|
||||||
|
1. Proceed anyway (may result in short presentation)
|
||||||
|
2. Add more materials first
|
||||||
|
```
|
||||||
|
|
||||||
|
**If HTML generation fails:**
|
||||||
|
- Save partial progress
|
||||||
|
- Report which section failed
|
||||||
|
- Offer to retry that section only
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Usage Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Basic presentation from materials folder
|
||||||
|
/create-presentation content-audit ./audit-materials/
|
||||||
|
|
||||||
|
# With style reference
|
||||||
|
/create-presentation q4-report ./reports/q4/ --style-reference ./brand/style-guide.md
|
||||||
|
|
||||||
|
# From nested directory structure
|
||||||
|
/create-presentation competitor-analysis ./research/competitive/materials/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tips for Best Results
|
||||||
|
|
||||||
|
**Materials organization:**
|
||||||
|
- Use clear, descriptive file names
|
||||||
|
- Group related materials in subdirectories
|
||||||
|
- Include images/charts if available
|
||||||
|
- Provide context documents (ICP, strategy docs)
|
||||||
|
|
||||||
|
**Style references:**
|
||||||
|
- Brand guidelines work well
|
||||||
|
- Previous presentations can serve as style examples
|
||||||
|
- Color hex codes and font names are helpful
|
||||||
|
|
||||||
|
**Interactive elements:**
|
||||||
|
- Use tabs for side-by-side comparisons (up to 5 variants)
|
||||||
|
- Use accordions for lists of 6+ items
|
||||||
|
- Use charts for numerical trends
|
||||||
|
- Keep it simple - don't over-complicate
|
||||||
61
plugin.lock.json
Normal file
61
plugin.lock.json
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:animalzinc/claude-plugins:plugins/interactive-presentation-generator",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "316a25c3935055674227dfec23306874eed2ab2c",
|
||||||
|
"treeHash": "802c84db75775050a9a4f8063e75f02c6ba71bde82794892a3414b50699ab502",
|
||||||
|
"generatedAt": "2025-11-28T10:13:44.319917Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "interactive-presentation-generator",
|
||||||
|
"description": "Transform data, reports, and findings into self-contained interactive HTML presentations. Perfect for content audits, research synthesis, and stakeholder presentations.",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "a49fc8ce93a6016e19d46932ea7f20b9b28a87f26dbf3d7fba25e50e45723278"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/html-generator.md",
|
||||||
|
"sha256": "088f62680177f3a5edb8c76cda3ee2f678de60e090bd5574b8981eba663a94f1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/interactive-element-creator.md",
|
||||||
|
"sha256": "f870923552315004a8305f0a5cdc02a666e85162aec065b99ef1c88f59f9f106"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/structure-planner.md",
|
||||||
|
"sha256": "2921fe2cbd34dfc33c30cf025e41c1a78628159e183032f5bf1d87248add4472"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/style-applier.md",
|
||||||
|
"sha256": "f2edb6d90ad9053aaaa8b555bf650f144f357c216d2c765770dfe5bb8c9035b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "ddb1bcd529faec7761b6e21e75c471766d6df9e0c7f2fd319c73ce3c24c36192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/create-presentation.md",
|
||||||
|
"sha256": "52e55ddab53e769666b8dab01a8b77c8bdd84048fde08c74c97334b96012cdf9"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "802c84db75775050a9a4f8063e75f02c6ba71bde82794892a3414b50699ab502"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user