diff --git a/.gitignore b/.gitignore index d618f07..df0f8af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.iml .DS_Store/ .idea/ -out/ \ No newline at end of file +out/ +node_modules/ diff --git a/app.js b/app.js new file mode 100644 index 0000000..0eb795a --- /dev/null +++ b/app.js @@ -0,0 +1,56 @@ +var http = require('http'); +var fs = require('fs'); +var path = require('path'); + +http.createServer(function (request, response) { + console.log('request starting...'); + + var filePath = '.' + request.url; + if (filePath == './') + filePath = './index.html'; + + var extname = path.extname(filePath); + var contentType = 'text/html'; + switch (extname) { + case '.js': + contentType = 'text/javascript'; + break; + case '.css': + contentType = 'text/css'; + break; + case '.json': + contentType = 'application/json'; + break; + case '.png': + contentType = 'image/png'; + break; + case '.jpg': + contentType = 'image/jpg'; + break; + case '.wav': + contentType = 'audio/wav'; + break; + } + + fs.readFile(filePath, function(error, content) { + if (error) { + if(error.code == 'ENOENT'){ + fs.readFile('./404.html', function(error, content) { + response.writeHead(200, { 'Content-Type': contentType }); + response.end(content, 'utf-8'); + }); + } + else { + response.writeHead(500); + response.end('Sorry, check with the site admin for error: '+error.code+' ..\n'); + response.end(); + } + } + else { + response.writeHead(200, { 'Content-Type': contentType }); + response.end(content, 'utf-8'); + } + }); + +}).listen(3000); +console.log('Server running'); \ No newline at end of file diff --git a/mockups/AddEditPost.png b/mockups/AddEditPost.png new file mode 100644 index 0000000..3ac4c2b Binary files /dev/null and b/mockups/AddEditPost.png differ diff --git a/mockups/DeskAuth.png b/mockups/DeskAuth.png new file mode 100644 index 0000000..254bd45 Binary files /dev/null and b/mockups/DeskAuth.png differ diff --git a/mockups/DonwloadAndDown.png b/mockups/DonwloadAndDown.png new file mode 100644 index 0000000..1d547ea Binary files /dev/null and b/mockups/DonwloadAndDown.png differ diff --git a/mockups/Errorauthorization.png b/mockups/Errorauthorization.png new file mode 100644 index 0000000..679d44e Binary files /dev/null and b/mockups/Errorauthorization.png differ diff --git a/mockups/Main.png b/mockups/Main.png new file mode 100644 index 0000000..7a88df2 Binary files /dev/null and b/mockups/Main.png differ diff --git a/mockups/Unauth.png b/mockups/Unauth.png new file mode 100644 index 0000000..a7aa031 Binary files /dev/null and b/mockups/Unauth.png differ diff --git a/mockups/authorization.png b/mockups/authorization.png new file mode 100644 index 0000000..4de274d Binary files /dev/null and b/mockups/authorization.png differ diff --git a/mockups/deleting.png b/mockups/deleting.png new file mode 100644 index 0000000..ed7f490 Binary files /dev/null and b/mockups/deleting.png differ diff --git a/mockups/error.png b/mockups/error.png new file mode 100644 index 0000000..f32c1e4 Binary files /dev/null and b/mockups/error.png differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..82164d7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,378 @@ +{ + "name": "public", + "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-package-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/express-package-json/-/express-package-json-1.0.2.tgz", + "integrity": "sha1-26aiwgee55z6mhxWgJexVwZLmUw=" + }, + "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..a184579 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "public", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "body-parser": "^1.18.2", + "express": "^4.16.3", + "express-package-json": "^1.0.2" + } +} diff --git a/public/fonts/11451.otf b/public/fonts/11451.otf new file mode 100644 index 0000000..8c28f0b Binary files /dev/null and b/public/fonts/11451.otf differ diff --git a/public/fonts/huxley/a_huxleycaps-italic.ttf b/public/fonts/huxley/a_huxleycaps-italic.ttf new file mode 100644 index 0000000..bf666b8 Binary files /dev/null and b/public/fonts/huxley/a_huxleycaps-italic.ttf differ diff --git a/public/fonts/st/Stolzl-Thin.eot b/public/fonts/st/Stolzl-Thin.eot new file mode 100644 index 0000000..3d24967 Binary files /dev/null and b/public/fonts/st/Stolzl-Thin.eot differ diff --git a/public/fonts/st/Stolzl-Thin.svg b/public/fonts/st/Stolzl-Thin.svg new file mode 100644 index 0000000..c160fa1 --- /dev/null +++ b/public/fonts/st/Stolzl-Thin.svg @@ -0,0 +1,4406 @@ + + + diff --git a/public/fonts/st/Stolzl-Thin.ttf b/public/fonts/st/Stolzl-Thin.ttf new file mode 100644 index 0000000..70499ee Binary files /dev/null and b/public/fonts/st/Stolzl-Thin.ttf differ diff --git a/public/fonts/st/Stolzl-Thin.woff b/public/fonts/st/Stolzl-Thin.woff new file mode 100644 index 0000000..ffc2e17 Binary files /dev/null and b/public/fonts/st/Stolzl-Thin.woff differ diff --git a/public/fonts/st/Stolzl-Thin.woff2 b/public/fonts/st/Stolzl-Thin.woff2 new file mode 100644 index 0000000..10711ac Binary files /dev/null and b/public/fonts/st/Stolzl-Thin.woff2 differ diff --git a/public/fonts/st/font.css b/public/fonts/st/font.css new file mode 100644 index 0000000..1b2dd1c --- /dev/null +++ b/public/fonts/st/font.css @@ -0,0 +1,12 @@ +@font-face { + font-family: 'Stolzl-Thin'; + src: url('Stolzl-Thin.eot'); + src: url('Stolzl-Thin.woff2') format('woff2'), + url('Stolzl-Thin.woff') format('woff'), + url('Stolzl-Thin.ttf') format('truetype'), + url('Stolzl-Thin.svg#Stolzl-Thin') format('svg'), + url('Stolzl-Thin.eot?#iefix') format('embedded-opentype'); + font-weight: normal; + font-style: normal; +} + diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..8f3cf39 --- /dev/null +++ b/public/index.html @@ -0,0 +1,94 @@ + + +
+ +ERROR
+ +Выберите новую картинку.
+ +Пользователь:
+Дата:
+
+Переместите сюда файл.
+ + +Пользователь:
+Дата:
+
+
+ Авторизация
+ + + +
+ 
${post.author}
+${post.createdAt.getDate()}.${post.createdAt.getMonth()}.${post.createdAt.getFullYear()}
+${post.createdAt.getHours()}:${post.createdAt.getUTCMinutes()}:${post.createdAt.getSeconds()}
+${post.likes.length.toString()}
+${post.description}
+${ViewModule.makeStringForHashtags(post.hashtags) || 0}
+ `; + if (post.author === ApplicationModel.userAuthorized) { + newDiv.innerHTML += ` +
+
+ `
+ }
+ containerPosts.appendChild(newDiv);
+ },
+
+ deleteDomPhotoPost: function (post) {
+ let deletedPost = document.getElementById(post.id);
+ containerPosts.removeChild(deletedPost);
+ },
+
+ editDomPhotoPost: function (post, newPost) {
+ let editedPost = document.getElementById(post.id);
+ let result = document.createElement("div");
+
+ result.innerHTML = editedPost.innerHTML;
+ result.id = post.id;
+ result.className = "post";
+ if (newPost.description) {
+ let re = result.querySelector(".textComment");
+ re.textContent = newPost.description;
+ }
+ if (newPost.photoLink) {
+ result.querySelector(".photoPost").src = newPost.photoLink;
+ }
+ if (newPost.hashtags) {
+ result.querySelector(".textHashTag").textContent = ViewModule.makeStringForHashtags(newPost.hashtags);
+ }
+ containerPosts.replaceChild(result, editedPost);
+ },
+
+ createMenuForUser: function () {
+ let menu = document.querySelector(".menu");
+ menu.innerHTML = `
+
+
+
+
+`
+ },
+
+ createMenuNotForUser: function () {
+ let menu = document.querySelector(".menu");
+ menu.innerHTML = `
+ `
+ },
+
+ propHash: function (name) {
+ //here we're printing the most popular hashtags (we get 4 the most popular)
+ if (ApplicationModel.mapHash.length !== 0) {
+ ApplicationModel.mapHash.sort(ApplicationModel.compareHash);
+ let sF = document.getElementById(name);
+ for (let i = 0; i < 4; i++)
+ if (ApplicationModel.mapHash[i]) {
+ sF.children[i + 2].innerText = ApplicationModel.mapHash[i].word;
+ }
+ }
+ }
+ }
+}();
+
+let EventsModule = function () {
+ //по частям
+ let inputLogin = document.getElementById('login');
+ let inputData = document.getElementById('date');
+ let inputHashtag = document.getElementById('hash');
+ let inputLoginAuth = document.getElementById('logAuth');
+ let inputPassword = document.getElementById('passAuth');
+ let grayBackground = document.getElementById('grayBckd');
+ let formAuth = document.getElementById('formAuth');
+ let formAdding = document.getElementById('formAddPost');
+ let dropArea = document.getElementById('addPhotoDrop');
+ let dropAreaEdit = document.getElementById('editPhotoDrop');
+ let userAdd = document.getElementById('userAdding');
+ let dataAdd = document.getElementById('dataAdding');
+ let hashAdd = document.getElementById('inputHashtags');
+ let selectFilter = document.getElementById('selectFilter');
+ let selectAdd = document.getElementById('selectAdd');
+ let gallery = document.getElementById('gallery');
+ let inputDescription = document.getElementById('inputDescription');
+ let formEdit = document.getElementById('editFormPostId');
+ let userEdit = document.getElementById('userEdit');
+ let dataEdit = document.getElementById('dataEdit');
+ let hashEdit = document.getElementById('inputHashtagsEdit');
+ let selectEdit = document.getElementById('selectEdit');
+ let inputHastagsEdit = document.getElementById('inputHashtagsEdit');
+ let inputDescriptionEdit = document.getElementById('inputDescriptionEdit');
+ let galleryEdit = document.getElementById('galleryEdit');
+ let error = document.getElementById('error');
+ let textError = document.getElementById('textError');
+ let photoLnkEdit;
+ let photoLnk;
+ let edittingPostId;
+ let indexEditPost;
+
+ //DOM
+ function highlight() {
+ dropArea.classList.add('highlight')
+ }
+
+ //DOM
+ function unHighLight() {
+ dropArea.classList.remove('highlight')
+ }
+
+ function handleFiles(files) {
+ files = [...files];
+ files.forEach(uploadFile);
+ files.forEach(previewFile);
+ }
+
+ function handleFilesEdit(files) {
+ files = [...files];
+ files.forEach(uploadFileEdit);
+ files.forEach(previewFileEdit);
+ }
+
+ function previewFileEdit(file) {
+ let reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onloadend = function () {
+ let img = document.createElement('img');
+ img.src = reader.result;
+ galleryEdit.innerHTML = '';
+ galleryEdit.appendChild(img);
+ photoLnkEdit = reader.result;
+ }
+ }
+
+ function uploadFileEdit(file) {
+ // let url = 'ВАШ URL ДЛЯ ЗАГРУЗКИ ФАЙЛОВ'
+ //let formData = new FormData()
+ //formData.append('file', file)
+ // fetch(url, {
+ // method: 'POST',
+ // body: formData
+ // })
+ }
+
+ function handleDrop(e) {
+ let dt = e.dataTransfer;
+ let files = dt.files;
+ if(files.length === 1){
+ handleFiles(files);
+ }
+ else{
+
+ }
+ }
+
+ function handleDropEdit(e) {
+ let dt = e.dataTransfer;
+ let files = dt.files;
+ if(files.length === 1){
+ handleFilesEdit(files);
+ }
+ else{
+//
+ }
+ }
+
+ function uploadFile(file) {
+ // let url = 'ВАШ URL ДЛЯ ЗАГРУЗКИ ФАЙЛОВ'
+ //let formData = new FormData()
+ //formData.append('file', file)
+ // fetch(url, {
+ // method: 'POST',
+ // body: formData
+ // })
+ }
+
+ function previewFile(file) {
+ let reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onloadend = function () {
+ let img = document.createElement('img');
+ img.src = reader.result;
+ gallery.appendChild(img);
+ photoLnk = reader.result;
+ }
+ }
+
+ function preventDefaults (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ return {
+ filterPosts: function () {
+ let arrHashtags = [];
+ if(inputHashtag.value) {
+ arrHashtags = inputHashtag.value.replace('#', ' ').trim().split(/[#, ]+/);
+ }
+ //user didn't choose the empty string
+ if(selectFilter.selectedIndex !== 1){
+ //user didn't choose the equal hashatgs
+ if(arrHashtags.indexOf(selectFilter.options[selectFilter.selectedIndex].value) === -1) {
+ arrHashtags.push(selectFilter.options[selectFilter.selectedIndex].value);
+ }
+ }
+ ViewModule.printOnScreen(0, 30,
+ {
+ createdAt: 0 || inputData.value,
+ hashtags: arrHashtags.length === 0 ? 0 : arrHashtags,
+ author: (0 || inputLogin.value)
+ });
+ },
+
+ getMorePosts: function () {
+ ApplicationModel.begOfVisiblePosts += 10;
+ ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+ },
+
+ closeForms: function () {
+ grayBackground.style.display = 'none';
+ formAuth.style.display = 'none';
+ formAdding.style.display = 'none';
+ formEdit.style.display = 'none';
+ error.style.display = 'none';
+ },
+
+ enter: function () {
+ grayBackground.style.display = 'block';
+ formAuth.style.display = 'block';
+ },
+
+ addPost: function () {
+ inputDescription.value = '';
+ hashAdd.value = '';
+ userAdd.innerText = 'Пользователь: ';
+ dataAdd.innerText = 'Дата: ';
+ gallery.innerHTML = '';
+ ViewModule.propHash('selectAdd');
+ grayBackground.style.display = 'block';
+ formAdding.style.display = 'block';
+ userAdd.innerText += ApplicationModel.userAuthorized;
+ dataAdd.innerText += new Date();
+ },
+
+ editPost: function(e) {
+ inputDescriptionEdit.value = '';
+ inputHastagsEdit.value = '';
+ userEdit.innerText = 'Пользователь: ';
+ dataEdit.innerText = 'Дата: ';
+ galleryEdit.innerHTML = '';
+ edittingPostId = e.target.id.substring(5);
+ let imgEdit = document.createElement('img');
+ indexEditPost = ApplicationModel.photoPosts.map((post)=>{
+ return post.id;
+ }).indexOf(edittingPostId);
+ grayBackground.style.display = 'block';
+ formEdit.style.display = 'block';
+ //new object for edit post
+ userEdit.innerText += ApplicationModel.userAuthorized;
+ dataEdit.innerText += ApplicationModel.photoPosts[indexEditPost].createdAt;
+ inputHastagsEdit.value = ViewModule.makeStringForHashtags(ApplicationModel.photoPosts[indexEditPost].hashtags);
+ inputDescriptionEdit.value = ApplicationModel.photoPosts[indexEditPost].description;
+ imgEdit.src = ApplicationModel.photoPosts[indexEditPost].photoLink;
+ galleryEdit.appendChild(imgEdit);
+ },
+
+ pressLike: function(e){
+ if(ApplicationModel.userAuthorized !== null) {
+ let indexToAction = ApplicationModel.photoPosts.map((post) => {
+ return post.id;
+ }).indexOf(e.target.id.substr(5));
+ if (indexToAction !== -1) {
+ let indexLike = ApplicationModel.photoPosts[indexToAction].likes.indexOf(ApplicationModel.userAuthorized);
+ if (indexLike === -1){
+ ApplicationModel.photoPosts[indexToAction].likes.push(ApplicationModel.userAuthorized);
+ localStorage.setItem('photoPosts', JSON.stringify(ApplicationModel.photoPosts));
+ document.getElementById(e.target.id.replace('like', 'textLike')).innerText = ApplicationModel.photoPosts[indexToAction].likes.length;
+ document.getElementById(e.target.id).src = './pictures/post/like.png';
+ } else {
+ ApplicationModel.photoPosts[indexToAction].likes.splice(indexLike, 1);
+ document.getElementById(e.target.id).src = './pictures/post/NotPressed.png';
+ document.getElementById(e.target.id.replace('like', 'textLike')).innerText = ApplicationModel.photoPosts[indexToAction].likes.length;
+ localStorage.setItem('photoPosts', JSON.stringify(ApplicationModel.photoPosts));
+ }
+ }
+
+ }
+ },
+
+ logIn: function () {
+ let name = inputLoginAuth.value;
+ let pass = inputPassword.value;
+
+ if (pass && name) {
+ let index = ApplicationModel.users.map((elem) => {
+ return elem.author;
+ }).indexOf(name);
+ if (index !== -1) {
+ if (ApplicationModel.users[index].password === pass) {
+ ViewModule.loginView(name);
+ document.getElementById('exitBtn').addEventListener('click', EventsModule.unAuthorization);
+ document.getElementById('add').addEventListener('click', EventsModule.addPost);
+ document.getElementById('home').addEventListener('click', EventsModule.homePosts);
+ localStorage.setItem('userAuthorized', JSON.stringify(ApplicationModel.userAuthorized));
+ EventsModule.closeForms();
+ ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+ inputLoginAuth.value = 'Логин';
+ inputPassword.value = 'Пароль';
+ //after login we get new edit buttons
+ } else {
+ textError.innerText = 'Неправильный пароль';
+ EventsModule.closeForms();
+ grayBackground.style.display = 'block';
+ error.style.display = 'block';
+ }
+ } else {
+ textError.innerText = 'Такого пользователя не найдено';
+ EventsModule.closeForms();
+ grayBackground.style.display = 'block';
+ error.style.display = 'block';
+ }
+ }
+ },
+
+ homePosts: function(){
+ ApplicationModel.begOfVisiblePosts = 0;
+ ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+ },
+
+ unAuthorization: function () {
+ document.getElementById("menu").innerHTML = '';
+ ViewModule.createMenuNotForUser();
+ ApplicationModel.userAuthorized = null;
+ localStorage.setItem('userAuthorized', JSON.stringify(ApplicationModel.userAuthorized));
+ ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+ document.getElementById('enterMenu').addEventListener('click', EventsModule.enter);
+ },
+
+ addingPost: function () {
+ let arrayHashtags = [];
+ if(hashAdd.value){
+ arrayHashtags = hashAdd.value.trim().split(/[,# ]+/);
+ }
+ if(selectAdd.selectedIndex !== 1){
+ if(arrayHashtags.indexOf(selectAdd.options[selectAdd.selectedIndex].value) === -1) {
+ /*саша я тебя люблю :3 */
+ arrayHashtags.push(selectAdd.options[selectAdd.selectedIndex].value);
+ }
+ }
+
+ ApplicationModel.begOfVisiblePosts = 0;
+ let user = {
+ id: (ApplicationModel.photoPosts.length + 1).toString(),
+ description: inputDescription.value,
+ createdAt: new Date(),
+ author: ApplicationModel.userAuthorized,
+ authorPhoto: ApplicationModel.users[ApplicationModel.users.map((user) => {
+ return user.author;
+ }).indexOf(ApplicationModel.userAuthorized)].authorPhoto || 0,
+ photoLink: photoLnk,
+ hashtags: arrayHashtags.length === 0 ? 0 : arrayHashtags,
+ likes: [],
+ deleted: false
+ };
+ if (ApplicationModel.addPhotoPost(user)) {
+ ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+ } else {
+ textError.innerText = 'Неверные данные';
+ EventsModule.closeForms();
+ grayBackground.style.display = 'block';
+ error.style.display = 'block';
+
+ }
+ EventsModule.closeForms();
+ },
+
+ edittingPost: function() {
+ let arrayHashtags = [];
+ if (hashEdit.value) {
+ arrayHashtags = hashEdit.value.replace('#', ' ').trim().split(/[,# ]+/);
+ }
+ if (selectEdit.selectedIndex !== 1) {
+ if (arrayHashtags.indexOf(selectEdit.options[selectEdit.selectedIndex].value) === -1) {
+ arrayHashtags.push(selectEdit.options[selectEdit.selectedIndex].value);
+ }
+ }
+ let user = {
+ id: 1,
+ description: inputDescriptionEdit.value,
+ author: ApplicationModel.userAuthorized,
+ authorPhoto: ApplicationModel.photoPosts[indexEditPost].authorPhoto,
+ photoLink: photoLnkEdit,
+ hashtags: arrayHashtags.length === 0 ? 0 : arrayHashtags,
+ likes: ApplicationModel.photoPosts[indexEditPost].likes,
+ deleted: false
+ };
+
+ let postOld = ApplicationModel.getPhotoPost(edittingPostId);
+ if (ApplicationModel.editPost(postOld.id, user)) {
+ ViewModule.editDomPhotoPost(postOld, user);
+ document.getElementById('edit-'+edittingPostId).addEventListener('click', EventsModule.editPost);
+ document.getElementById('delete-'+edittingPostId).addEventListener('click', EventsModule.delettingPost);
+ document.getElementById('like-'+edittingPostId).addEventListener('click', EventsModule.pressLike);
+ localStorage.setItem('photoPosts', JSON.stringify(ApplicationModel.photoPosts));
+ EventsModule.closeForms();
+ } else {
+ textError.innerText = 'Неверные данные';
+ EventsModule.closeForms();
+ grayBackground.style.display = 'block';
+ error.style.display = 'block';
+ }
+
+ },
+
+ delettingPost: function(e) {
+ let post = ApplicationModel.getPhotoPost(e.target.id.substring(7));
+ if (ApplicationModel.removePhotoPost(post.id)) {
+ ViewModule.deleteDomPhotoPost(post);
+ } else
+ {
+ textError.innerText = 'Неправильный пароль';
+ EventsModule.closeForms();
+ grayBackground.style.display = 'block';
+ error.style.display = 'block';
+ }
+ },
+
+ initializeLikeButtons: function(){
+ let likeButtons = document.querySelectorAll('.likePost');
+ for(let i = 0; i < likeButtons.length; i++){
+ likeButtons[i].addEventListener('click', EventsModule.pressLike);
+ }
+ },
+
+ initializeButtonsPost: function(){
+ let editButtons = document.querySelectorAll('.editPost');
+ let deleteButtons = document.querySelectorAll('.deletePost');
+ for(let i = 0; i < editButtons.length; i++){
+ editButtons[i].addEventListener('click', EventsModule.editPost);
+ deleteButtons[i].addEventListener('click', EventsModule.delettingPost);
+ }
+ },
+
+ initialization: function(){
+ document.getElementById('downMore').addEventListener('click', EventsModule.getMorePosts);
+ document.getElementById('filtersPicture').addEventListener('click', EventsModule.filterPosts);
+ document.getElementById('grayBckd').addEventListener('click', EventsModule.closeForms);
+ if(ApplicationModel.userAuthorized === null) {
+ document.getElementById('enterMenu').addEventListener('click', EventsModule.enter);
+ } else {
+ document.getElementById('exitBtn').addEventListener('click', EventsModule.unAuthorization);
+ document.getElementById('add').addEventListener('click', EventsModule.addPost);
+ document.getElementById('home').addEventListener('click', EventsModule.homePosts);
+ EventsModule.initializeButtonsPost();
+ }
+ document.getElementById('loginBtn').addEventListener('click', EventsModule.logIn);
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
+ dropArea.addEventListener(eventName, preventDefaults, false);
+ dropAreaEdit.addEventListener(eventName, preventDefaults, false);
+ });
+ dropArea.addEventListener('drop', handleDrop, false);
+ dropAreaEdit.addEventListener('drop', handleDropEdit, false);
+ ['dragenter', 'dragover'].forEach(eventName => {
+ dropArea.addEventListener(eventName, highlight, false);
+ dropAreaEdit.addEventListener(eventName, highlight, false);
+ });
+ ['dragleave', 'drop'].forEach(eventName => {
+ dropArea.addEventListener(eventName, unHighLight, false);
+ dropAreaEdit.addEventListener(eventName, unHighLight, false);
+ });
+ document.getElementById('addingFormAdd').addEventListener('click', EventsModule.addingPost);
+ document.getElementById('editFormAdd').addEventListener('click', EventsModule.edittingPost);
+ }
+ }
+}();
+ApplicationModel.fillInformation();
+ViewModule.printOnScreen(ApplicationModel.begOfVisiblePosts, ApplicationModel.begOfVisiblePosts + 10);
+if (ApplicationModel.userAuthorized === null) {
+ ViewModule.createMenuNotForUser();
+} else {
+ ViewModule.createMenuForUser();
+}
+ApplicationModel.fillMapHash();
+ViewModule.propHash('selectFilter');
+EventsModule.initialization();
\ No newline at end of file
diff --git a/public/styles.css b/public/styles.css
new file mode 100644
index 0000000..7018744
--- /dev/null
+++ b/public/styles.css
@@ -0,0 +1,601 @@
+@font-face {
+ font-family: Stolzl-Thin;
+ src: url('./fonts/st/Stolzl-Thin.eot');
+ src: url('./fonts/st/Stolzl-Thin.woff2') format('woff2'),
+ url('./fonts/st/Stolzl-Thin.woff') format('woff'),
+ url('./fonts/st/Stolzl-Thin.ttf') format('truetype'),
+ url('./fonts/st/Stolzl-Thin.svg#Stolzl-Thin') format('svg'),
+ url('./fonts/st/Stolzl-Thin.eot?#iefix') format('embedded-opentype');
+ font-weight: normal;
+ font-style: normal;
+}
+
+.logoImg {
+ height: 10vh;
+}
+
+.addingHashtags {
+ font-family: Stolzl-Thin;
+ vertical-align: middle;
+ border: 1px solid #cecece;
+ background: #F6F6f6;
+ border-radius: 8px;
+ width: 30%;
+ height: 5%;
+}
+
+.filter-blocks {
+ float: left;
+ font-family: Stolzl-Thin;
+ vertical-align: middle;
+ margin: 5px;
+}
+
+.filters-picture {
+ float: right;
+ height: 10vh;
+ width: 50px;
+ text-align: right;
+ background: url("pictures/filters/filter.png");
+ background-size: 50px;
+}
+
+.filters-picture:active {
+ float: right;
+ width: 50px;
+ text-align: right;
+ background: url("pictures/filters/filterAnim.png");
+ background-size: 50px;
+ text-align: right;
+ color: #e3bd8c;
+}
+
+.filter-input {
+ color: #e3bd8c;
+ max-height: 10vh;
+ max-width: 40vw;
+ border-radius: 3px;
+}
+
+.filter-input:focus {
+ color: #e3bd8c;
+ max-height: 10vh;
+ max-width: 10vm;
+ border-radius: 3px;
+ border: 1px solid #e3bd8c;
+}
+
+.filters-text {
+ text-align: left;
+ vertical-align: middle;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ paddging: auto;
+}
+
+.filters {
+ height: 10vh;
+ max-height: 15vh;
+}
+
+.filters-picture {
+ height: 50px;
+}
+
+.menu-picture {
+ margin: 5px;
+ max-height: 15vh;
+ height: 50px;
+ max-width: 15vw;
+ max-height: 15vh;
+}
+
+.menu-block-picture {
+ float: left;
+ margin: 5px;
+ height: 50px;
+ max-height: 15vh;
+}
+
+.menu-picture:active {
+ margin: 5px;
+ height: 40px;
+ max-width: 15vw;
+ max-height: 15vh;
+
+}
+
+.menu-block-add {
+ float: right;
+ width: 15vw;
+ padding: 5px 30vw 10px 40px;
+ max-width: 15vw;
+ max-height: 15vh;
+
+}
+
+.menu-block-avatar {
+ border-radius: 100px;
+ float: right;
+ max-width: 15vw;
+ height: 50px;
+ padding: 5px 5vw 0vw 0px;
+ max-width: 15vw;
+ max-height: 15vh;
+
+}
+
+.menu-picture-margin {
+ height: 50px;
+ max-width: 40px;
+ transition-duration: 0.8s;
+ transition-property: transform;
+ border-radius: 100px;
+}
+
+.menu-picture-margin:hover {
+ transform: rotate(360deg);
+}
+
+.menu {
+ clear: both;
+ height: 60px;
+ border-top-color: #e3bd8c;
+ border-top-style: solid;
+ border-top-width: 1px;
+}
+
+body {
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ height: 94vh;
+ /*min-width: 556px;*/
+}
+
+.scroll-block {
+ clear: both;
+ height: 63vh;
+ max-height: 250vw;
+ overflow-y: scroll;
+ text-align: center;
+}
+
+.downloadMore {
+ clear: both;
+ text-align: center;
+ height: 100px;
+}
+
+.downloadMore:active {
+ clear: both;
+ text-align: center;
+ height: 105px;
+}
+
+.post {
+ float: left;
+ margin: 5px 5px 5px 5%;
+}
+
+.photoPost {
+ width: 250px;
+ height: 250px;
+ clear: both;
+}
+
+.editPost {
+ margin: 0;
+ width: 30px;
+ float: right;
+}
+
+.deletePost{
+ margin: 0;
+ width: 30px;
+ float: right;
+}
+
+.editPost:active {
+ margin: 0;
+ width: 28px;
+ float: right;
+}
+
+.deletePost:active {
+ margin: 0;
+ width: 28px;
+ float: right;
+}
+
+.avaPost {
+ border-radius: 100px;
+ width: 50px;
+ float: left;
+}
+
+.postUser {
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ color: black;
+ font-size: 15px;
+ margin: 0px 5px
+}
+
+.dataUser {
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ color: gray;
+ font-size: 15px;
+ text-indent: 20px;
+ margin: 0px 5px
+}
+
+.likePost {
+ width: 30px;
+ height: 30px;
+ margin: 0px 5px 0px 0px;
+ float: left;
+}
+
+.inpDivAuth {
+ margin-top: 10px;
+}
+
+.main {
+ top: 0px;
+ bottom: 0px;
+ right: 0px;
+ left: 0px;
+ z-index: 90;
+}
+
+#error{
+ margin-left: 30vw;
+ margin-top: 5vh;
+ background-color: white;
+ width: 50vw;
+ max-width: 360px;
+ height: 30vh;
+ position: fixed;
+ text-align: center;
+ display: none;
+ z-index: 200;
+ border: 1px solid #E3BD8C;
+ border-radius: 8px;
+}
+
+.formAuthorization {
+ margin-left: 30vw;
+ margin-top: 5vh;
+ background-color: white;
+ width: 50vw;
+ max-width: 360px;
+ height: 80vh;
+ position: fixed;
+ text-align: center;
+ display: none;
+ z-index: 150;
+ border: 1px solid #E3BD8C;
+ border-radius: 8px;
+}
+
+.authLogo {
+ width: 15vw;
+ max-width: 110px;
+}
+
+.pAuth {
+ font-size: 20px;
+
+}
+
+.enterBtn {
+ width: 43vw;
+ max-width: 300px;
+ margin-top: 10px;
+ height: 8vh;
+ font-size: 20px;
+ color: #c09f76;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ padding: 6px 0 4px 10px;
+ border: 1px solid #E3BD8C;
+ background: #FFFFFF;
+ border-radius: 8px;
+}
+
+#textError{
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+}
+
+#addPhotoDrop{
+ border: 2px dashed #ccc;
+ margin-left: 5%;
+ margin-top: 2%;
+ border-radius: 20px;
+ width: 90%;
+ height: 220px;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+}
+
+#editPhotoDrop{
+ border: 2px dashed #ccc;
+ margin-left: 5%;
+ margin-top: 2%;
+ border-radius: 20px;
+ width: 90%;
+ height: 220px;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+}
+
+#addPhotoDrop.highlight{
+ border-color: purple;
+}
+
+
+#gallery {
+ margin-top: 10px;
+}
+
+#galleryEdit {
+ margin-top: 10px;
+}
+
+#galleryEdit img {
+ width: 200px;
+ max-height: 130px;
+ margin-bottom: 10px;
+ margin-right: 10px;
+ vertical-align: middle;
+ }
+
+#gallery img {
+ width: 200px;
+ max-height: 130px;
+ margin-bottom: 10px;
+ margin-right: 10px;
+ vertical-align: middle;
+}
+
+#fileElem {
+ display: none;
+}
+
+/*#loaderFileStand{*/
+ /*font-family: Stolzl-Thin, Century Gothic, Georgia;*/
+ /*margin-bottom: 2%;*/
+/*}*/
+
+.formForFile {
+ background: #E3BD8C;
+ color: #FFFFFF;
+ border-radius: 18px;
+ border: 1px solid #E3BD8C;
+ margin-top: 10%;
+ margin-left: 10%;
+ width: 80%;
+ height: 300px;
+}
+
+.descriptionAdding {
+ margin-top: 10px;
+}
+
+.editFormPost{
+ margin-left: 30vw;
+ margin-top: 5vh;
+ background-color: white;
+ width: 50vw;
+ max-width: 360px;
+ height: 80vh;
+ position: fixed;
+ text-align: center;
+ display: none;
+ z-index: 150;
+ border: 1px solid #E3BD8C;
+ border-radius: 8px;
+}
+
+.formAddingPost {
+ margin-left: 30vw;
+ margin-top: 5vh;
+ background-color: white;
+ width: 50vw;
+ max-width: 360px;
+ height: 80vh;
+ position: fixed;
+ text-align: center;
+ display: none;
+ z-index: 150;
+ border: 1px solid #E3BD8C;
+ border-radius: 8px;
+}
+
+.inputAuth {
+ width: 40vw;
+ max-width: 300px;
+ height: 5vh;
+ font-size: 13px;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ padding: 6px 0 4px 10px;
+ border: 1px solid #cecece;
+ background: #F6F6f6;
+ border-radius: 8px;
+}
+
+.inputAddingDescr {
+ width: 50%;
+ max-width: 300px;
+ height: 5%;
+ font-size: 13px;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ padding: 6px 0 4px 10px;
+ border: 1px solid #cecece;
+ background: #F6F6f6;
+ border-radius: 8px;
+ margin-top: 10px;
+}
+
+.inputAddingHashtags {
+ width: 30%;
+ max-width: 300px;
+ height: 5%;
+ font-size: 13px;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ padding: 6px 0 4px 10px;
+ border: 1px solid #cecece;
+ background: #F6F6f6;
+ border-radius: 8px;
+ margin-top: 10px;
+}
+
+.authInputes {
+ margin-top: 20vh;
+}
+
+.likePostUnAuth {
+ width: 30px;
+ height: 30px;
+ margin: 0px 5px 0px 0px;
+ float: left;
+}
+
+.grayBackground {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ display: none;
+ z-index: 100;
+ background-color: rgba(1, 1, 1, 0.75);
+}
+
+.textLike {
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ color: #e3bd8c;
+ font-size: 15px;
+ margin: 5px 5px 5px 0px;
+ float: left;
+}
+
+.textComment {
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ color: black;
+ font-size: 15px;
+ margin: 5px 5px 5px 10px;
+}
+
+.textHashTag {
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 250px;
+ overflow: hidden;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ color: gray;
+ font-size: 15px;
+ clear: left;
+}
+
+header {
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
+ border-bottom-color: #e3bd8c;
+ text-align: center;
+ height: 10vh;
+}
+
+footer {
+ clear: both;
+ background: #e3bd8c;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ text-align: center;
+ height: 6vh;
+ position: absolute;
+ margin-bottom: 0px;
+ width: 100%;
+}
+
+@media screen and (max-width: 1044px) {
+ .posts {
+ clear: both;
+ height: 60vh;
+ overflow-y: scroll;
+ text-align: center;
+ }
+
+ footer {
+ clear: both;
+ background: #e3bd8c;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ text-align: center;
+ font-size: 10px;
+ height: 7vh;
+ position: absolute;
+ margin-bottom: 0px;
+ width: 100%;
+ }
+}
+
+@media screen and (max-width: 540px) {
+
+ .filter-blocks {
+ float: left;
+ font-family: Stolzl-Thin;
+ vertical-align: middle;
+ max-width: 40px;
+ margin: 5px;
+ font-size: 15px;
+ }
+
+ .menu-block-add {
+ float: left;
+ width: 2vw;
+ padding: 0 0 0 15px;
+ max-width: 5vw;
+ max-height: 5vh;
+ }
+
+ .menu-block-avatar {
+ float: right;
+ width: 10vw;
+ max-height: 15vh;
+ }
+
+ .menu-block-picture {
+ float: left;
+ max-height: 10vh;
+ max-width: 10vw;
+ }
+
+ .menu-picture:active {
+ height: 40px;
+ max-width: 10vw;
+ max-height: 10vh;
+ }
+
+ footer {
+ clear: both;
+ background: #e3bd8c;
+ font-family: Stolzl-Thin, Century Gothic, Georgia;
+ text-align: center;
+ font-size: 10px;
+ height: 6vh;
+ position: absolute;
+ margin-bottom: 0px;
+ width: 100%;
+ }
+
+ .menu {
+ clear: both;
+ height: 70px;
+ border-top-color: #e3bd8c;
+ border-top-style: solid;
+ border-top-width: 1px;
+ }
+}
+
+/*@media screen and (max-width: 285px){*/
+/*.scroll-block{*/
+/*clear: both;*/
+/*height: 56vh;*/
+/*!*max-height: 200vw;*!*/
+/*overflow-y: scroll;*/
+/*text-align: center;*/
+/*}*/
+/*}*/