diff --git a/data/posts.json b/data/posts.json index b4d8361..e69de29 100644 --- a/data/posts.json +++ b/data/posts.json @@ -1,3 +0,0 @@ -{ - "1467390356291": "This is my very first blog post!" -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..46f7c4d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,386 @@ +{ + "name": "expressworkshop", + "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" + } + }, + "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", + "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" + } + }, + "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", + "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..e65ae31 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "expressworkshop", + "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/Seraphineyoung/express-workshop.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/Seraphineyoung/express-workshop/issues" + }, + "homepage": "https://github.com/Seraphineyoung/express-workshop#readme", + "dependencies": { + "express": "^4.16.3", + "express-formidable": "^1.0.0" + } +} diff --git a/public/README.md b/public/README.md new file mode 100644 index 0000000..4523c1b --- /dev/null +++ b/public/README.md @@ -0,0 +1,10 @@ +# karma-clone + +The aim of this exercise is to create a page that looks just like this one: http://thinkful-ed.github.io/karma-clone/ +### Tasks + + - Fork and clone this repo. + - Create a branch with your name in the format: `flexbox/karma/LucyZidour` + - Edit `index.html` and `style.css` to create a perfect copy of the example! + - Add, commit and push your code often so you get into the habit. + - At the end, do a final push and create a Pull Request. \ No newline at end of file diff --git a/public/contact.html b/public/contact.html new file mode 100644 index 0000000..bae933b --- /dev/null +++ b/public/contact.html @@ -0,0 +1,37 @@ + + + + + + + + Document + + + + +
+
+

Subscribe to my Newsletter

+

This is abebe future newspaper..I would like you to subscribe to it right now

+
+ +
+ + + + +
+ +
+ +
+
+ + + + + + \ No newline at end of file diff --git a/public/css/contact-style.css b/public/css/contact-style.css new file mode 100644 index 0000000..a4b05b6 --- /dev/null +++ b/public/css/contact-style.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/normalize.css b/public/css/normalize.css new file mode 100755 index 0000000..73454f7 --- /dev/null +++ b/public/css/normalize.css @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css new file mode 100755 index 0000000..69f01d7 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,349 @@ + + /* Use the 'Roboto' font from Google. Already added to your HTML header */ + +body { + -webkit-font-smoothing: antialiased; + line-height: 1; + font-family: Roboto; + + +} +.navbar-backgd { + background-color: #fff; +} + +button { + width: 10rem; + background-color: #f15a29; + border-color: #f15a29; + text-shadow: none; + border-style: none; + border-radius: 4px; + padding: 1rem 1.5rem; + font-size: 1.125rem; + color: #fff; +} + +div.button { + display: flex; + justify-content: center; + margin-top: 1.563rem; +} + +h1 { + font-weight: 300; + font-size: 3.125rem; + margin-bottom: 1rem; + color: #fff; + text-align: center; +} + +h3 { + font-size: 1.5rem; + color: #fff; + font-weight: 300; + text-align: center; +} + /* position: fixed; + width: 100%; + border-bottom: 1.5px solid #DDD; + z-index: 5; +} + + +.nav1{ + display: flex; + justify-content: space-between; + margin: 1rem 0 1rem 0; + margin: 0 auto; + width: 60rem; + padding: 1rem; +}*/ + +/* +ul{ + list-style: none; + text-decoration: none; + font-size: 1rem; +} + +a{ + color: #838994; +} + +li{ + font-size: 1.3rem; + display: inline-block; + margin-left: 1rem; +} + +.logo { + height: 4.4rem; +} + +img { + height: 3rem; + +} + +.bold { +font-weight: 500; +color: #4c5058; +} + +main { + display: flex; + justify-content: center; + color: #fff; + +} + +h1 { + margin-top:17.5rem; + font-size: 3rem; + font-size: 3.125rem; + font-weight: 300; +} + +.main h3 { + margin-top: 1.25rem; + font-size: 1.563rem; + font-weight: 300; +} + +div.button { + display: flex; + justify-content: center; +} + +button { + width: 9.688rem; + background-color: #f15a29; + border-color: #f15a29; + text-shadow: none; + border-style: none; + border-radius: 4px; + padding: 1rem 1.5rem; + color: white; + font-size: 1.125rem; + justify-content: center; +}*/ + +.first{ + background-image: url(../img/first-background.jpg); + background-size: cover; + background-repeat: no-repeat; + background-position: center bottom; + height: 46rem; + padding-top: 17.5rem; +} +.background { + height: 46rem; +} + + + + +} +/* +.container{ + width: 60rem; + margin: 0 auto; + margin-top: 7.875rem; + padding-bottom: 5rem; + color: #1d1e21; +} +*/ + +.hero{ + margin-top: 128px; +} + +h2{ + margin: 26px 0 50px 0; + font-size: 2.75rem; + font-weight: 300; + text-align: center; +} + +.writeup{ + padding: 0; + display: flex; + flex-direction: column; + align-items: center; +} +ul.row { + padding: 0; +} +.caption h3 { + font-weight: 400; + font-size: 1.563rem; + margin: 2.5rem 0px 1.875rem; + color: #1d1e21; +} + +.main { + padding-bottom: 5rem; +} + +.footer--hr{ + border: 0; + border-top: 1px solid #eaebec; + margin: 1.313rem 0; +} + +.footer--content{ + padding-top: 25px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +ul.icons { + padding: 0; +} +.icons li { + border-radius: 1.25rem; + width: 2.5rem; + height: 2.5rem; + display: inline-block; + margin: 1.25rem 5px; + border: 1px solid #eaebec; + padding: 0.625rem 0; + text-align: center; +} + +.twitter { + color: #55acee; +} + +.facebook { + color: #4c66a4; +} + +.instagram { + color: #3f729b; +} + +.footer--content .copy { + font-size: 0.9rem; + font-weight: 300; + color: #838994; +} + + +@media (max-width: 12450px) { + + h2 { + margin: 26px 0 50px 0; + font-size: 2rem; + font-weight: 300; + text-align: center; + } + } + + + +/* +h2.section { + font-size: 2.75rem; + margin: 1.625rem 0 3.125rem; + font-weight: 300; + display: flex; + justify-content: center; +} + +.images { + display: flex; + justify-content: space-around; + height: 9rem; +} + +.images img{ + width: 127px; + height: 127px; +} + +div.words { + font-weight: 400; + font-size: 1.563rem; + display: flex; + justify-content: space-around; +} + +.words p { + width: 127px; +} + +.hr { + border: 0; + border-top: 1px solid #eaebec; + margin: 1.313rem 0; +} + +.media { + width:60rem; + margin: auto; + +} + +h5{ + font-weight: 500; + display: flex; + justify-content: center; +} + +ul.icons { + display: flex; + justify-content: center; + padding: 0; +} +.copy { + display: flex; + justify-content: center; + font-size: 0.9rem; + font-weight: 300; + color: #838994; +} + + +div.media{ + padding-bottom: 10rem; +} + +.icons li { + border-radius: 1.25rem; + width: 2.5rem; + margin: 1.25rem 5px; + border: 1px solid #eaebec; + padding: 0.625rem 0; + text-align: center; +} + +li.twitter { + color: #55acee; +} + +li.twitter { + color: #55acee; +} + +li.instagram { + color: #3f729b; +} + + + + + + + + + + +/* Add your custom styles here */ +/* Remember: be organised, use comments and separate your styles into meaningful chunks */ +/* For example: General styles, Navigation styles, Hero styles, Footer etc. */ + +/* TIP: When using Flexbox, remember the items you want to move around need to be inside a parent container set to 'display: flex' */ + diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 index 1ae7963..286aa3d Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/font-squirrel-download.zip b/public/font-squirrel-download.zip new file mode 100755 index 0000000..2ec461c Binary files /dev/null and b/public/font-squirrel-download.zip differ diff --git a/public/img/arrow-down.png b/public/img/arrow-down.png new file mode 100755 index 0000000..765d600 Binary files /dev/null and b/public/img/arrow-down.png differ diff --git a/public/img/buy-now-bg.jpg b/public/img/buy-now-bg.jpg new file mode 100755 index 0000000..5b6910c Binary files /dev/null and b/public/img/buy-now-bg.jpg differ diff --git a/public/img/first-background.jpg b/public/img/first-background.jpg new file mode 100755 index 0000000..5d619e2 Binary files /dev/null and b/public/img/first-background.jpg differ diff --git a/public/img/icon-arrow-down-inverse.svg b/public/img/icon-arrow-down-inverse.svg new file mode 100755 index 0000000..4a53ac1 --- /dev/null +++ b/public/img/icon-arrow-down-inverse.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/public/img/icon-coffee.svg b/public/img/icon-coffee.svg new file mode 100755 index 0000000..80a4628 --- /dev/null +++ b/public/img/icon-coffee.svg @@ -0,0 +1,35 @@ + + + + + + +]> + + + + + + + + + + + + diff --git a/public/img/icon-devices.svg b/public/img/icon-devices.svg new file mode 100755 index 0000000..6c3b943 --- /dev/null +++ b/public/img/icon-devices.svg @@ -0,0 +1,24 @@ + + + + + + +]> + + + + + diff --git a/public/img/icon-refill.svg b/public/img/icon-refill.svg new file mode 100755 index 0000000..8892b7e --- /dev/null +++ b/public/img/icon-refill.svg @@ -0,0 +1,30 @@ + + + + + + +]> + + + + + + diff --git a/public/img/karma-logo.svg b/public/img/karma-logo.svg new file mode 100755 index 0000000..894ee78 --- /dev/null +++ b/public/img/karma-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/public/img/logo1.png b/public/img/logo1.png deleted file mode 100644 index 341a802..0000000 Binary files a/public/img/logo1.png and /dev/null differ diff --git a/public/img/logo2.png b/public/img/logo2.png deleted file mode 100644 index f4f0b62..0000000 Binary files a/public/img/logo2.png and /dev/null differ diff --git a/public/img/play-icon.svg b/public/img/play-icon.svg new file mode 100755 index 0000000..8c462e8 --- /dev/null +++ b/public/img/play-icon.svg @@ -0,0 +1,413 @@ + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/index.html b/public/index.html old mode 100644 new mode 100755 index 859031c..51866a3 --- a/public/index.html +++ b/public/index.html @@ -1,31 +1,209 @@ - - - - My first Node.js blog! - - - - -
- -

Node Girls

-
-
-
- + + + + Karma + + + + + + + + + + + -
-
-
+
+
+
+
+
+

Introducing Karma

+

Bring WiFi with you, everywhere you go.

+
+ +
+
+
+
+
+
+ +
+
+
+

Everyone needs a little Karma

+
+
+
    +
  • + Internet for all devices image +
    +

    Internet for all devices

    +
    +
  • +
  • + Boost your productivity image +
    +

    Boost your productivity

    +
    +
  • +
  • + Pay as You Go image +
    +

    Pay as You Go

    +
    +
  • +
+
+ +
+ +
+
+ +
+ +
+
+
+
+ + + + + + + + + + + + -

Recent Posts

+ + + + -
-
- - - + 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/server.js b/server.js new file mode 100644 index 0000000..3a9c973 --- /dev/null +++ b/server.js @@ -0,0 +1,76 @@ +// const http = require("http"); + +// const server = http.createServer(function(req, res) { +// console.log("New Request:" + Date()); + +// res.end("Hello World!"); +// }); + +// server.listen(5000); + +// console.log("Node.js web server at port 5000 is running.."); + +// const http = require("http"); +// const server = http.createServer(function(req, res) { +// if (req.url === "/") { +// //check the URL of the current request +// console.log("New request to main page at " + Date()); +// // set response header +// res.writeHead(200, { "Content-Type": "text/html" }); +// // set response content +// res.write("

This is home Page.

"); +// res.write("

The time is: " + Date() + "

"); +// res.end(); +// } else if (req.url === "/student") { +// console.log("New request to Student page at " + Date()); +// res.writeHead(200, { "Content-Type": "text/html" }); +// res.write("

This is student Page.

"); +// res.end(); +// } else { +// res.end( +// "

Invalid Request at " + Date() + "

" +// ); +// } +// }); + +// server.listen(5000); + +// console.log("Node.js web server at port 5000 is running.."); +const express = require("express"); +const app = express(); +const formidable = require("express-formidable"); +const fs = require("fs"); + +// app.get("/", function(req, res) { +// res.send("hello world"); +// }); + +app.use(express.static("public")); +app.use(formidable()); + +app.get("/student", function(req, res) { + console.log("Server is loading a student page"); + res.send("hello student"); + + app.post("/contact.html", function(req, res) { + fs.writeFile("data/posts.json", req.fields, function(error) { + res.send("Thank your for filling this form. cooool"); + + fs.readFile(__dirname + "data/posts.json", function(error, content) { + const parsedFile = JSON.parse(content); + console.log(parsedFile); + + var newContent = JSON.stringify(parsedFile); + //append data to file + fs.appendFile("data/posts.json", newContent, function(err) { + if (err) throw err; + console.log("Appended!"); + }); + }); + }); + }); +}); + +app.listen(5000, function() { + console.log("Server is listening on port 5000. Ready to accept requests!"); +});