mirror of
https://github.com/zyphlar/doorlock.git
synced 2024-04-03 21:36:03 +00:00
Add start of doorlock server
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
|
||||
extends ./layout.pug
|
||||
|
||||
block title
|
||||
| Cards
|
||||
|
||||
block content
|
||||
h1.page-heading Cards
|
||||
table.collapse.w-100
|
||||
thead
|
||||
tr
|
||||
th.px-md.py-sm.bb.bc-gray-lighter.gray-light.fw-1 Member Name
|
||||
th.px-md.py-sm.bb.bc-gray-lighter.gray-light.fw-1 RFID Card Number
|
||||
tbody
|
||||
for card in cards
|
||||
tr.hov-bg-gray-lightest
|
||||
td.px-md.py-sm.bb.bc-gray-lighter= card.name
|
||||
td.px-md.py-sm.bb.bc-gray-lighter= card.number
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
extends ./layout.pug
|
||||
|
||||
block title
|
||||
| Scanned Failed!
|
||||
|
||||
block content
|
||||
.df.ai-center.jc-center.bg-danger.white.px-lg.py-md
|
||||
i.fas.fa-times.mr-lg.txt-xxl
|
||||
.f-1
|
||||
.txt-xl Card not valid
|
||||
.mt-sm.danger-lighter Sorry your card isn't valid. Maybe your membership has expired?
|
||||
p
|
||||
a(href='/') ← Back
|
||||
|
||||
script.
|
||||
//- setTimeout(function () { window.location.href = '/' }, 6000)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
extends ./layout.pug
|
||||
|
||||
block title
|
||||
| Scan Card
|
||||
|
||||
block content
|
||||
h1.page-heading Scan Your Card
|
||||
form(action='/checkin' method='post')
|
||||
input#rfid.input.input-block(name="rfid" autofocus)
|
||||
@@ -0,0 +1,23 @@
|
||||
doctype html
|
||||
html(lang='en')
|
||||
head
|
||||
title
|
||||
block title
|
||||
| - Chimera Doorlock
|
||||
link(href='https://fonts.googleapis.com/css?family=Roboto:100,400,700' rel='stylesheet')
|
||||
link(href='//unpkg.com/ress/dist/ress.min.css' rel='stylesheet' type='text/css')
|
||||
link(href='//unpkg.com/euphoria/dist/euphoria.min.css' rel='stylesheet' type='text/css')
|
||||
link(href='https://use.fontawesome.com/releases/v5.0.13/css/all.css' rel='stylesheet' integrity='sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp' crossorigin='anonymous')
|
||||
link(href='/styles.css' rel='stylesheet')
|
||||
|
||||
body.p-none.m-none.ff-sans-serif
|
||||
header.df.p-md.gray.bb.bc-gray-lighter
|
||||
h1.txt-lg.fw-1.ls-lg.upper
|
||||
a(href='/').gray-light Chimera Doorlock
|
||||
.ml-auto
|
||||
a.ml-md(href='/') Scan
|
||||
a.ml-md(href='/cards') Cards
|
||||
a.ml-md(href='/logs') Logs
|
||||
|
||||
section.mx-auto.my-md.p-md(style='max-width: 900px;')
|
||||
block content
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
extends ./layout.pug
|
||||
|
||||
block title
|
||||
| Logs
|
||||
|
||||
block content
|
||||
h1.page-heading Logs
|
||||
table.collapse.w-100
|
||||
thead
|
||||
tr
|
||||
th.px-md.py-sm.bb.bc-gray-lighter.gray-light.fw-1 Date
|
||||
th.px-md.py-sm.bb.bc-gray-lighter.gray-light.fw-1 Member Name
|
||||
th.px-md.py-sm.bb.bc-gray-lighter.gray-light.fw-1 RFID Card Number
|
||||
tbody
|
||||
for log in logs
|
||||
- date = new Date(log.timestamp)
|
||||
tr.hov-bg-gray-lightest
|
||||
td.px-md.py-sm.bb.bc-gray-lighter.c-help(title=date)= moment(date).fromNow()
|
||||
td.px-md.py-sm.bb.bc-gray-lighter= log.card.name
|
||||
td.px-md.py-sm.bb.bc-gray-lighter= log.card.number
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
extends ./layout.pug
|
||||
|
||||
block title
|
||||
| Scanned Successfully!
|
||||
|
||||
block content
|
||||
.df.ai-center.jc-center.bg-success.white.px-lg.py-md
|
||||
i.fas.fa-check.mr-lg.txt-xxl
|
||||
.f-1
|
||||
.txt-xl Welcome in #{name}!
|
||||
.mt-sm.success-lighter Have an awesome day of making!
|
||||
p
|
||||
a(href='/') ← Back
|
||||
|
||||
script.
|
||||
//- setTimeout(function () { window.location.href = '/' }, 6000)
|
||||
|
||||
Reference in New Issue
Block a user