-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathskill_detail.html
More file actions
214 lines (198 loc) · 10.8 KB
/
Copy pathskill_detail.html
File metadata and controls
214 lines (198 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{% from "skills/step_unified.html" import render_step_unified %}
{% macro render_skill(skill, private_api_slugs=[], api_link_prefix='', op_lookup={}) %}
{% set skill_name = skill.name|skill_title %}
{% set slug = skill.slug %}
{% set step_details = skill.step_details|default([]) %}
<section id="skill-{{ slug }}" class="content-section skill-detail">
{# Skill actions split button #}
<div class="skill-actions-bar">
<div class="skill-split-btn" id="skill-actions-{{ slug }}">
<button class="skill-split-main" onclick="openInstallModal('{{ slug }}')">
<span>Install Command</span>
</button>
<button class="skill-split-toggle" onclick="toggleSkillDropdown('{{ slug }}')" aria-haspopup="true" aria-expanded="false">
<svg class="chevron-icon" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>
</button>
<div class="skill-dropdown-menu" id="skill-dropdown-menu-{{ slug }}" style="display:none">
<button onclick="openInstallModal('{{ slug }}')">
<svg width="12" height="13" viewBox="0 0 12 13" fill="none"><path d="M11 6.5L0.5 13V0.5L11 6.5Z" stroke="currentColor" stroke-linejoin="round"/></svg>
Install Skill Command
</button>
<a href="../skills/{{ slug }}/SKILL.md" target="_blank" rel="noopener">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
Open Skill Markdown
</a>
<button onclick="copySkillContent('{{ slug }}', this)">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
Copy Skill
</button>
</div>
</div>
</div>
{# Overview and Prerequisites - Always visible in both modes #}
{% if skill.overview_html or skill.description %}
<div id="overview" class="skill-subsection">
<h3>Overview</h3>
<div class="skill-view-markdown">
{% if skill.overview_html %}
{{ skill.overview_html|safe }}
{% else %}
<p>{{ skill.description }}</p>
{% endif %}
</div>
</div>
{% endif %}
{% if skill.prerequisites_html %}
<div id="prerequisites-section" class="skill-subsection">
<h3>Prerequisites</h3>
<div class="skill-view-markdown">{{ skill.prerequisites_html|safe }}</div>
</div>
{% endif %}
{# Unified Content Area #}
<div id="playground-section" class="skill-playground-section">
</div>
<div id="skill-content-{{ slug }}" class="skill-content-unified">
<div class="skill-main-content">
{% if step_details %}
{% set total_steps = step_details|length %}
{% for step in step_details %}
{{ render_step_unified(step, loop.index, slug, loop.index0, total_steps, private_api_slugs, api_link_prefix, step_details, op_lookup) }}
{% endfor %}
{% endif %}
</div>
{# Execution Panel - Hidden by default, shown in playground mode #}
<aside class="execution-panel" id="variables-sidebar-{{ slug }}" style="display: none;">
{# Panel Tabs #}
<div class="execution-panel-tabs">
<button class="execution-tab active" data-tab="variables" onclick="switchExecutionTab('{{ slug }}', 'variables')">Variables</button>
<button class="execution-tab" data-tab="evaluation" onclick="switchExecutionTab('{{ slug }}', 'evaluation')">Evaluation</button>
</div>
{# Variables Section #}
<div class="execution-panel-content" id="execution-variables-{{ slug }}">
<div class="variables-toolbar">
<button class="btn-add-variable" onclick="addManualVariable('{{ slug }}')" title="Add Variable">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
Add Variable
</button>
<button class="btn-clear-variables" onclick="clearAllVariables('{{ slug }}')" title="Clear All Variables">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
</svg>
Clear All
</button>
</div>
<table class="variables-table" id="variables-table-{{ slug }}">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Source</th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="no-variables-row">
<td colspan="4" style="text-align:center; color:#9ca3af; padding:2rem 0.5rem;">
No variables yet
</td>
</tr>
</tbody>
</table>
</div>
{# Evaluation Section #}
<div class="execution-panel-content" id="execution-evaluation-{{ slug }}" style="display:none">
<div class="evaluation-input-section">
<label for="evaluation-input-{{ slug }}">JSONPath Expression</label>
<div class="evaluation-input-row">
<input type="text"
id="evaluation-input-{{ slug }}"
class="evaluation-input"
placeholder="$.data[*].id"
onkeyup="if(event.key==='Enter') evaluateExpression('{{ slug }}')">
<button class="btn-evaluate" onclick="evaluateExpression('{{ slug }}')">Run</button>
</div>
</div>
<div class="evaluation-result-section">
<div class="evaluation-result-container" id="evaluation-result-{{ slug }}">
<div class="evaluation-placeholder">Enter a JSONPath expression and press Enter or click Run</div>
</div>
</div>
</div>
</aside>
</div>
{# Completion Checklist - Always visible in both modes #}
{% if skill.completion_checklist_html %}
<div id="completion-section" class="skill-subsection">
<h3>Completion Checklist</h3>
<div class="skill-view-markdown">{{ skill.completion_checklist_html|safe }}</div>
</div>
{% endif %}
{% if skill.what_youve_built_html %}
<div id="built-section" class="skill-subsection">
<h3>What You've Built</h3>
<div class="skill-view-markdown">{{ skill.what_youve_built_html|safe }}</div>
</div>
{% endif %}
{% if skill.next_steps_html %}
<div id="next-steps-section" class="skill-subsection">
<h3>Next Steps</h3>
<div class="skill-view-markdown">{{ skill.next_steps_html|safe }}</div>
</div>
{% endif %}
{% if skill.tips_html %}
<div id="tips-section" class="skill-subsection">
<h3>Tips and Best Practices</h3>
<div class="skill-view-markdown">{{ skill.tips_html|safe }}</div>
</div>
{% endif %}
{% if skill.troubleshooting_html %}
<div id="troubleshooting-section" class="skill-subsection">
<h3>Troubleshooting</h3>
<div class="skill-view-markdown">{{ skill.troubleshooting_html|safe }}</div>
</div>
{% endif %}
{% if skill.related_jobs_list %}
<div id="related-jobs-section" class="skill-subsection">
<h3>Related Jobs</h3>
<div class="skill-view-markdown">
<ul>
{% for job in skill.related_jobs_list %}
<li><a href="../skills/{{ job.slug }}.html"><strong>{{ job.slug }}</strong></a>: {{ job.description }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{# Install Command Modal #}
<div class="install-modal" id="install-modal-{{ slug }}" style="display:none" role="dialog" aria-modal="true">
<div class="install-modal-overlay" onclick="closeInstallModal('{{ slug }}')"></div>
<div class="install-modal-content">
<div class="install-modal-header">
<h3>Install Command</h3>
<button class="btn-close-modal" onclick="closeInstallModal('{{ slug }}')" aria-label="Close modal">×</button>
</div>
<div class="install-modal-body">
<div class="install-command-row">
<span class="install-command-bracket">[</span>
<code class="install-command-code" id="install-cmd-{{ slug }}">npx skills add https://github.com/mulesoft/mulesoft-dx/ --skill {{ slug }}</code>
<span class="install-command-bracket">]</span>
<button class="btn-install-copy" onclick="copyInstallFromModal('{{ slug }}', this)">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
<span>Copy</span>
</button>
</div>
<div class="install-prereqs">
<h4>
Pre requisites
</h4>
<p>Requires <strong>Node.js</strong> and <strong>npm</strong> installed on your system. The <code>npx</code> command (included with npm) will automatically download and run the skills CLI.</p>
</div>
</div>
</div>
</div>
</section>
{% endmacro %}