mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-05-07 22:13:07 +00:00
uhhh yeah
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
5abe0b5fad
commit
afc634b0d2
43 changed files with 573 additions and 3792 deletions
|
@ -3,7 +3,7 @@ extends site.pug
|
|||
block content
|
||||
h1 Admin Panel
|
||||
h2 Invite codes
|
||||
form(action="/mod/codes/delete", method="post")
|
||||
form(action="/codes/delete", method="post")
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
|
@ -27,6 +27,6 @@ block content
|
|||
form(action="/mod/codes/prune", method="post")
|
||||
button(type="submit") Prune
|
||||
br
|
||||
form(action="/mod/codes/create", method="post")
|
||||
form(action="/codes/create", method="post")
|
||||
input(type="datetime-local", name="expiration")
|
||||
button(type="submit") Create
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -6,9 +6,9 @@ block head
|
|||
|
||||
block page
|
||||
#sidebar
|
||||
h1 MiPilin
|
||||
h1 mipilin
|
||||
p(style="margin-top:0;")
|
||||
| Thx for being a part of the MiPilin beta!
|
||||
| Thx for being a part of the mipilin beta!
|
||||
if session.loggedIn
|
||||
|
|
||||
| If you want to change your mood, update your profile, and see how your friends are doing, visit
|
||||
|
@ -33,7 +33,7 @@ block page
|
|||
|
||||
block content
|
||||
p
|
||||
| Hi, this is MiPilin! It lets you tell your friends how you're feeling, as well as keep a journal of your current mood and their trends over time! Due respect goes to imood, from which I borrowed many ideas and basically all of the moods.
|
||||
| Hi, this is mipilin! It lets you tell your friends how you're feeling, as well as keep a journal of your current mood and their trends over time! Due respect goes to imood, from which I borrowed many ideas and basically all of the moods.
|
||||
h1 Global Feed
|
||||
p Look at how all these people are doing!!!
|
||||
include _feed.pug
|
||||
|
|
13
views/journal_view.pug
Normal file
13
views/journal_view.pug
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends site.pug
|
||||
|
||||
block content
|
||||
h1= entry.date.toLocaleDateString()
|
||||
span
|
||||
| by
|
||||
|
|
||||
a(href=`/users/${entry.uname}`)= entry.uname
|
||||
|
|
||||
| at #{entry.date.toLocaleTimeString()}
|
||||
br
|
||||
br
|
||||
div= entry.content
|
|
@ -14,7 +14,7 @@ html(lang="en")
|
|||
img#header-logo(src="/img/logo.svg", alt="logo")
|
||||
nav
|
||||
if session.loggedIn
|
||||
if session.moderator
|
||||
if session.status & 0b001
|
||||
a(href="/mod/") Admin
|
||||
a(href="/dashboard/") Dashboard
|
||||
a(href="/journal/") Journal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue