payit/web/templates/index.html
Ruidy d112a4f6e8
fix(frontend): improve form selectors and markup
Refactor JavaScript to use querySelector for robustness. Update HTML
form to use POST method and correct script loading. Fix message div
syntax for better accessibility and compatibility.
2025-09-28 14:16:53 +02:00

29 lines
1,007 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PayIt Checkout</title>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
/>
<link rel="stylesheet" href="/static/main.css" />
<script defer src="/static/app.js"></script>
</head>
<body>
<main class="card">
<h1>{{ .ProductName }}</h1>
<p>{{ .ProductDescription }}</p>
<div class="price">
{{ .PriceDisplay }} <span class="currency">{{ .Currency }}</span>
</div>
<form id="checkout-form" action="/api/checkout/" method="POST">
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" type="number" value="1" min="1" />
<button id="checkout-button" type="submit">Buy now</button>
</form>
<div id="message" role="status" aria-live="polite" />
</main>
</body>
</html>