Skip to content

Commit 368fc3a

Browse files
committed
ui: refactor custom installation script section for improved readability
1 parent b46ef8e commit 368fc3a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/routes/[username]/[slug]/+page.svelte

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -369,21 +369,19 @@
369369
<span class="detail-icon">⚡</span>
370370
<span class="detail-title">Custom Installation Script</span>
371371
</summary>
372-
<div class="detail-content">
373-
<div class="code-block">
374-
<div class="code-header">
375-
<span>custom-script.sh</span>
376-
<button onclick={() => {
377-
navigator.clipboard.writeText(data.config.custom_script || '');
378-
const btn = event?.currentTarget as HTMLButtonElement;
379-
if (btn) {
380-
btn.textContent = 'Copied!';
381-
setTimeout(() => btn.textContent = 'Copy', 2000);
382-
}
383-
}}>Copy</button>
384-
</div>
385-
<pre><code>{@html highlightBash(data.config.custom_script)}</code></pre>
372+
<div class="code-block">
373+
<div class="code-header">
374+
<span>custom-script.sh</span>
375+
<button onclick={() => {
376+
navigator.clipboard.writeText(data.config.custom_script || '');
377+
const btn = event?.currentTarget as HTMLButtonElement;
378+
if (btn) {
379+
btn.textContent = 'Copied!';
380+
setTimeout(() => btn.textContent = 'Copy', 2000);
381+
}
382+
}}>Copy</button>
386383
</div>
384+
<pre><code>{@html highlightBash(data.config.custom_script)}</code></pre>
387385
</div>
388386
</details>
389387
{/if}

0 commit comments

Comments
 (0)