Add start of doorlock server

This commit is contained in:
Dana Woodman
2018-07-10 14:47:07 -07:00
parent 8c83229696
commit 9c11a0506a
24 changed files with 4700 additions and 6697 deletions
+18
View File
@@ -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
+19
View File
@@ -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)
+9
View File
@@ -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)
+23
View File
@@ -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
+21
View File
@@ -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
+18
View File
@@ -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)