| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="UTF-8"> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 |
<title>Buy {{ item.title }} — Makenot.work</title> |
| 7 |
<link rel="stylesheet" href="/static/style.css"> |
| 8 |
</head> |
| 9 |
<body class="buy-page"> |
| 10 |
<div class="buy-card"> |
| 11 |
{% if let Some(url) = item.cover_image_url %} |
| 12 |
<img class="cover" src="{{ url }}" alt="{{ item.title }}"> |
| 13 |
{% else %} |
| 14 |
<div class="no-cover"></div> |
| 15 |
{% endif %} |
| 16 |
|
| 17 |
<h1 class="page-title">{{ item.title }}</h1> |
| 18 |
<div class="creator"> |
| 19 |
by <a href="{{ host_url }}/u/{{ creator_username }}" target="_blank" rel="noopener">{{ creator_display_name.as_deref().unwrap_or(&creator_username) }}</a> |
| 20 |
</div> |
| 21 |
|
| 22 |
{% if item.is_free %} |
| 23 |
<div class="price">Free</div> |
| 24 |
{% else %} |
| 25 |
<div class="price">{{ item.price }}</div> |
| 26 |
{% endif %} |
| 27 |
|
| 28 |
{% if !item.description.is_empty() %} |
| 29 |
<div class="description">{{ item.description }}</div> |
| 30 |
{% endif %} |
| 31 |
|
| 32 |
{% if item.is_free %} |
| 33 |
<a class="buy-btn" href="{{ host_url }}/i/{{ item.id }}" target="_blank" rel="noopener">Get — Free</a> |
| 34 |
{% else %} |
| 35 |
{% if pwyw_enabled %} |
| 36 |
<div class="pwyw-input"> |
| 37 |
<span>$</span> |
| 38 |
<input type="number" id="pwyw_amount" value="{{ suggested_price }}" min="{{ pwyw_min_dollars }}" step="0.01"> |
| 39 |
</div> |
| 40 |
{% endif %} |
| 41 |
<button class="buy-btn" id="buy-btn" data-action="buy">Buy Now — {{ item.price }}</button> |
| 42 |
{% endif %} |
| 43 |
|
| 44 |
<div class="note"> |
| 45 |
No account required. Download link sent via email. |
| 46 |
<br><a href="{{ host_url }}/i/{{ item.id }}">View full details</a> |
| 47 |
</div> |
| 48 |
|
| 49 |
<div class="footer"> |
| 50 |
<a href="{{ host_url }}">makenot.work</a> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
|
| 54 |
{% if !item.is_free %} |
| 55 |
<div id="page-buy-cfg" hidden data-host-url="{{ host_url }}" data-item-id="{{ item.id }}" data-pwyw-enabled="{% if pwyw_enabled %}true{% else %}false{% endif %}"></div> |
| 56 |
<script src="/static/page-buy.js?v=0623" defer></script> |
| 57 |
{% endif %} |
| 58 |
</body> |
| 59 |
</html> |
| 60 |
|