homepage.js/view/guestbook.pug

97 lines
4.7 KiB
Plaintext
Raw Normal View History

2023-02-19 06:30:02 +01:00
extends layout/main.pug
block root
- var title = 'Guestbook'
2023-02-21 10:59:31 +01:00
include lib/since.pug
2023-02-22 08:42:39 +01:00
include ui/label.pug
2023-02-19 07:05:36 +01:00
block head
<link rel='stylesheet' href='/static/ui/send_button.css'>
2023-02-19 16:12:09 +01:00
<link rel='stylesheet' href='/static/ui/gb_ui.css'>
2023-02-19 06:30:02 +01:00
block content
h1 Guestbook
p.
Leave a message if you want.
hr
table
tr
td
h4 Message form
form(method='post' action='/guestbook/submit')
table
tr
td Your name:
td
2023-02-27 02:08:44 +01:00
input(type='text' name='name' value='' + name style='width:50%')
2023-02-20 03:43:53 +01:00
span(style='font-size:9pt;color:red;user-select:none' title='required') *
2023-02-19 06:30:02 +01:00
tr
td Your email:
td
2023-02-27 02:08:44 +01:00
input(type='email' name='email' value='' + email)
2023-02-19 06:30:02 +01:00
tr
td Hide your email?
td
2023-02-27 02:17:40 +01:00
input(type='checkbox' name='hidemail' checked=hidemail)
2023-02-20 03:43:53 +01:00
// span(style='font-size:9pt;color:red;user-select:none' title='required') *
p(style='margin:6px 0')
| Your message (512 chars max):
span(style='font-size:9pt;color:red;user-select:none' title='required') *
2023-02-19 07:05:36 +01:00
textarea(name='message' style='width:100%;height:150px;max-width:600px;max-height:300px')
p
input(type='submit' class='send_button_1')
2023-02-20 03:43:53 +01:00
if (errors)
br
span(style='font-weight:bold;color:darkred;font-size:9pt') !{errors}
2023-02-22 07:42:43 +01:00
br
a(style='font-size:9pt' href='/guestbook') Clear errors
2023-02-19 06:30:02 +01:00
td(style='padding:0 16px;margin:0')
h5 Guidelines
ul
li Follow the DBAA policy.
li
| Do not post spam ads, keep it for humans.
ul
2023-02-19 07:05:36 +01:00
li There is no captcha for a reason. I'd like to keep it this way for as long as possible, so I humbly ask not to ruin it.
2023-02-22 08:42:39 +01:00
li
| DMCA content is not allowed. If your rights are violated, send your strikes to:
a(href='mailto:me@blek.codes')
+label('me@blek.codes', '#a0a0b6')
2023-02-19 06:30:02 +01:00
span(style='font-size:10pt;color:darkred;font-weight:bold').
Warning: Your ip (#{ip}) will be logged and displayed for everyone.<br/>
2023-02-19 08:07:44 +01:00
You can delete your own message if it was sent from the same ip for 24 hours after it was sent.
2023-02-20 03:43:53 +01:00
p
span(style='font-size:9pt;color:red;user-select:none' title='required') *
| - required
2023-02-19 08:07:44 +01:00
hr
if (!data)
p No records available.
else
2023-02-20 03:43:53 +01:00
table(class='gb_entries')
2023-02-20 03:53:03 +01:00
each entry, i in data
2023-02-20 05:07:48 +01:00
tr(id='gb_entry_' + entry.id)
2023-02-19 08:07:44 +01:00
td(width='20%' class='gb_sender_data')
2023-02-20 03:43:53 +01:00
p(style='font-size:9pt')
| ID:
2023-02-20 05:07:48 +01:00
a(href='#gb_entry_' + entry.id) ##{entry.id}
2023-02-20 03:43:53 +01:00
br
| Sender: #{entry.name}
br
if (!entry.hidemail)
2023-02-20 03:53:03 +01:00
| Email:
a(href='mailto:' + entry.email)= entry.email
2023-02-20 08:02:06 +01:00
if (entry.email == '')
2023-02-20 08:12:43 +01:00
span(class='gb_no_mail')
2023-02-20 03:43:53 +01:00
else
| Email:
2023-02-20 07:54:08 +01:00
span(class='gb_hidden_mail' style='width:' + (10 * (entry.email || '.').length) + 'px')
2023-02-20 03:43:53 +01:00
br
| IP: #{entry.ip}
br
| Date: #{TimeSince(new Date(entry.time * 1000))} ago
if (ip == entry.ip && Math.floor(Date.now() / 1000) - entry.time <= (60 * 60 * 24))
p(style='margin:0;padding:0;padding-bottom:12px')
2023-02-20 05:07:48 +01:00
a(href='/guestbook/del/' + entry.id class='gb_record_del_btn' title='you can delete your own messages') delete
2023-02-19 16:12:09 +01:00
td(width='80%' class='gb_entry_text')
p(class='gb_entry_text_title') Message:
2023-02-20 06:40:18 +01:00
pre(class='gb_entry_message_text').
2023-02-20 03:43:53 +01:00
#{entry.text}