From 74f7f2d1a59286f213866609de69c0ffd75eb833 Mon Sep 17 00:00:00 2001 From: Alexis Hovorka Date: Wed, 4 Nov 2020 15:50:15 -0700 Subject: [chore] Saving misc modifications 2020-11-04 --- .gitignore | 1 + lib/static.js | 9 +++++- public/index.html | 20 ++++++++++++- public/style.css | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 93f1361..090a040 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +logs node_modules npm-debug.log diff --git a/lib/static.js b/lib/static.js index 2be10bc..7c2f9c1 100644 --- a/lib/static.js +++ b/lib/static.js @@ -56,7 +56,14 @@ module.exports = class Static { return res.end(this.e500); }} - if (stats.isDirectory()) path += "/index.html"; + if (stats.isDirectory()) { + if (!path.endsWith("/")) { + res.writeHead(302, {"Location":sane+"/"}); + return res.end(`Redirecting: ${sane}/`); + } + path += "index.html"; + } + const ext = `${Path.extname(path)}`.toLowerCase(); const stream = fs.createReadStream(path); diff --git a/public/index.html b/public/index.html index 88cf66d..28ace1d 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,25 @@ -

nomicvote

+
+

nomicvote

+ +
+ + + +
+
+ +
+
+
+
+ +
+
+
+
diff --git a/public/style.css b/public/style.css index 8db054f..07e0c23 100644 --- a/public/style.css +++ b/public/style.css @@ -9,6 +9,13 @@ h1 { font-size: 34px; font-weight: normal; + text-align: center; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } h4 { @@ -19,3 +26,80 @@ h4 { p { font-size: 16px; } + +#buttons { + max-width: 600px; + margin: auto; + text-align: center; + font-size: 0; + line-height: 0; +} + +#yes-btn, #no-btn { + display: inline-block; + margin: 8px 0; + width: 50%; + height: 56px; + padding: 0 16px; /* 8 */ + /* 16 from side */ + font-size: 24px; + color: #fff; + border: 0; + border-radius: 56px; + outline: 0; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-tap-highlight-color: transparent; +} + +#yes-btn { + background-color: #58c478; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +#no-btn { + background-color: #ea6462; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +#pass-btn { + display: inline-block; + margin: 8px 0; + height: 40px; + padding: 0 16px; /* 8 */ + /* 16 from side */ + border-radius: 40px; + font-size: 20px; + color: #fff; + background-color: #1d7ba3; + border: 0; + outline: 0; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-tap-highlight-color: transparent; +} + +.vote-bar, .vote-bar .red, .vote-bar .grn { height: 10px; border-radius: 10px; } +.vote-bar { position: relative; margin: 20px; background: #efefef; } +.vote-bar .red { position: absolute; right:0; background: #ea6462; } +.vote-bar .grn { position: absolute; left: 0; background: #58c478; } +.vote-bar.dom-red .red { z-index: 1; } +.vote-bar.dom-grn .grn { z-index: 1; } + +.fab { + height: 56px; + width: 56px; /* 40 */ + padding: 16px; /* 8 */ + /* 16 from side */ + border-radius: 56px; + box-shadow: 0 0 0 1px rgba(0,0,0,.05), + 0 3px 3px rgba(0,0,0,.16), 0 3px 3px rgba(0,0,0,.23); +} + +/* +.matsh-d1 { box-shadow: 0 1px 1.5px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.24); } +.matsh-d2 { box-shadow: 0 3px 3px rgba(0,0,0,.16), 0 3px 3px rgba(0,0,0,.23); } +.matsh-d3 { box-shadow: 0 10px 10px rgba(0,0,0,.19), 0 6px 3px rgba(0,0,0,.23); } +.matsh-d4 { box-shadow: 0 14px 14px rgba(0,0,0,.25), 0 10px 5px rgba(0,0,0,.22); } +.matsh-d5 { box-shadow: 0 19px 19px rgba(0,0,0,.30), 0 15px 6px rgba(0,0,0,.22); } +*/ -- cgit v1.2.3-54-g00ecf