Skip to main content

max / makenotwork

1.7 KB · 35 lines History Blame Raw
1 <div class="content-section">
2 <div class="section-header">
3 <h2 class="subsection-title">Overview</h2>
4 <div class="action-buttons">
5 <button class="btn-secondary" onclick="window.open('/i/{{ item.id }}', '_blank')">View Public Page</button>
6 <button class="btn-secondary" onclick="navigator.clipboard.writeText(window.location.origin + '/i/{{ item.id }}').then(() => this.textContent = 'Copied!').catch(() => this.textContent = 'Failed')">Copy Link</button>
7 <button class="btn-secondary" onclick="var d=document.querySelector('details.content-section'); if(d){d.open=true; d.scrollIntoView({behavior:'smooth'})}">Embed &amp; Share</button>
8 <button class="btn-secondary"
9 hx-post="/api/items/{{ item.id }}/duplicate"
10 hx-confirm="Duplicate this item? A new draft copy will be created.">Duplicate Item</button>
11 </div>
12 </div>
13
14 {% if item.is_public %}
15 <p class="form-hint mt-4">Your item is live. Share it with <strong>Embed &amp; Share</strong> above, or copy the direct purchase link to use in social media and newsletters.</p>
16 {% else %}
17 <p class="form-hint mt-4">This item is still a draft. When you're ready, go to <strong>Details</strong> to publish it.</p>
18 {% endif %}
19
20 <div id="item-analytics"
21 hx-get="/dashboard/item/{{ item.id }}/analytics"
22 hx-trigger="load"
23 hx-swap="innerHTML">
24 </div>
25 </div>
26
27 <details class="content-section item-overview-embed">
28 <summary>Embed &amp; Share</summary>
29 <div id="embed-inline"
30 hx-get="/dashboard/item/{{ item.id }}/tabs/embed"
31 hx-trigger="revealed"
32 hx-swap="innerHTML">
33 </div>
34 </details>
35