This commit is contained in:
stjet
2025-01-12 06:29:10 +00:00
parent fad55e4130
commit 44d1b9defd
4 changed files with 52 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ export function get_price(dl: number): number {
} else if (dl === 9) {
return 420;
} else if (dl > 9) {
return 1;//190;
return 190;
} else {
return 99999; //currently <4 length domains not buyable, but just in case...
}

View File

@@ -92,15 +92,34 @@
</div>
<div id="get" class="half">
<div id="get-child">
<h1 id="mobile-title">Buy a .ban Domain</h1>
<div id="input-container">
<input placeholder="Get your .ban on" maxlength="48" onkeydown={domain_keydown} onkeyup={domain_keyup} bind:value={domain_content} type="text"/><span>.ban</span><input onclick={domain_next} type="button" value="-->"/>
<input placeholder="Get your .ban on" maxlength="32" onkeydown={domain_keydown} onkeyup={domain_keyup} bind:value={domain_content} type="text"/><span>.ban</span><input onclick={domain_next} type="button" value="-->"/>
</div>
<span id="price">{price}</span>
<span class="error">{error}</span>
<div>
<h2>Supported by:</h2>
<div>
<span>Bananostand</span>
<a href="https://thebananostand.com" target="_blank">Bananostand</a>
<br>
<a href="https://creeper.banano.cc" target="_blank">Creeper</a>
<br>
<a href="https://banano.nano.trade/b" target="_blank">Kuyumucu (banano.trade)</a>
<br>
<a href="https://www.banano-sports-pools.xyz" target="_blank">Banano Sports Pools</a>
<br>
<a href="https://gorillanation.cc" target="_blank">Gorilla Nation</a>
<br>
<a href="https://monke42.link" target="_blank">Monke42.link</a>
<br>
<a href="https://faucet.banxno.com/" target="_blank">BanXNO Faucet</a>
<br>
<a href="https://faucet.prussia.dev/" target="_blank">faucet.prussia.dev</a>
<br>
<a href="https://banfts.prussia.dev/explorer" target="_blank">Banfts (search)</a>
<br>
<span>And more in the near future!</span>
</div>
</div>
<p id="bottom-2">.ban is the first publicly available top level domain (TLD) for the <a href="https://github.com/stjet/bns/blob/master/bns_protocol.md">Banano Name Service protocol (BNS)</a></p>
@@ -150,6 +169,9 @@
hr {
margin: 1px 0;
border-style: solid;
border-color: var(--grey1);
width: 100%;
}
.thickest {
@@ -193,14 +215,14 @@
#input-container input[type="text"] {
padding-left: 3px;
width: calc(65% - 3px);
width: calc(63% - 3px);
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
#input-container span {
display: inline-block;
width: 10%;
width: 12%;
text-align: center;
}
@@ -218,4 +240,23 @@
width: 16px;
margin-top: 2px;
}
#mobile-title {
display: none;
}
@media only screen and (max-width: 900px) {
#pitch {
display: none;
}
#front {
grid-template-columns: 100vw;
}
#mobile-title {
display: block;
margin-bottom: 19px;
}
}
</style>

View File

@@ -11,8 +11,8 @@ export const POST: RequestHandler = async ({ request }) => {
const { domain, send_to_pub_key } = await request.json();
if (!domain || !send_to_pub_key) {
return error(400, "Missing one or more of the required fields `domain` and `send_to_pub_key`");
} else if (!is_domain_name_allowed(domain) || domain.length < 4) {
return error(400, "Domain name has disallowed characters or is shorter than 4 characters");
} else if (!is_domain_name_allowed(domain) || domain.length < 4 || domain.length > 32) {
return error(400, "Domain name has disallowed characters, is shorter than 4 characters, or is longer than 32 characters");
} else if (!is_valid_public_key(send_to_pub_key)) {
return error(400, "`send_to_pub_key` is invalid");
}

View File

@@ -38,3 +38,7 @@
background-color: #eacf1e;
}
code {
word-wrap: break-word;
}