abtmtr-v13/views/pages/mininq.ejs

86 lines
4.2 KiB
Text
Raw Normal View History

2024-09-01 21:28:26 +00:00
<!DOCTYPE html>
<html>
<%- include("../components/page-head.ejs") %>
<body>
<main>
<h1>mininq</h1>
<p>slowchat, for sysadmins who aren't quite equine.</p>
<h2>submit a mininq</h2>
<p>
MAILBOX:
<progress value="<%= mailboxCount %>" max="<%= mailboxMaximum %>"
style="width: <%= mailboxMaximum * 2 %>ch;"></progress>
<%= mailboxCount %>/<%= mailboxMaximum %>
</p>
<p>
MAILBOX (PRIORITY):
<progress value="<%= mailboxVerifiedCount %>" max="<%= mailboxVerifiedMaximum %>"
style="width: <%= mailboxVerifiedMaximum * 2 %>ch;"></progress>
<%= mailboxVerifiedCount %>/<%= mailboxVerifiedMaximum %>
</p>
<p>mininq (<code>[min]i [inq]uiry</code>) is a ping-ponging non-realtime chat interface made in the early 2000s to satisfy the needs of the single abtmtr.link sysadmin writing it.</p>
<p>either way, mininq was conceptualized, developed, and deployed without any second consideration. now, here you are.</p>
<% if (!isIpAlreadyMininq) { %>
<% if (mailboxCount < mailboxMaximum || mailboxVerifiedCount < mailboxVerifiedMaximum) { %>
<form action="/mininq/send" method="post">
<p>
<label for="username">Name:</label>
<input type="text" name="name" id="username" required>
</p>
<p>
<label for="message">Message:</label><br />
<textarea name="msg" id="message" rows="4" cols="30" required></textarea>
</p>
<% if (mailboxVerifiedCount < mailboxVerifiedMaximum) { %>
<div class="entity_box">
<% if (mailboxCount < mailboxMaximum) { %>
<h3>optional keyventure</h3>
<% } else { %>
<h3>mandatory keyventure</h3>
<p>uh-oh! looks like the non-priority mailbox is full. if you still want to submit a mininq, you'll have to follow the instructions below.<br />
or, wait until the non-priority mailbox has emptied.</p>
<% } %>
<p>this keypair has been generated for you to put on your site.</p>
<p>put this snippet in your document's head: <code>&lt;meta name="abtmtr-mininq-key" content="<%= keypair.publicKey %>"&gt;</code></p>
<p>then, if you want to make a mininq, you can enter your secret key and your site's URL here, and your domain will appear beside your name.<br />
you'll also get priority in the mininq inbox.</p>
<p>
<label for="secretkey">Secret Key:</label>
<input type="text" name="skey" id="secretkey" value="<%= keypair.secretKey %>"><br />
<span style="opacity: 0.5;">(keep this somewhere safe!)</span>
</p>
<p>
<label for="pubkeylocation">Website URL:</label>
<input type="url" name="pkeyurl" id="pubkeylocation">
</p>
<p></p>
</div>
<% } else { %>
<p>uh-oh! there was a keyventure here, but it looks like the priority mailbox is full. if you still want to submit a mininq, you'll have to appear anonymously.<br />
or, wait until the priority mailbox has emptied.</p>
<% } %>
<p>
<input type="submit" value="Submit Mininq">
</p>
<p style="opacity: 0.5;">by clicking this button and successfully submitting a mininq, you agree that your input may be displayed on this site and stored on abtmtr.link servers.</p>
<p style="opacity: 0.5;">rules: no slurs, no politics, no nsfw, no spam. if you break these rules outside of plausible deniability, your domain will be blacklisted.</p>
</form>
<% } else { %>
<p>uh-oh! looks like both mailboxes are full. you'll have to wait until the mailbox has emptied - then you can submit your mininq.</p>
<% } %>
<% } else { %>
<p>you've submitted a mininq!</p>
<% } %>
<h2>current mininqs</h2>
<ul>
<% data.forEach((mininq) => { %>
<li class="mininq" id="<%= mininq.id %>">
<%- include("../components/mininq.ejs", {mininq}) %>
</li>
<% }) %>
</ul>
</main>
<%- include("../components/footer.ejs") %>
<%- include("../components/post-main.ejs") %>
</body>
</html>