Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions internal/docs/ui/pages/landing.templ
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ templ Landing() {
<div class="flex items-center bg-muted/50 border border-border rounded-md overflow-hidden">
<code class="flex-1 px-3 py-2 text-sm font-mono">curl -fsSL https://deeploy.sh/server.sh | sudo bash</code>
<button
onclick="navigator.clipboard.writeText('curl -fsSL https://deeploy.sh/server.sh | sudo bash'); this.textContent='✓'; setTimeout(() => this.textContent='copy', 1500)"
class="px-3 py-2 text-sm text-muted-foreground hover:text-foreground border-l border-border transition-colors"
class="px-3 py-2 text-sm text-muted-foreground hover:text-foreground border-l border-border transition-colors copy-btn"
data-copy="curl -fsSL https://deeploy.sh/server.sh | sudo bash"
>copy</button>
</div>
</div>
Expand All @@ -63,8 +63,8 @@ templ Landing() {
<div class="flex items-center bg-muted/50 border border-border rounded-md overflow-hidden">
<code class="flex-1 px-3 py-2 text-sm font-mono">curl -fsSL https://deeploy.sh/tui.sh | bash</code>
<button
onclick="navigator.clipboard.writeText('curl -fsSL https://deeploy.sh/tui.sh | bash'); this.textContent='✓'; setTimeout(() => this.textContent='copy', 1500)"
class="px-3 py-2 text-sm text-muted-foreground hover:text-foreground border-l border-border transition-colors"
class="px-3 py-2 text-sm text-muted-foreground hover:text-foreground border-l border-border transition-colors copy-btn"
data-copy="curl -fsSL https://deeploy.sh/tui.sh | bash"
>copy</button>
</div>
</div>
Expand Down Expand Up @@ -106,10 +106,23 @@ templ Landing() {
<!-- Copyright outside box -->
@modules.FooterCopyright()
</div>
@subscribeScript()
@copyScript()
// @subscribeScript()
}
}

templ copyScript() {
<script nonce={ templ.GetNonce(ctx) }>
document.querySelectorAll('.copy-btn').forEach(btn => {
btn.addEventListener('click', function() {
navigator.clipboard.writeText(this.dataset.copy);
this.textContent = '✓';
setTimeout(() => this.textContent = 'copy', 1500);
});
});
</script>
}

templ subscribeScript() {
<script nonce={ templ.GetNonce(ctx) }>
document.getElementById('subscribe-form').addEventListener('submit', async (e) => {
Expand Down