style user page

This commit is contained in:
Riley L. 2024-11-03 22:31:20 +01:00
parent ef820b584e
commit f71092470d
2 changed files with 13 additions and 2 deletions

View file

@ -258,12 +258,14 @@ local function r_user(username)
<div class="notif"><p><i>This user account does not exist yet. It will only be created after the first transaction.</i></p></div> <div class="notif"><p><i>This user account does not exist yet. It will only be created after the first transaction.</i></p></div>
]]) ]])
else else
print([[<div class="backgroundbox userinfo">]])
print(string.format([[ print(string.format([[
<p><span class="balance">Current balance:</span><span class="amount-%s balance-value">%.02f</p> Current balance:<br><span class="amount-%s balance-value">%.02f</span><br>
]], balance >= 0 and "pos" or "neg", balance / 100)) ]], balance >= 0 and "pos" or "neg", balance / 100))
print(string.format([[ print(string.format([[
<p>Last transaction added %s ago. <a href="/%s?log">View user log</a> Last transaction added %s ago. <a href="/%s?log">View user log</a>
]], format_duration(os.time() - last_txn), username)) ]], format_duration(os.time() - last_txn), username))
print([[</div>]])
end end
print([[<div class="transactions container firstchildlarge">]]) print([[<div class="transactions container firstchildlarge">]])
print([[<div class="amount-presets backgroundbox">]]) print([[<div class="amount-presets backgroundbox">]])

View file

@ -138,6 +138,15 @@ li {
font-size: 2em; font-size: 2em;
} }
h1 {
padding-left: 1rem;
}
.userinfo {
margin-left: 1rem;
padding: 1rem;
}
/* Amount selector user page */ /* Amount selector user page */
.amount { .amount {
display: block; display: block;