1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-05-15 01:33:06 +00:00

uhhh yeah

Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
Rae 5e 2024-12-25 18:44:29 -05:00
parent 5abe0b5fad
commit afc634b0d2
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
43 changed files with 573 additions and 3792 deletions

View file

@ -21,10 +21,10 @@ block page
| #{mood.date}
block content
if user.moderator
details(style="margin-bottom:1em;")
summary Moderation
p If you're seeing this, you are part of the exclusive club of moderators! You are now entitled to pizza for the rest of your life! And the ability to ban people and create new moods! For FREE!
p
a(href="#feed") Feed
| /
a(href="#invite-codes") Invite codes
form#dashboard-update-form(action="/update/mood", method="post", onsubmit="disable(this);")
select(name="mood", required)
//- Maybe put the index of the mood in the value of the option element
@ -33,9 +33,32 @@ block content
option= mood
textarea(name="desc", placeholder="mood description (max 512 chars)", rows="5", maxlength="512")
button(type="submit") Update
h1(style="margin-top:0.5em;") Feed
h1#feed(style="margin-top:0.5em;") Feed
include _feed.pug
+feed(recentUpdates)
h1#invite-codes(style="margin-top:1em;") Invite codes
p Invite your friends to the mipilin beta! You can create up to five invite codes every month, and they all expire within a week.
p
| Your current invite codes (
strong= codesUsed
| /5):
if codes.length > 0
table
tbody
tr
th Token
th Expires
for code of codes
tr
td= code.token
td= code.expires
else
.subtle You have no currently active invite codes.
br
form(action="/codes/create", method="post")
button(type="submit", disabled=codesUsed>=5) Generate
script(nonce=nonce).
function disable(form) {
const btn = form.querySelector("button");