From a119a3c73f02408b0e2ceedf0ac71e4e684b4cad Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 7 Mar 2019 16:48:29 -0500 Subject: Add animation, blog, and feed template --- package-lock.json | 116 ++++++++++++++++++++++++++-------------------------- src/css/styles.css | 102 ++++++++++++++++++++++++++++++++++++++++----- src/html/admin.html | 5 ++- src/html/blog.html | 36 ++++++++++++++++ src/html/bread.html | 18 ++------ src/html/essay.html | 1 - src/html/feed.html | 16 ++++++++ src/html/index.html | 22 ++++------ src/html/login.html | 1 - src/index.js | 4 ++ src/js/feed.js | 10 +++++ src/server.js | 14 +++++++ 12 files changed, 246 insertions(+), 99 deletions(-) create mode 100644 src/html/blog.html create mode 100644 src/html/feed.html create mode 100644 src/js/feed.js diff --git a/package-lock.json b/package-lock.json index 63ebd33..17a85b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,12 +7,12 @@ "@types/geojson": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", - "integrity": "sha1-PgKXJyjGkkjCrwjWCkjLuGgP/98=" + "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==" }, "@types/node": { "version": "10.12.18", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha1-HTynZHGJFVhPzZ9jRGIbdnJmXGc=" + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, "accepts": { "version": "1.3.5", @@ -26,7 +26,7 @@ "ajv": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha1-Y2D17Q2A8jLMKylMNi1dwuU43WE=", + "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -47,7 +47,7 @@ "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "requires": { "safer-buffer": "~2.1.0" } @@ -70,7 +70,7 @@ "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=" + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -83,7 +83,7 @@ "bluebird": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha1-fQHG+WFsmlGrD4xUmnnf5uwz76c=" + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==" }, "body-parser": { "version": "1.18.3", @@ -105,7 +105,7 @@ "bootstrap": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.3.tgz", - "integrity": "sha1-DrNxryyESOjCEEEdDLgkpkCaEr4=" + "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==" }, "buffer-equal-constant-time": { "version": "1.0.1", @@ -148,7 +148,7 @@ "combined-stream": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "requires": { "delayed-stream": "~1.0.0" } @@ -201,7 +201,7 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=" + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "cookie": { "version": "0.3.1", @@ -238,7 +238,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } @@ -251,7 +251,7 @@ "denque": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/denque/-/denque-1.3.0.tgz", - "integrity": "sha1-aBCS70SmMCRtP27bKhmSMOro52s=" + "integrity": "sha512-4SRaSj+PqmrS1soW5/Avd7eJIM2JJIqLLmwhRqIGleZM/8KwZq80njbSS2Iqas+6oARkSkLDHEk4mm78q3JlIg==" }, "depd": { "version": "1.1.2", @@ -275,7 +275,7 @@ "dottie": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.1.tgz", - "integrity": "sha1-aXrZ1yAE23V00h+JJGajwoWJNlk=" + "integrity": "sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw==" }, "ecc-jsbn": { "version": "0.1.2", @@ -317,7 +317,7 @@ "express": { "version": "4.16.4", "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha1-/d72GSYQniTFFeqX/S8b2/Yt8S4=", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", "requires": { "accepts": "~1.3.5", "array-flatten": "1.1.1", @@ -354,7 +354,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extsprintf": { "version": "1.3.0", @@ -393,7 +393,7 @@ "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -413,7 +413,7 @@ "generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha1-8GlhdpDBDIaOc7hGV0Z2T5fDR58=", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "requires": { "is-property": "^1.0.2" } @@ -421,7 +421,7 @@ "generic-pool": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.5.0.tgz", - "integrity": "sha1-rKxP10Ohdf8gV084CRADZGTLYfc=" + "integrity": "sha512-dEkxmX+egB2o4NR80c/q+xzLLzLX+k68/K8xv81XprD+Sk7ZtP14VugeCz+fUwv5FzpWq40pPtAkzPRqT8ka9w==" }, "getpass": { "version": "0.1.7", @@ -439,7 +439,7 @@ "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -469,7 +469,7 @@ "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -527,7 +527,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stringify-safe": { "version": "5.0.1", @@ -590,7 +590,7 @@ "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=" + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "lodash.includes": { "version": "4.3.0", @@ -630,12 +630,12 @@ "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha1-mntxz7fTYaGU6lVSQckvdGjVvyg=" + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" @@ -659,17 +659,17 @@ "mime": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=" + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { "version": "1.37.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng=" + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" }, "mime-types": { "version": "2.1.21", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "requires": { "mime-db": "~1.37.0" } @@ -690,12 +690,12 @@ "moment": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s=" + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "moment-timezone": { "version": "0.5.23", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz", - "integrity": "sha1-fLsA2ywUxxsZMDy0ew+wpthlFGM=", + "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==", "requires": { "moment": ">= 2.9.0" } @@ -723,7 +723,7 @@ "mysql2": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-1.6.4.tgz", - "integrity": "sha1-XH26i3hSW9TwHJmz8zJ2cN9nXpY=", + "integrity": "sha512-ZYbYgK06HKfxU45tYYLfwW5gKt8BslfE7FGyULNrf2K2fh+DuEX+e0QKsd2ObpZkMILefaVn8hsakVsTFqravQ==", "requires": { "denque": "1.3.0", "generate-function": "^2.3.1", @@ -738,7 +738,7 @@ "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -768,7 +768,7 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-assign": { "version": "4.1.1", @@ -806,7 +806,7 @@ "proxy-addr": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha1-7PxzO/Iv+Mb0B/onUye5q2fki5M=", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", "requires": { "forwarded": "~0.1.2", "ipaddr.js": "1.8.0" @@ -820,17 +820,17 @@ "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ=" + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "range-parser": { "version": "1.2.0", @@ -840,7 +840,7 @@ "raw-body": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", "requires": { "bytes": "3.0.0", "http-errors": "1.6.3", @@ -862,7 +862,7 @@ "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -898,22 +898,22 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha1-fnQlb7qknHWqfHogXMInmcrIAAQ=" + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -938,7 +938,7 @@ "sequelize": { "version": "4.42.0", "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.42.0.tgz", - "integrity": "sha1-Q5Rnunv+fVr8xW1is+CRhg+/GPM=", + "integrity": "sha512-qxAYnX4rcv7PbNtEidb56REpxNJCdbN0qyk1jb3+e6sE7OrmS0nYMU+MFVbNTJtZfSpOEEL1TX0TkMw+wzZBxg==", "requires": { "bluebird": "^3.5.0", "cls-bluebird": "^2.1.0", @@ -962,7 +962,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "requires": { "ms": "^2.1.1" } @@ -970,14 +970,14 @@ "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=" + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" } } }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -988,12 +988,12 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=" + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "shimmer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha1-YQhZ994ye1h+/r9QH7QxF/mv8zc=" + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" }, "sqlstring": { "version": "2.3.1", @@ -1003,7 +1003,7 @@ "sshpk": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha1-yUbWvZsaOdDoY1dj9SQtbtbctik=", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -1019,7 +1019,7 @@ "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=" + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, "streamsearch": { "version": "0.1.2", @@ -1034,7 +1034,7 @@ "terraformer": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.9.tgz", - "integrity": "sha1-d4Uf70pJyQs0XcU88mgJ/fKdzaY=", + "integrity": "sha512-YlmQ1fsMWTkKGDGibCRWgmLzrpDRUr63Q025LJ/taYQ6j1Yb8q9McKF7NBi6ACAyUXO6F/bl9w6v4MY307y5Ag==", "requires": { "@types/geojson": "^1.0.0" } @@ -1042,7 +1042,7 @@ "terraformer-wkt-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.0.tgz", - "integrity": "sha1-ydasPf8l9MC9NE6WH0JpSWGDTDQ=", + "integrity": "sha512-QU3iA54St5lF8Za1jg1oj4NYc8sn5tCZ08aNSWDeGzrsaV48eZk1iAVWasxhNspYBoCqdHuoot1pUTUrE1AJ4w==", "requires": { "@types/geojson": "^1.0.0", "terraformer": "~1.0.5" @@ -1056,7 +1056,7 @@ "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -1085,7 +1085,7 @@ "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.18" @@ -1104,7 +1104,7 @@ "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "requires": { "punycode": "^2.1.0" } @@ -1122,12 +1122,12 @@ "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE=" + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validator": { "version": "10.11.0", "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", - "integrity": "sha1-ADEI6m6amHTTHMyeUAaFbM12sig=" + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==" }, "vary": { "version": "1.1.2", @@ -1147,12 +1147,12 @@ "vue": { "version": "2.5.22", "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.22.tgz", - "integrity": "sha1-O/iAQa8IuFOcN7JotwynkkXpzDA=" + "integrity": "sha512-pxY3ZHlXNJMFQbkjEgGVMaMMkSV1ONpz+4qB55kZuJzyJOhn6MSy/YZdzhdnumegNzVTL/Dn3Pp4UrVBYt1j/g==" }, "wkx": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.6.tgz", - "integrity": "sha1-Ioq1kuZFc4Lqb7efyCUFjQf85SM=", + "integrity": "sha512-LHxXlzRCYQXA9ZHgs8r7Gafh0gVOE8o3QmudM1PIkOdkXXjW7Thcl+gb2P2dRuKgW8cqkitCRZkkjtmWzpHi7A==", "requires": { "@types/node": "*" } diff --git a/src/css/styles.css b/src/css/styles.css index 9a7d048..a455835 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -1,5 +1,39 @@ +:root { + --background: #fff; + --background-accent: #f0f0f0; + --accent: #ada; + --text: #000; + --btn-color: #2d2; + --btn-text: #000; + --btn-hover: #0a0; + --light-text: #aaa +} + + body { padding: 15px; + background-color: var(--background); + font-family: Arial, Helvetica, sans-serif; +} + +h1 { + font-size: 30pt; + font-weight: 150; + margin-bottom: 0; +} + +@keyframes zoom-left { + 0% {left: 100%; } + 100% {left: 0;} +} + +footer { + text-align: center; + padding-top: 1em; + padding-bottom: 2em; + border-top: 1px solid var(--light-text); + color: var(--light-text); + background-color: var(--background-accent); } .essay{ @@ -7,14 +41,14 @@ body { } .figure { - border: 1px solid #777777; - background-color: #dddddd; + border: 1px solid #777; + background-color: #ddd; padding: 10px; } .item { margin: 10px; - border: 2px solid #777777; + border: 2px solid #777; border-radius: 5px; padding: 7px; } @@ -26,15 +60,17 @@ img { .card { margin: 1em; padding: 2%; - border: 1px solid #aaaaaa; + border: 1px solid var(--text); + border-radius: 3px; display: inline; min-width: 200px; + background-color: var(--background-accent); } .card img { width: 100%; - padding: 2%; - + margin: 2%; + border: 2px solid #888; } .main-page{ @@ -42,10 +78,22 @@ img { flex-direction: row; } +#feed { + width: 100%; +} .feed { width: 90%; display: flex; flex-direction: column; + margin-top: 8px; + animation-name: zoom-left; + animation-duration: .5s; + animation-iteration-count: 1; + position: relative; +} + +p { + margin-top: 0; } @media screen and (min-width: 900px) { @@ -60,14 +108,20 @@ img { } .sidebar { - height: 100vh; + /* height: 50vh; */ + height: 100%; width: 100px; margin: 20px; + padding: 20px; + border: 1px solid var(--text); + border-radius: 3px; + background-color: var(--background-accent); } .sidebar ul { list-style: none; padding: 0; + margin-top: 0; } .sidebar ul li { @@ -77,18 +131,46 @@ img { margin-right: auto; } -.btn-primary { +.btn { + display: inline-block; + padding: 1px 3px; + border: 1px solid var(--btn-text); + border-radius: 3px; width: 100%; - height: 2em; - border-radius: 0; + max-width: 100px; + line-height: 2em; text-align: center; + vertical-align: middle; + white-space: nowrap; + text-decoration: none; +} + +.btn-primary { + height: 2em; font-size: 20px; + background-color: var(--btn-color); + color: var(--btn-text); +} + +.btn-primary:hover{ + background-color: var(--btn-hover); } .date { font-style: italic; margin: 0em; } +.tag { + font-style: normal; + padding-left: 1em; + font-weight: lighter; + font-size: .8em; + text-decoration: none; + color: var(--light-text); +} +.tag::before{ + content: "#"; +} .url-table, .ip-table { width: 30%; diff --git a/src/html/admin.html b/src/html/admin.html index 1ec7e15..0f98eea 100644 --- a/src/html/admin.html +++ b/src/html/admin.html @@ -5,7 +5,6 @@ Mark's Kitchen - Admin - @@ -35,6 +34,9 @@
+
+ Tags: +
Images:
@@ -42,6 +44,7 @@ diff --git a/src/html/blog.html b/src/html/blog.html new file mode 100644 index 0000000..01cd2f6 --- /dev/null +++ b/src/html/blog.html @@ -0,0 +1,36 @@ + + + + + Mark's Kitchen - Blog + + + + + + + + + + +
+

Blog

+
+
+ + + \ No newline at end of file diff --git a/src/html/bread.html b/src/html/bread.html index 1ce1478..0658e11 100644 --- a/src/html/bread.html +++ b/src/html/bread.html @@ -5,12 +5,12 @@ Mark's Kitchen - Bread - + @@ -29,17 +29,7 @@

Bread

Some highlights (and lowlights) of breadmaking -
-
-

{{ post.description }}

-
- - - -
-

{{ post.createdAt.substring(0,10) }}

-
-
+
diff --git a/src/html/essay.html b/src/html/essay.html index 7110df1..6152a4f 100644 --- a/src/html/essay.html +++ b/src/html/essay.html @@ -5,7 +5,6 @@ Mark's Kitchen - Essays - diff --git a/src/html/feed.html b/src/html/feed.html new file mode 100644 index 0000000..358ef61 --- /dev/null +++ b/src/html/feed.html @@ -0,0 +1,16 @@ +
+
+

{{ post.description }}

+
+ + + +
+

+ {{ post.createdAt.substring(0,10) }} + + {{tag}} + +

+
+
\ No newline at end of file diff --git a/src/html/index.html b/src/html/index.html index 01f6e4e..73ed147 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -5,13 +5,13 @@ Mark's Kitchen - + @@ -32,22 +32,16 @@ -
-
-

{{ post.description }}

-
- - - -
-

{{ post.createdAt.substring(0,10) }}

-
-
+
+ \ No newline at end of file diff --git a/src/html/login.html b/src/html/login.html index 53a2d06..58ca2ae 100644 --- a/src/html/login.html +++ b/src/html/login.html @@ -5,7 +5,6 @@ Mark's Kitchen - Login - diff --git a/src/index.js b/src/index.js index c689779..5315c8d 100644 --- a/src/index.js +++ b/src/index.js @@ -57,6 +57,9 @@ function setUpModels(){ "pictures": database.define('pictures', { source: { type: Sequelize.TEXT, allowNull: false}, }), + "tags": database.define('tags', { + text: { type: Sequelize.TEXT, allowNull: false}, + }), "users": database.define('user', { username: { type: Sequelize.STRING, @@ -73,6 +76,7 @@ function setUpModels(){ }) } models.pictures.belongsTo(models.posts); + models.tags.belongsTo(models.posts); return models; } diff --git a/src/js/feed.js b/src/js/feed.js new file mode 100644 index 0000000..a80af9c --- /dev/null +++ b/src/js/feed.js @@ -0,0 +1,10 @@ +function loadFeed(callback){ + var myRequest = new Request('/feed'); + fetch(myRequest).then(function(response) { + return response.text(); + }).then(function(response) { + console.log(response); + document.getElementById("feed").innerHTML = response; + callback() + }); +} diff --git a/src/server.js b/src/server.js index 5bbb980..1f0573c 100644 --- a/src/server.js +++ b/src/server.js @@ -66,6 +66,8 @@ function setUpRoutes(models, jwtFunctions, database) { server.get('/admin', (req, res) => res.sendFile(__dirname + "/html/admin.html")); server.get('/login', (req, res) => res.sendFile(__dirname + "/html/login.html")) server.get('/bread', (req, res) => res.sendFile(__dirname + "/html/bread.html")); + server.get('/blog', (req, res) => res.sendFile(__dirname + "/html/blog.html")); + server.get('/feed', (req, res) => res.sendFile(__dirname + "/html/feed.html")); server.get('/essay', (req, res) => res.sendFile(__dirname + "/html/essay.html")); server.get('/snake', (req, res) => res.sendFile(__dirname + "/html/snake.html")); server.get('/setScore', (req, res) => { @@ -82,6 +84,9 @@ function setUpRoutes(models, jwtFunctions, database) { res.status(400).send(e.message); } }) + server.get('/blog/:id', async (req, res, next) => { + + }); server.get('/posts/:type', async (req, res, next) => { try { const { type } = req.params; @@ -90,6 +95,9 @@ function setUpRoutes(models, jwtFunctions, database) { for (const post of posts) { const images = await models.pictures.findAll({ attributes: ["source"], where: { postId: post.id } }).map(x => x.source); post.images = images; + const tags = await models.tags.findAll({ attributes: ["text"], where: { postId: post.id } }).map(x => x.text); + console.log(tags); + post.tags= tags; } res.status(200).send(posts); next(); @@ -105,6 +113,9 @@ function setUpRoutes(models, jwtFunctions, database) { await models.pictures.create({ "source": "uploads/" + file.filename, "postId": newPost.id }); console.log("uploaded ", file.path); }) + req.body.tags.split(" ").forEach(async (tag) => { + await models.tags.create({ "text": tag, "postId": newPost.id}); + }) console.log(newPost); res.redirect(`/${type}`); next(); @@ -137,6 +148,9 @@ function setUpRoutes(models, jwtFunctions, database) { server.get('/essay/:id', (req, res) => { res.sendFile(__dirname + "/html/essay/" + req.params.id); }); + server.get('/js/:id', (req, res) => { + res.sendFile(__dirname + "/js/" + req.params.id); + }); } -- cgit v1.2.3