Skip to content

Commit 8426d7c

Browse files
davila7claude
andcommitted
improve: Unify component cards design with templates
- Remove install-note sections from component cards to match template design - Fix commands installation to include mkdir -p for .claude/commands - Simplify card back to show only Installation Command title - Remove unused CSS for install-note styling - Clean up unused getInstallationTitle function 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c09b8fc commit 8426d7c

File tree

2 files changed

+4
-36
lines changed

2 files changed

+4
-36
lines changed

docs/script.js

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -998,15 +998,11 @@ function createComponentCard(component) {
998998
</div>
999999
<h3 class="template-title">${formatComponentName(component.name)}</h3>
10001000
<p class="template-description">${getComponentDescription(component)}</p>
1001-
<div class="component-type-badge" style="background: ${config.color}">
1002-
${component.type.slice(0, -1)}
1003-
</div>
10041001
</div>
10051002
<div class="card-back">
10061003
<div class="command-display">
1007-
<h3>${getInstallationTitle(component)}</h3>
1004+
<h3>Installation Command</h3>
10081005
<div class="command-code">${installCommand}</div>
1009-
${getInstallationNotes(component)}
10101006
<div class="action-buttons">
10111007
<button class="view-files-btn" onclick="showComponentDetails('${component.type}', '${component.name}')">
10121008
📁 View Details
@@ -1037,7 +1033,7 @@ function generateInstallCommand(component) {
10371033
const framework = getFrameworkFromAgent(component);
10381034
return `npx claude-code-templates@latest --language=${language} --framework=${framework}`;
10391035
} else if (component.type === 'commands') {
1040-
return `curl -o .claude/commands/${component.filename} https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/commands/${component.filename}`;
1036+
return `mkdir -p .claude/commands && curl -o .claude/commands/${component.filename} https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/commands/${component.filename}`;
10411037
} else if (component.type === 'mcps') {
10421038
return `curl -o ./${component.filename} https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/mcps/${component.filename}`;
10431039
}
@@ -1074,25 +1070,8 @@ function getFrameworkFromAgent(component) {
10741070
return 'node';
10751071
}
10761072

1077-
// Get installation title based on component type
1078-
function getInstallationTitle(component) {
1079-
const titles = {
1080-
agents: 'Install with Template',
1081-
commands: 'Download Command',
1082-
mcps: 'Download MCP Config'
1083-
};
1084-
return titles[component.type] || 'Installation';
1085-
}
1086-
1087-
// Get installation notes
1088-
function getInstallationNotes(component) {
1089-
if (component.type === 'agents') {
1090-
return '<div class="install-note">📝 This will install the complete template including this agent</div>';
1091-
} else if (component.type === 'commands') {
1092-
return '<div class="install-note">📝 Run this command from your project root directory</div>';
1093-
} else if (component.type === 'mcps') {
1094-
return '<div class="install-note">📝 Merge the downloaded config with your existing .mcp.json</div>';
1095-
}
1073+
// Get installation notes (removed to match template cards design)
1074+
function getInstallationNotes() {
10961075
return '';
10971076
}
10981077

docs/styles.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,17 +1779,6 @@ body {
17791779
font-size: 2.5rem;
17801780
}
17811781

1782-
/* Installation Notes */
1783-
.install-note {
1784-
background: var(--bg-primary);
1785-
border: 1px solid var(--border-secondary);
1786-
border-radius: 6px;
1787-
padding: 0.75rem;
1788-
margin: 0.75rem 0;
1789-
color: var(--text-secondary);
1790-
font-size: 0.8rem;
1791-
line-height: 1.4;
1792-
}
17931782

17941783
/* Enhanced Component Modal */
17951784
.component-modal {

0 commit comments

Comments
 (0)