generated from nathanwoodburn/python-webserver-template
92 lines
5.2 KiB
HTML
92 lines
5.2 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html data-bs-theme="dark" lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||
|
<title>FireSales</title>
|
||
|
<meta name="twitter:description" content="Self Custodial Domain listings">
|
||
|
<meta name="twitter:card" content="summary">
|
||
|
<meta property="og:type" content="website">
|
||
|
<meta name="twitter:image" content="/assets/img/favicon.png">
|
||
|
<meta name="twitter:title" content="FireSales">
|
||
|
<meta name="description" content="Self Custodial Domain listings">
|
||
|
<meta property="og:image" content="/assets/img/favicon.png">
|
||
|
<link rel="icon" type="image/png" sizes="900x768" href="/assets/img/favicon.png">
|
||
|
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
|
||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap">
|
||
|
<link rel="stylesheet" href="/assets/css/Navbar-Right-Links-Dark-icons.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<nav class="navbar navbar-expand-md bg-dark py-3" data-bs-theme="dark">
|
||
|
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><img src="/assets/img/favicon.png" width="64px"><span style="margin: 10px;">FireSales</span></a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-5"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||
|
<div class="collapse navbar-collapse" id="navcol-5">
|
||
|
<ul class="navbar-nav ms-auto">
|
||
|
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||
|
<li class="nav-item"><a class="nav-link active" href="/list">List</a></li>
|
||
|
<li class="nav-item"><a class="nav-link" href="/docs">Docs</a></li>
|
||
|
<li class="nav-item"><a class="nav-link" href="/plugin">FireWallet Plugin</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</nav>
|
||
|
<section class="py-4 py-xl-5">
|
||
|
<div class="container h-100">
|
||
|
<div class="row h-100">
|
||
|
<div class="col-md-10 col-xl-8 text-center d-flex d-sm-flex d-md-flex justify-content-center align-items-center mx-auto justify-content-md-start align-items-md-center justify-content-xl-center">
|
||
|
<div>
|
||
|
<h2 class="text-uppercase fw-bold mb-3">FireSales</h2>
|
||
|
<p class="mb-4">Self custodial domain sales</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<h1 class="text-center">{{error}}</h1>
|
||
|
<h1 class="text-center">{{success}}</h1>
|
||
|
</section>
|
||
|
<section style="margin: 10px;">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
<h2 class="text-center mb-4">List a domain</h2>
|
||
|
<form method="post">
|
||
|
<div class="mb-3"><input class="form-control" type="text" id="domain" name="domain" placeholder="Domain Name" required="" value="{{domain}}"></div>
|
||
|
<div class="mb-3"><input class="form-control" type="number" id="price" name="price" placeholder="Price" min="0" required="" value="{{price}}"></div>
|
||
|
<div class="mb-3"><input class="form-control" type="text" id="contact" name="contact" placeholder="Contact Info" required="" value="{{contact}}"></div>
|
||
|
<div class="mb-3"><textarea class="form-control" id="description" name="description" rows="6" placeholder="Description" required="">{{description}}</textarea></div>
|
||
|
<div class="d-xl-flex align-items-xl-center mb-3"><input class="form-control" type="text" id="signature" placeholder="Signature" required="" name="signature" value="{{signature}}" style="display: inline-block;width: auto;margin: 10px;min-width: 500px;"><button class="btn btn-primary" id="getmessage" type="button" style="display: inline-block;width: auto;margin: 10px;">Copy Message to sign</button><script>
|
||
|
document.getElementById("getmessage").addEventListener("click", async function() {
|
||
|
try {
|
||
|
const domain = document.getElementById("domain").value;
|
||
|
const description = document.getElementById("description").value;
|
||
|
const price = document.getElementById("price").value;
|
||
|
const contact = document.getElementById("contact").value;
|
||
|
|
||
|
const response = await fetch("/api/v1/listing-message?domain=" + domain + "&description=" + description + "&price=" + price + "&contact=" + contact);
|
||
|
if (!response.ok) {
|
||
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
||
|
}
|
||
|
const result = await response.json();
|
||
|
|
||
|
// Copy to clipboard
|
||
|
navigator.clipboard.writeText(result.message).then(() => {
|
||
|
console.log("Message copied to clipboard");
|
||
|
}).catch(err => {
|
||
|
console.error("Error copying message:", err);
|
||
|
});
|
||
|
} catch (error) {
|
||
|
console.error("Error fetching message:", error);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
</script></div>
|
||
|
<div><button class="btn btn-primary d-block w-100" type="submit">List</button></div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
|
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|