From 3ce0ab37ae622f5b0b3d1997c8fe1a8d494b5737 Mon Sep 17 00:00:00 2001 From: Francisca Vargas Date: Sun, 15 Jul 2018 16:11:50 +0100 Subject: [PATCH 1/3] Testing server --- package-lock.json | 373 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 22 +++ public/index.html | 59 ++++---- server.js | 22 +++ 4 files changed, 450 insertions(+), 26 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 server.js diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3329f59 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,373 @@ +{ + "name": "express-workshop", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.2", + "http-errors": "1.6.3", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.16" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "requires": { + "accepts": "1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "2.0.3", + "qs": "6.5.1", + "range-parser": "1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "1.4.0", + "type-is": "1.6.16", + "utils-merge": "1.0.1", + "vary": "1.1.2" + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.4.0", + "unpipe": "1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.4.0" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.6.0" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.4.0" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.18" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..eb9be66 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "express-workshop", + "version": "1.0.0", + "description": "This is the exercise that accompanies the first Node class. Based on the Node Girls Workshop https://github.com/node-girls/express-workshop", + "main": "server.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/franciscavargas/express-workshop.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/franciscavargas/express-workshop/issues" + }, + "homepage": "https://github.com/franciscavargas/express-workshop#readme", + "dependencies": { + "express": "^4.16.3" + } +} diff --git a/public/index.html b/public/index.html index 859031c..04b373f 100644 --- a/public/index.html +++ b/public/index.html @@ -1,31 +1,38 @@ - - - - My first Node.js blog! - - - - -
- -

Node Girls

-
-
-
- -
-
-
-
+ + + + My first Node.js blog! + + + -

Recent Posts

+ +
+ +

Node Girls

+
+
+
+

Create a blog post

+
+ + +
+
-
-
- - - - +
+
+
+ +

Recent Posts

+ +
+
+ + + + + \ No newline at end of file diff --git a/server.js b/server.js new file mode 100644 index 0000000..71da796 --- /dev/null +++ b/server.js @@ -0,0 +1,22 @@ +const express = require("express"); +const app = express(); + +app.use(express.static("public")); + +app.get("/student", function(req, res) { + console.log("New request to Student page at " + Date()); + res.writeHead(200, { "Content-Type": "text/html" }); + res.write("

This is student Page.

"); + res.end(); +}); + +app.get("*", function(req, res) { + console.log("404 at " + Date()); + res.writeHead(404, { "Content-Type": "text/html" }); + res.write("NOT FOUND!!!"); + res.end(); +}); + +app.listen(5000, function() { + console.log("Server is listening on port 5000. Ready to accept requests!"); +}); From 74d8213d1137f84aacaef5b62825ea2010888d5b Mon Sep 17 00:00:00 2001 From: Francisca Vargas Date: Mon, 16 Jul 2018 23:06:36 +0100 Subject: [PATCH 2/3] Finished point 8 --- data/posts.json | 4 +- package-lock.json | 13 + package.json | 3 +- public/README.md | 1 + public/css/style-subscribe.css | 37 +++ public/css/style.css | 290 ++++++++++++++++++++++ public/img/logo1.png | Bin 27783 -> 0 bytes public/img/logo2.png | Bin 6562 -> 0 bytes public/index.html | 440 ++++++++++++++++++++++++++++++--- public/main.css | 147 ----------- public/script.js | 78 ------ public/subscribe.html | 45 ++++ server.js | 24 +- 13 files changed, 818 insertions(+), 264 deletions(-) create mode 100755 public/README.md create mode 100644 public/css/style-subscribe.css create mode 100755 public/css/style.css delete mode 100644 public/img/logo1.png delete mode 100644 public/img/logo2.png mode change 100644 => 100755 public/index.html delete mode 100644 public/main.css delete mode 100644 public/script.js create mode 100644 public/subscribe.html diff --git a/data/posts.json b/data/posts.json index b4d8361..19483be 100644 --- a/data/posts.json +++ b/data/posts.json @@ -1,3 +1 @@ -{ - "1467390356291": "This is my very first blog post!" -} +{"1467390356291":"maria@gmail.com","1531778580603":"d","1531778622826":"d"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3329f59..0cec464 100644 --- a/package-lock.json +++ b/package-lock.json @@ -135,6 +135,14 @@ "vary": "1.1.2" } }, + "express-formidable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/express-formidable/-/express-formidable-1.0.0.tgz", + "integrity": "sha1-3JIvBFUTIyJFip7BowHYkbP/yo0=", + "requires": { + "formidable": "1.2.1" + } + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -149,6 +157,11 @@ "unpipe": "1.0.0" } }, + "formidable": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", diff --git a/package.json b/package.json index eb9be66..7b078a0 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "homepage": "https://github.com/franciscavargas/express-workshop#readme", "dependencies": { - "express": "^4.16.3" + "express": "^4.16.3", + "express-formidable": "^1.0.0" } } diff --git a/public/README.md b/public/README.md new file mode 100755 index 0000000..9400959 --- /dev/null +++ b/public/README.md @@ -0,0 +1 @@ +# tribute-page \ No newline at end of file diff --git a/public/css/style-subscribe.css b/public/css/style-subscribe.css new file mode 100644 index 0000000..a4b05b6 --- /dev/null +++ b/public/css/style-subscribe.css @@ -0,0 +1,37 @@ +/* Style the form element with a border around it */ +form { + border: 4px solid #f1f1f1; +} + +/* Add some padding and a grey background color to containers */ +.container { + padding: 20px; + background-color: #f1f1f1; +} + +/* Style the input elements and the submit button */ +input[type="text"], +input[type="submit"] { + width: 100%; + padding: 12px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + box-sizing: border-box; +} + +/* Add margins to the checkbox */ +input[type="checkbox"] { + margin-top: 16px; +} + +/* Style the submit button */ +input[type="submit"] { + background-color: #4caf50; + color: white; + border: none; +} + +input[type="submit"]:hover { + opacity: 0.8; +} diff --git a/public/css/style.css b/public/css/style.css new file mode 100755 index 0000000..b19cc93 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,290 @@ +/* LEGACY BROWSERS */ +section, article, aside, footer, header, nav { + display: block; +} + +@import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,700|Roboto:400,400i,700'); + +body { + background-color: rgb(255, 255, 255); + font-family: 'Roboto' , sans-serif; + line-height: 1.5rem; + margin: 0; +} + +section { + align-items: baseline; + display: flex; + flex-direction: row; + justify-content: center; + overflow-x: hidden; + padding: 6rem; +} + +article { + width: 100%; +} + +aside { + background-color: rgb(255, 255, 255); + border-radius: 4px; + box-shadow: 1px 10px 50px 10px rgba(0,0,0,0.075); + font-size: 0.8rem; + margin-left: 100px; + padding: 1rem 2rem; + width: 40%; +} + +nav , footer { + align-items: center; + background-color: rgba(47,47,47,0.98); + display: flex; + justify-content: center; + min-height: 50px; + width: 100%; +} + +footer { + color: rgb(153, 153, 153); +} + +nav { + box-shadow: 0 1px 3px rgba(0,0,0,0.2); + position: fixed; + top: 0; +} + +figure { + margin: 0; +} + +h1, h3, h4, h5, h6 { + font-family: 'Playfair Display', serif; + font-weight: 300; + line-height: 1.2; +} + +h1 , h2 { + color: rgb(255, 255, 255); + margin-right: 4%; + text-align: right; + text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.4); +} + +h1 { + font-size: 4rem; +} + +h2 { + font-size: 1.5rem; + letter-spacing: 2px; + line-height: 1.2; +} + +h3 { + font-size: 3rem; +} + +h4 { + font-size: 1.5rem; +} + +h6 { + font-size: 0.8rem; + letter-spacing: 1px; + text-transform: uppercase; +} + +/* Navbar */ + +nav > a , nav > p { + background-color: transparent; + text-decoration: none; +} + +nav > a { + color: rgb(153, 153, 153); + padding: 10px 20px; +} + +nav > a:hover { + color: rgba(255, 255, 255, 0.8); +} + +nav > p { + color: rgba(255, 255, 255, 0.8); + letter-spacing: 2px; + padding: 0 20px; +} + +.hero { + background-size: cover; + height: calc(100vh - 56px); + width: 100%; +} + +/*Section - Hero Cover */ + +.hero.cover { + background-image: url('https://cdn5.kicksonfire.com/wp-content/uploads/2017/02/Serena-Williams.jpg?x76107'); + background-position: top center; + background-size: cover; + display: flex; + flex-direction: column; + justify-content: center; + margin-top: 56px; +} + +/*Section - Intro */ + +section.intro , section.playing , section.off-court{ + background-color: #eee; +} + +section > article.intro { + width: 70%; +} + +/* Section - Facts */ + +section.facts li { + margin-bottom: 1.2rem; +} + +section.facts span { + font-weight: bold; +} + +/* Section - Visuals */ +figure.visuals { + margin: 0; + max-height: calc(100vh - 56); + overflow-y: hidden; +} + +figure.visuals img { + height: auto; + vertical-align: bottom; + width: 100%; +} + +/* Section - Career */ +.career h3 { + text-align: center; +} + +section.career table { + box-shadow: -8px 10px 36px 5px rgba(59,70,78,0.15); + margin: 0 auto; + width: 80%; +} + +section.career table { + box-shadow: -8px 10px 36px 5px rgba(59,70,78,0.15); + margin: 0 auto; + padding: 2rem; + width: 70%; +} + +.career table thead { + margin-bottom: 0.5rem; + text-align: center; +} + +.career th, td { + padding: 0.5rem; +} + +.total-slam { + background-color: rgb(102, 103, 126); + color: rgb(255, 255, 255); +} + +.career table thead , .total-category { + background-color: rgb(56, 59, 83); + color: rgb(255, 255, 255); +} + +/* Emoji */ + +figure.emoji { + animation: emoji 1.5s ease infinite; + bottom: 10px; + position: fixed; + right: 10px; +} + +figure.emoji:hover { + animation-play-state: paused; + opacity: 0.5; +} + +@keyframes emoji { + 30% { transform: scale(1.1); } + 40%, 60% { transform: rotate(-20deg) scale(1.1); } + 50% { transform: rotate(20deg) scale(1.1); } + 70% { transform: rotate(0deg) scale(1.1); } + 100% { transform: scale(1); } +} + +figure.emoji img { + max-width: 90px; +} + +/* Source */ + +div.source { + padding: 6rem; + text-align: center; +} + +/* MEDIA QUERIES */ +@media screen and (min-width: 1600px) { + section.career table { + max-width: 50%; + } +} + +@media screen and (max-width: 768px) and (orientation: portrait), (max-width: 768px){ + nav { + flex-wrap: wrap; + justify-content: space-around; + text-align: center; + } + + section.intro { + flex-wrap: wrap; + justify-content: space-around; + } + + aside { + width: 100%; + margin-left: 0; + margin-top: 2rem; + } + + section.career { + padding: 3rem; + } + + section.career table { + padding: 0; + max-width: 70%; + width: inherit; + font-size: 0.8rem; + } +} + +@media screen and (max-width: 480px) { + section { + padding: 3rem; + } + + section.career { + padding: 1rem; + } + + section.career table { + font-size: 0.6rem; + } +} diff --git a/public/img/logo1.png b/public/img/logo1.png deleted file mode 100644 index 341a80265b49beacf24b44e1010a2844aaa1051b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27783 zcmd?R^;?wh^FF+QgdpsSgyb%Yij+Zj3J8iIEU}ab(%rFi3M!~?K&2a&j-^9NP=uwH z*d?W70qN#@gRjr={1Feo$g%EyUDwQYwmJWXBRfaJ^_U%!DpwKuhV^YV?UxwrGrHcmi7O*X9qwwf9P;S`?%8pXy}tX&ef!5B)HHW%|^4kU8=F zQ^K8mk@srcjG{dpMR|fFIdURdv4ZZ2>u=pY){m2Y$aCAU$+or9P6DH%L%Px$QE#c= zBmaK=#mwMdMU`D8B$7HMFg4TGADbkD5!gQQZVqhGpgosnjcUdqo2RBQV!-kLfBGZq zPhWEd6blu=FsSY_su?ucj5VK~*?cV^1Hl48Aly}!+1<3VYLCJ04*n^ujZ`e}YKjK& z<^S=zu@+9SBWY~w-1c!2uM5hT|F`uiqx6$~& zh@1JF6Ce;o76ik$%vwnyIfH_`9tBf?0zt%}F-rE^yVH-7`(Av6U2Y(&)Y|DLg?z_( zq6N1d{)@9OW>C~Q>?HzGz(BFZ)0(J>WT(^Azf16J4~f=N@ykV)DcC!FHo3A-)b5Xj zbkR=1FHic3QSy`YVt>)04f-sp(9oF5-`;NBn1~_yu4_~Fm)|2}lvG96>oX=H zQpo8$krWpv1^Iz5mK6OmsHWlZI|2kEx&nguZfZowp$&o#A(zj+rhp2);$nPkOnH0XcX< zG9x{{(CoiWN}UhB6q3i>(!EXl-zR;yy#BY+lG%=peA4j!j*rJSWvh$ z8VMzPHg4i7u==F7p$7HW#eZr#x-JRGruoNa4l(whxRH;%@;X%SeR<(31bMs>%vNF5 zO?)ASB7=0!>P(0jxbn}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0NX z*`iDHBv2?033KX>SVfbx4m~3SFo{Lo-KUxV1UOsFykT86@U~0>KZO4g2q^y)mXFWx zOSican(e-rR_#4LX^|^q>`ie{hc~0D$6o)o!*R>1E zh=8AJv8Ht_xHDszg@MTTdEba>sn19?NlNMqEAnML@9s8#bq913m6&QC&2p)mR$ovI`Afk`R6weAvc(za8#LM?~bj7NE;S5ZqOE!Ph<=;8qI4wm9yQf3e@$ zeVB*G+A_P)_Nb7(V6Gm%!@2ZXFl1Rma9s$!v4_FAdFVAoL`HhX15A=${r>&?w09Jk zxJq>SUGNboUMT2KG03@c>erd49-hqFmZHPk!#cKPgrtlYNYs)m&Az$y7iTH!7Y7#E*c^nojJ5!})CUcQ zn31fLuCly~EpTI=oTp#5me*+cwvlln@gd7y39?LLSq@%a1I;gUSr|Q;i{qSV4dE=c zS%1xTZY*q4C($7gv?;^NOBFC{=-oOZic1l=ZHs+^BY&4poM0j963sa+6`gH7A{75G iZz%q~*eE4#GFng9J1^x()B^8bK<6#(EwE-D@&6CcFuQO7 diff --git a/public/index.html b/public/index.html old mode 100644 new mode 100755 index 04b373f..a0cc057 --- a/public/index.html +++ b/public/index.html @@ -2,37 +2,417 @@ - - - My first Node.js blog! - - + + Tribute page + + + + + + -
- -

Node Girls

+ + + + + + + Serena Wiliams - Tribute page + + + + + +
+

Serena Williams

+

The Greatest Female Tennis Player of All Time

-
-
-

Create a blog post

-
- - -
-
- -
-
-
- -

Recent Posts

- -
-
- - - - - \ No newline at end of file + + +
+
+
+

Intro

+
+ +

Serena Jameka Williams + (born September 26, 1981) is an American professional tennis player. + The Women's Tennis Association (WTA) has ranked her world No. 1 in singles on eight separate occasions over the + last 15 years from 2002 to 2017. +

+

Williams holds the most Grand Slam titles in singles, doubles, and mixed doubles combined amongst active players. + She is the most recent female player to have held all four Grand Slam singles titles simultaneously (2002–03 and + 2014–15) and all four Grand Slam women's doubles titles simultaneously (2009–10).

+
+ + +
+ + +
+
+
+

Professional and Life Facts

+
+ +
    +
  • + September 1995 - Turns professional, losing her debut tennis match at the Bell Challenge in Quebec.
  • +
  • + January 1998 - Enters the Australian Open, her first Grand Slam tournament. She loses to her sister, Venus, + in the second round, 6-7, 1-6.
  • +
  • + 1999 - Enrolls at the Art Institute of Fort Lauderdale in Florida for fashion design.
  • +
  • + September 12, 1999 - Wins the US Open, becoming the first Williams sister to win a Grand Slam.
  • +
  • + July 8, 2002 - Ranked Women's Tennis Association (WTA) world number 1 for the first time in her career, + at age 20.
  • +
  • + 2002-2003 - Completes her first "Serena Slam," by winning all four Grand Slam titles - the French Open, + Wimbledon, US Open and the Australian Open.
  • +
  • + August 1, 2003 - Has surgery to repair a partially torn tendon in her left knee.
  • +
  • + September 14, 2003 - Williams' older half-sister, Yetunde Price, is murdered in Compton, California.
  • +
  • + 2004 - Launches "Aneres" clothing line (Serena spelled backwards).
  • +
  • + 2008 - Establishes the Serena Williams Foundation, to assist American youth touched by violent crime and + also underprivileged children around the world.
  • +
  • + September 12, 2009 - Williams goes on a profanity-laced outburst against a line judge who calls her for + a foot fault in the US Open semifinals against Kim Clijsters. Clijsters is awarded a penalty point to win the + match. The Grand Slam committee later fines Williams a record $82,500 and places her on probation for the next + two years.
  • +
  • + July 7, 2010 - Receives stitches in both her feet after stepping on broken glass while leaving a restaurant + in Munich. Later, she has to have surgeries in July and October to repair a lacerated tendon on her right foot.
  • +
  • + February 2011 - Undergoes emergency treatment for a hematoma related to a pulmonary embolism, a blood + clot in her lungs.
  • +
  • + September 2011 - Appointed a UNICEF international goodwill ambassador.
  • +
  • + February 18, 2013 - At age 31, becomes the oldest female tennis player to be ranked number 1 since computer + rankings began in 1975. This is the sixth time in her career to be ranked number one.
  • +
  • + September 7, 2014 - Williams wins her third consecutive US Open title.
  • +
  • + July 9, 2016span> - Wins the Wimbledon title for the 7th time. With her 22nd victory in a major tournament, + Williams ties Steffi Graf for most singles titles in the Open era
  • +
  • + September 12, 2016 - After 186 consecutive weeks ranked Women's Tennis Association (WTA) No. 1 in the + world, falls to No. 2 behind Angelique Kerber. Williams ties Steffi Graf's record for longest consecutive weeks + ranked No. 1.
  • +
  • December 29, 2016 - Announces her engagement to Reddit co-founder Alexis Ohanian.
  • +
  • + January 28, 2017 - Beats sister Venus in the Australian Open final, collecting a 23rd grand slam title + to surpass Steffi Graf for the Open Era lead.
  • +
  • + April 19, 2017 - Williams posts a side profile photo of herself in a yellow swimsuit with a caption that + reads "20 weeks" on Snapchat, that is quickly deleted. Her spokesperson later confirms to CNN that Williams and + fiancΓ© Alexis Ohanian are expecting their first child this fall.
  • +
  • + September 1, 2017 - Gives birth to a baby girl, Alexis Olympia Ohanian Jr.
  • +
+
+
+ +
+ Serena Williams playing tennis +
+ +
+
+
+

Playing Style

+
+ +

Williams is primarily a baseline player, and her game is built around taking immediate control of rallies with her + powerful and consistent serve, return of serve, and forceful groundstrokes from both her forehand and backhand + swings. Williams's forehand is considered to be among the most powerful shots in the women's game, as is her double-handed + backhand. Williams strikes her backhand groundstroke using an open stance, and uses the same open stance for her + forehand. Williams's aggressive play, a "high risk" style, is balanced in part by her serve, which most say is + the greatest in women's tennis history.

+

Williams is known for producing exceptional comebacks, particularly on the Grand Slam level. Williams has bounced + back from a set down to win in 37 Grand Slam matches.

+

She has stated that her favorite surface is clay because it gives her extra time to set up her shots.

+ +
+
+ +
+
+
+

Career Statistics

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Career finals
DisciplineTypeWonLostTotalWR
SinglesGrand Slam236290.79
Summer Olympics1–11.00
WTA Tour Championships5270.71
Grand Slam Cup1-11.00
WTA Premier Mandatory & 5239320.71
WTA Tour193220.86
Total7220920.78
DoublesGrand Slam14–141.00
Summer Olympics3–31.00
WTA Tour Championships––––
WTA Premier Mandatory & 52–21.00
WTA Tour4150.80
Total231240.96
Mixed doublesGrand Slam2240.50
Total2240.50
Team competitionsFed Cup1120.50
Hopman Cup2130.67
Total3250.60
Total100251250.80
+ 1) WR = winning rate +
+
+
+ +
+ Serena Williams artistic pose with black bodysuit +
+ +
+
+
+

Off-court Activities

+
+ +

Equipment and endorsements

+

In the early 2000s, Williams wore Puma apparel and footwear on court. She used the Wilson Hammer 6.4 Stretch Power + Holes racquet. Today, she is endorsed by Nike and uses the Wilson Blade 104. Williams also has endorsement deals + with Gatorade, Delta Air Lines, Audemars Piguet, Aston Martin, Pepsi, Beats by Dre headphones, Mission Athletecare, + Berlei bras, OPI Products, OnePiece, IBM, Mini, Intel, Tempur and Chase Bank.

+

Williams is the current CSO (Chief Sporting Officer) for British luxury automobile manufacturer Aston Martin.

+
+ +

Fashion

+

Williams formerly had a special line with Puma. In April 2004, she signed a deal worth US$40 million for a line with + Nike. +

+

In 2015, she became the first black female athlete to have a picture by herself on the cover of Vogue, which she + did for the April 2015 issue.

+
+ +

Charity Work

+

As part of the Serena Williams Foundation's work, Williams helped to fund the construction of the Serena Williams + Secondary School in Matooni, Kenya. The Serena Williams Foundation also provides university scholarships for underprivileged + students in the United States. Serena, along with her sister Venus, is a supporter and contributor of First Serve + Miami, a foundation for youth who want to learn tennis but are socially and economically challenged. She has been + an International Goodwill Ambassador with UNICEF since 2011 and has helped launch UNICEF's Schools for Asia campaign.

+

In 2014, Williams began hosting an annual charity run named "The Serena Williams Ultimate Fun Run". The event helps + underprivileged individuals and communities that are affected by senseless violence and to ensure equal access + to education of youth.

+
+
+
+ +
+

+ Source: + Serena Williams Wikipedia page & + CNN - Serena Fast Facts + +

+

+ Last Updated: + + +

+
+ +
+ + Serena Williams with a racket + +
+ + +
+

© 2018 FVN

+
+ + + + \ No newline at end of file diff --git a/public/main.css b/public/main.css deleted file mode 100644 index 18a4da3..0000000 --- a/public/main.css +++ /dev/null @@ -1,147 +0,0 @@ -/******************* -* Basic Resets -********************/ - -body, html, div, label, p, h1, h2, h3, h4, h5, h6, form, a, input, textarea { - margin: 0; - padding: 0; - border: 0; - outline: none; -} - - -body { - line-height: 1; - font-size: 88%; - font-family: 'Open Sans', arial, sans-serif; - background: #FAFAFA; - color: #585858; -} - -div { - width: 100%; -} - - -h1, h2, h3, h4, h5, h6 { - font-size: 100%; - padding: 23px 0; - margin: 0 15px; - color: #FF0040; - letter-spacing: 1px; -} - -h1 { - font-size: 32px; -} - -h2 { - font-size: 25px; -} - -main { - display: block; - width: 80%; - margin: 0 auto; -} - -/******************* -* Header -********************/ - - -header { - background: #FF0040; - background: -webkit-linear-gradient(#F5A9BC, #FF0040); - background: -o-linear-gradient(#F5A9BC, #FF0040); - background: -moz-linear-gradient(#F5A9BC, #FF0040); - background: linear-gradient(#F5A9BC, #FF0040); -} - -.title { - color: white; -} - -.main-logo { - float: left; - width: 100px; - height: auto; -} - - -/******************* -* Enter a New Post -********************/ - -.entry-container { - margin: 20px 0 50px; -} - -label { - width: 100%; -} - -.text-wrapper { - width: 80%; -} - -textarea { - width: 96%; - border-radius: 3px; - border: 1px solid #848484; - padding: 5px 2%; -} - -button[type="submit"] { - background: #A5DF00; - background: -webkit-linear-gradient(#93C503, #ABCC4B); - background: -o-linear-gradient(#93C503, #ABCC4B); - background: -moz-linear-gradient(#93C503, #ABCC4B); - background: linear-gradient(#93C503, #ABCC4B); - border: none; - color: white; - padding: 4px 25px; - text-transform: uppercase; - letter-spacing: 1px; - float: right; - margin-top: 10px; - border-radius: 3px; -} - -/******************* -* Posts -********************/ - -hr { - background: #BDBDBD; -} - -.thumbnail { - float: left; - width: 50px; - height: auto; - margin-left: 3px; - margin-top: 3px; -} - -.post { - width: 100%; - border: 1px solid #848484; - float: left; - margin: 2%; - border-radius: 3px; - -webkit-box-shadow: 7px 7px 5px 0px rgba(50, 50, 50, 0.75); - -moz-box-shadow: 7px 7px 5px 0px rgba(50, 50, 50, 0.75); - box-shadow: 3px 3px 3px 0px rgba(50, 50, 50, 0.4); - background: white; -} - -.post p { - margin: 5px 10px; -} - -@media (min-width: 600px) { - .post { - width: 28.9%; - } -} \ No newline at end of file diff --git a/public/script.js b/public/script.js deleted file mode 100644 index b677186..0000000 --- a/public/script.js +++ /dev/null @@ -1,78 +0,0 @@ -if (document.readyState !== 'loading') { - ready(); -} else { - document.addEventListener('DOMContentLoaded', ready); -} - -function ready () { - getBlogposts('/get-posts'); - - // send posts to server - var form = document.querySelector('form'); - form.addEventListener('submit', function (event) { - - event.preventDefault(); // prevents the form from contacting our server automatically (we want to do it ourselves) - var formActionUrl = form.action; // 'form.action' is the url '/create-post' - var formData = new FormData(form); - - postBlogposts(formActionUrl, formData); - }); -} - -/**** - * Function definitions - ***/ -function postBlogposts (url, data) { - fetch(url, { - method: 'POST', - body: data - }) - .then(function (res) { - res.json() - .then(function (json) { - console.log(json); - addBlogpostsToPage(json); - document.querySelector('form').reset(); - }) - }) - .catch(function (err) { - console.error(err) - }); -} - -function getBlogposts (url) { - fetch(url, { - method: 'GET' - }) - .then(function (res) { - res.json() - .then(function (json) { - console.log(json); - addBlogpostsToPage(json); - }); - }) - .catch(function (err) { - console.error(err) - }); -} - -function addBlogpostsToPage (data) { - for (var blogpost in data) { - if (data.hasOwnProperty(blogpost)) { - - var postDiv = document.createElement('div'); - var postText = document.createElement('p'); - var thumbnail = document.createElement('img'); - var postContainer = document.querySelector('.post-container'); - - thumbnail.src = "./img/logo2.png"; - thumbnail.className = "thumbnail"; - postText.innerHTML = data[blogpost]; - postDiv.className = "post"; - - postDiv.appendChild(thumbnail); - postDiv.appendChild(postText); - postContainer.appendChild(postDiv); - } - } -} diff --git a/public/subscribe.html b/public/subscribe.html new file mode 100644 index 0000000..a0dc911 --- /dev/null +++ b/public/subscribe.html @@ -0,0 +1,45 @@ + + + + + + Contact Form + + + + + + + + + + + + + + Serena Wiliams - Tribute page + + + +
+
+

Subscribe to our Newsletter

+

Lorem ipsum..

+
+ +
+ + + +
+ +
+ +
+
+ + + + \ No newline at end of file diff --git a/server.js b/server.js index 71da796..b73ecea 100644 --- a/server.js +++ b/server.js @@ -1,13 +1,27 @@ +const fs = require("fs"); const express = require("express"); const app = express(); app.use(express.static("public")); -app.get("/student", function(req, res) { - console.log("New request to Student page at " + Date()); - res.writeHead(200, { "Content-Type": "text/html" }); - res.write("

This is student Page.

"); - res.end(); +const formidable = require("express-formidable"); + +app.use(formidable()); + +app.post("/subscribe", function(req, res) { + var email = req.fields.mail; + + fs.readFile(__dirname + "/data/posts.json", function(error, content) { + var mailingList = JSON.parse(content); + var date = Date.now(); + + mailingList[date] = email; + var newContent = JSON.stringify(mailingList); + + fs.writeFile(__dirname + "/data/posts.json", newContent, function(error) { + res.end("success!"); + }); + }); }); app.get("*", function(req, res) { From e67aec09b3911d7bbd4c27e53d7d72d1c4fb70d9 Mon Sep 17 00:00:00 2001 From: Francisca Vargas Date: Tue, 17 Jul 2018 22:52:50 +0100 Subject: [PATCH 3/3] Handlebars exercise --- data/posts.json | 2 +- package-lock.json | 316 ++++++++++++++++++++++++++++++++++ package.json | 3 +- server.js | 36 +++- views/layouts/main.handlebars | 15 ++ views/subscribers.handlebars | 8 + 6 files changed, 374 insertions(+), 6 deletions(-) create mode 100644 views/layouts/main.handlebars create mode 100644 views/subscribers.handlebars diff --git a/data/posts.json b/data/posts.json index 19483be..1e931e0 100644 --- a/data/posts.json +++ b/data/posts.json @@ -1 +1 @@ -{"1467390356291":"maria@gmail.com","1531778580603":"d","1531778622826":"d"} \ No newline at end of file +{"1467390356291":"maria@gmail.com","1531778580603":"d@gmail.com","1531778622826":"don@gmail.com","1531864160721":"luisa@gmail.com"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0cec464..ff657da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,41 @@ "negotiator": "0.6.1" } }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, "body-parser": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", @@ -35,11 +65,60 @@ "type-is": "1.6.16" } }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -68,6 +147,21 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "optional": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.12" + } + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -143,6 +237,18 @@ "formidable": "1.2.1" } }, + "express-handlebars": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/express-handlebars/-/express-handlebars-3.0.0.tgz", + "integrity": "sha1-gKBwu4GbCeSvLKbQeA91zgXnXC8=", + "requires": { + "glob": "6.0.4", + "graceful-fs": "4.1.11", + "handlebars": "4.0.11", + "object.assign": "4.1.0", + "promise": "7.3.1" + } + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -157,6 +263,11 @@ "unpipe": "1.0.0" } }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "formidable": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", @@ -172,6 +283,44 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + } + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -188,6 +337,15 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -198,6 +356,30 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -231,6 +413,19 @@ "mime-db": "1.33.0" } }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -241,6 +436,22 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "1.1.2", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "object-keys": "1.0.12" + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -249,16 +460,46 @@ "ee-first": "1.1.1" } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + } + }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "2.0.6" + } + }, "proxy-addr": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", @@ -312,6 +553,20 @@ } } }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -353,6 +608,14 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", @@ -367,6 +630,31 @@ "mime-types": "2.1.18" } }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -381,6 +669,34 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } } } } diff --git a/package.json b/package.json index 7b078a0..5de3b45 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "homepage": "https://github.com/franciscavargas/express-workshop#readme", "dependencies": { "express": "^4.16.3", - "express-formidable": "^1.0.0" + "express-formidable": "^1.0.0", + "express-handlebars": "^3.0.0" } } diff --git a/server.js b/server.js index b73ecea..0fffd5c 100644 --- a/server.js +++ b/server.js @@ -1,29 +1,57 @@ +const exphbs = require("express-handlebars"); const fs = require("fs"); const express = require("express"); const app = express(); - -app.use(express.static("public")); - const formidable = require("express-formidable"); +app.use(express.static("public")); app.use(formidable()); +app.set("views", __dirname + "/views"); +app.engine("handlebars", exphbs({ defaultLayout: "main" })); +app.set("view engine", "handlebars"); + app.post("/subscribe", function(req, res) { var email = req.fields.mail; fs.readFile(__dirname + "/data/posts.json", function(error, content) { + //Convert the text in JSON to an object var mailingList = JSON.parse(content); - var date = Date.now(); + // Adding the content to the object + var date = Date.now(); mailingList[date] = email; + + // Convert the object to string in JSON format var newContent = JSON.stringify(mailingList); + // Write the file with the whole new content fs.writeFile(__dirname + "/data/posts.json", newContent, function(error) { res.end("success!"); }); }); }); +app.get("/subscribers", function(req, res) { + // Read file + fs.readFile(__dirname + "/data/posts.json", function(error, content) { + //Convert the text in JSON to an object + var mailingList = JSON.parse(content); + + //Convert the object in an array with the emails + var emails = Object.keys(mailingList).map(function(key) { + return mailingList[key]; + }); + + console.log(emails); + + // array emails to handlebars + res.render("subscribers", { + subscribersMail: emails + }); + }); +}); + app.get("*", function(req, res) { console.log("404 at " + Date()); res.writeHead(404, { "Content-Type": "text/html" }); diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars new file mode 100644 index 0000000..8c4e1e1 --- /dev/null +++ b/views/layouts/main.handlebars @@ -0,0 +1,15 @@ + + + + + + + The HTML5 Herald + + + + + {{{body}}} + + + \ No newline at end of file diff --git a/views/subscribers.handlebars b/views/subscribers.handlebars new file mode 100644 index 0000000..75c637c --- /dev/null +++ b/views/subscribers.handlebars @@ -0,0 +1,8 @@ +

Subscribers - Mailing List

+ +
    + {{#each subscribersMail}} +
  • {{this}}
  • + + {{/each}} +
\ No newline at end of file