This repository has been archived on 2022-10-14. You can view files and clone it, but cannot push or open issues/pull-requests.
thing/views/home.pug

48 lines
1.2 KiB
Plaintext

extends base
block content
link(rel="stylesheet" href="home.css")
h1 List of people who love Hatsune Miku
table
colgroup
col
col
col
col
col
thead
th date
th name
th email
th website
th message
tbody
if enableForm
form(action="submit" method="POST")
tr
td(class="td-date")=new Date()
td
input(name="username" placeholder="your name" maxlength=32 required)
td
input(name="email" type="email" placeholder="you@email.host" maxlength=39)
td
input(name="website" type="url" placeholder="http://your.website" maxlength=69)
td
div(style="display: flex;")
input(name="message" placeholder="your message" maxlength=169 style="flex-grow: 1;")
input(type="submit")
for entry in tabledata
tr
td(class="td-date")=entry.date
td=entry.username
td
a(href="mailto:"+entry.email)=entry.email
td
a(href entry.website target="_blank")=entry.website
td=entry.message
script.
let dateElements = document.getElementsByClassName("td-date");
for (let element of dateElements) {
let date = new Date(element.innerText);
element.innerText = date.toLocaleString();
}