diff --git a/package.json b/package.json index 61747ea..b6f621d 100644 --- a/package.json +++ b/package.json @@ -12,56 +12,51 @@ "build": "webpack ./src/frontend/js/app.js --o='./public/dist/[name].bundle.js' --output-library=Docs --output-public-path=/dist/ -p --mode=production", "build:dev": "webpack ./src/frontend/js/app.js --o='./public/dist/[name].bundle.js' --output-library=Docs --output-public-path=/dist/ -p --mode=development --watch", "precommit": "yarn lint && yarn test --exit", - "generatePassword": "node ./generatePassword.js" + "generatePassword": "node ./generatePassword.js", + "editor-upgrade": "yarn add -D @editorjs/{editorjs,header,code,delimiter,list,image,table,inline-code,marker}@latest" }, "dependencies": { - "@babel/polyfill": "^7.0.0", "bcrypt": "^3.0.3", - "body-parser": "latest", "commander": "^2.19.0", "cookie-parser": "~1.4.3", + "cross-env": "^5.2.0", "csurf": "^1.9.0", "debug": "~4.1.0", "dotenv": "^6.2.0", - "eslint-plugin-standard": "^4.0.0", "express": "~4.16.0", "file-type": "^10.7.1", "http-errors": "~1.7.1", "jsonwebtoken": "^8.4.0", "mime": "^2.4.0", "mkdirp": "^0.5.1", - "module-dispatcher": "^2.0.0", "morgan": "~1.9.0", "multer": "^1.3.1", "nedb": "^1.8.0", "node-fetch": "^2.3.0", "nodemon": "^1.18.3", - "normalize.css": "^8.0.0", "twig": "~1.12.0", "uuid4": "^1.0.0" }, "devDependencies": { "@babel/core": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/polyfill": "^7.2.5", "@babel/preset-env": "^7.1.0", "@editorjs/code": "^2.4.0", "@editorjs/delimiter": "^1.1.0", - "@editorjs/editorjs": "^2.11.7", - "@editorjs/embed": "^2.2.0", - "@editorjs/header": "^2.2.0", + "@editorjs/editorjs": "^2.11.8", + "@editorjs/header": "^2.2.2", "@editorjs/image": "^2.1.0", "@editorjs/inline-code": "^1.3.0", - "@editorjs/list": "^1.3.0", + "@editorjs/list": "^1.3.1", "@editorjs/marker": "^1.2.0", - "@editorjs/quote": "^2.2.0", - "@editorjs/raw": "^2.1.1", + "@editorjs/table": "^1.2.0", "autoprefixer": "^9.1.3", "babel": "^6.23.0", "babel-eslint": "^10.0.1", "babel-loader": "^8.0.2", "chai": "^4.1.2", "chai-http": "^4.0.0", - "cross-env": "^5.2.0", "css-loader": "^1.0.0", "cssnano": "^4.1.0", "eslint": "^5.3.0", @@ -69,11 +64,14 @@ "eslint-plugin-chai-friendly": "^0.4.1", "eslint-plugin-import": "^2.14.0", "eslint-plugin-node": "^8.0.1", + "eslint-plugin-standard": "^4.0.0", "highlight.js": "^9.13.1", "husky": "^1.1.2", "mini-css-extract-plugin": "^0.4.3", "mocha": "^5.2.0", "mocha-sinon": "^2.1.0", + "module-dispatcher": "^2.0.0", + "normalize.css": "^8.0.1", "nyc": "^13.1.0", "postcss": "^7.0.2", "postcss-apply": "^0.11.0", diff --git a/public/dist/editor.bundle.js b/public/dist/editor.bundle.js index cb4b962..a79862a 100644 --- a/public/dist/editor.bundle.js +++ b/public/dist/editor.bundle.js @@ -33,17 +33,6 @@ eval("/*!\n * Editor.js\n * \n * @version 2.11.7\n * \n * @licence Apache-2.0\n /***/ }), -/***/ "./node_modules/@editorjs/embed/dist/bundle.js": -/*!*****************************************************!*\ - !*** ./node_modules/@editorjs/embed/dist/bundle.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("!function(e,t){ true?module.exports=t():undefined}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"/\",n(n.s=13)}([function(e,t,n){var r=n(5),i=n(6),o=n(7);e.exports=function(e,t){return r(e)||i(e,t)||o()}},function(e,t){function n(e){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function r(t){return\"function\"==typeof Symbol&&\"symbol\"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":n(e)},r(t)}e.exports=r},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}},function(e,t){function n(e,t){for(var n=0;n=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}},function(e,t){e.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}},function(e,t,n){var r=n(9);\"string\"==typeof r&&(r=[[e.i,r,\"\"]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(11)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(10)(!1)).push([e.i,\".embed-tool--loading .embed-tool__caption {\\n display: none;\\n }\\n\\n .embed-tool--loading .embed-tool__preloader {\\n display: block;\\n }\\n\\n .embed-tool--loading .embed-tool__content {\\n display: none;\\n }\\n .embed-tool__preloader {\\n display: none;\\n position: relative;\\n height: 200px;\\n box-sizing: border-box;\\n border-radius: 5px;\\n border: 1px solid #e6e9eb;\\n }\\n .embed-tool__preloader::before {\\n content: '';\\n position: absolute;\\n z-index: 3;\\n left: 50%;\\n top: 50%;\\n width: 30px;\\n height: 30px;\\n margin-top: -25px;\\n margin-left: -15px;\\n border-radius: 50%;\\n border: 2px solid #cdd1e0;\\n border-top-color: #388ae5;\\n box-sizing: border-box;\\n animation: embed-preloader-spin 2s infinite linear;\\n }\\n .embed-tool__url {\\n position: absolute;\\n bottom: 20px;\\n left: 50%;\\n transform: translateX(-50%);\\n max-width: 250px;\\n color: #7b7e89;\\n font-size: 11px;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n }\\n .embed-tool__caption {\\n margin-top: 7px;\\n }\\n\\n@keyframes embed-preloader-spin {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n\",\"\"])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||\"\",r=e[3];if(!r)return n;if(t&&\"function\"==typeof btoa){var i=function(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}(r),o=r.sources.map(function(e){return\"/*# sourceURL=\"+r.sourceRoot+e+\" */\"});return[n].concat(o).concat([i]).join(\"\\n\")}return[n].join(\"\\n\")}(t,e);return t[2]?\"@media \"+t[2]+\"{\"+n+\"}\":n}).join(\"\")},t.i=function(e,n){\"string\"==typeof e&&(e=[[null,e,\"\"]]);for(var r={},i=0;i=0&&l.splice(t,1)}function p(e){var t=document.createElement(\"style\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),m(t,e.attrs),f(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var l=s++;n=a||(a=p(t)),r=y.bind(null,n,l,!1),i=y.bind(null,n,l,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(e){var t=document.createElement(\"link\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),e.attrs.rel=\"stylesheet\",m(t,e.attrs),f(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=c(r));i&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=p(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute(\"media\",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){h(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var n=d(e,t);return u(n,t),function(e){for(var i=[],o=0;o?title=0&byline=0\",html:'',height:320,width:580},youtube:{regex:/(?:https?:\\/\\/)?(?:www\\.)?(?:(?:youtu\\.be\\/)|(?:youtube\\.com)\\/(?:v\\/|u\\/\\w\\/|embed\\/|watch))(?:(?:\\?v=)?([^#&?=]*))?((?:[?&]\\w*=\\w*)*)/,embedUrl:\"https://www.youtube.com/embed/<%= remote_id %>\",html:'',height:320,width:580,id:function(e){var t=a()(e,2),n=t[0],r=t[1];if(!r&&n)return n;var i={start:\"start\",end:\"end\",t:\"start\",time_continue:\"start\",list:\"list\"};return r=r.slice(1).split(\"&\").map(function(e){var t=e.split(\"=\"),r=a()(t,2),o=r[0],s=r[1];if(n||\"v\"!==o){if(i[o])return\"\".concat(i[o],\"=\").concat(s)}else n=s}).filter(function(e){return!!e}),n+\"?\"+r.join(\"&\")}},coub:{regex:/https?:\\/\\/coub\\.com\\/view\\/([^\\/\\?\\&]+)/,embedUrl:\"https://coub.com/embed/<%= remote_id %>\",html:'',height:320,width:580},vine:{regex:/https?:\\/\\/vine\\.co\\/v\\/([^\\/\\?\\&]+)/,embedUrl:\"https://vine.co/v/<%= remote_id %>/embed/simple/\",html:'',height:320,width:580},imgur:{regex:/https?:\\/\\/(?:i\\.)?imgur\\.com.*\\/([a-zA-Z0-9]+)(?:\\.gifv)?/,embedUrl:\"http://imgur.com/<%= remote_id %>/embed\",html:'',height:500,width:540},gfycat:{regex:/https?:\\/\\/gfycat\\.com(?:\\/detail)?\\/([a-zA-Z]+)/,embedUrl:\"https://gfycat.com/ifr/<%= remote_id %>\",html:\"\",height:436,width:580},\"twitch-channel\":{regex:/https?:\\/\\/www\\.twitch\\.tv\\/([^\\/\\?\\&]*)\\/?$/,embedUrl:\"https://player.twitch.tv/?channel=<%= remote_id %>\",html:'',height:366,width:600},\"twitch-video\":{regex:/https?:\\/\\/www\\.twitch\\.tv\\/(?:[^\\/\\?\\&]*\\/v|videos)\\/([0-9]*)/,embedUrl:\"https://player.twitch.tv/?video=v<%= remote_id %>\",html:'',height:366,width:600},\"yandex-music-album\":{regex:/https?:\\/\\/music\\.yandex\\.ru\\/album\\/([0-9]*)\\/?$/,embedUrl:\"https://music.yandex.ru/iframe/#album/<%= remote_id %>/\",html:'',height:400,width:540},\"yandex-music-track\":{regex:/https?:\\/\\/music\\.yandex\\.ru\\/album\\/([0-9]*)\\/track\\/([0-9]*)/,embedUrl:\"https://music.yandex.ru/iframe/#track/<%= remote_id %>/\",html:'',height:100,width:540,id:function(e){return e.join(\"/\")}},\"yandex-music-playlist\":{regex:/https?:\\/\\/music\\.yandex\\.ru\\/users\\/([^\\/\\?\\&]*)\\/playlists\\/([0-9]*)/,embedUrl:\"https://music.yandex.ru/iframe/#playlist/<%= remote_id %>/show/cover/description/\",html:'',height:400,width:540,id:function(e){return e.join(\"/\")}},codepen:{regex:/https?:\\/\\/codepen\\.io\\/([^\\/\\?\\&]*)\\/pen\\/([^\\/\\?\\&]*)/,embedUrl:\"https://codepen.io/<%= remote_id %>?height=300&theme-id=0&default-tab=css,result&embed-version=2\",html:\"\",height:300,width:600,id:function(e){return e.join(\"/embed/\")}}},f=(n(8),n(4));n.d(t,\"default\",function(){return h});var h=function(){function e(t){var n=t.data,r=t.api;l()(this,e),this.api=r,this._data={},this.element=null,this.data=n}return u()(e,[{key:\"render\",value:function(){var t=this;if(!this.data.service){var n=document.createElement(\"div\");return this.element=n,n}var r=e.services[this.data.service].html,i=document.createElement(\"div\"),o=document.createElement(\"div\"),a=document.createElement(\"template\"),s=this.createPreloader();i.classList.add(this.CSS.baseClass,this.CSS.container,this.CSS.containerLoading),o.classList.add(this.CSS.input,this.CSS.caption),i.appendChild(s),o.contentEditable=!0,o.dataset.placeholder=\"Enter a caption\",o.innerHTML=this.data.caption||\"\",a.innerHTML=r,a.content.firstChild.setAttribute(\"src\",this.data.embed),a.content.firstChild.classList.add(this.CSS.content);var l=this.embedIsReady(i);return i.appendChild(a.content.firstChild),i.appendChild(o),l.then(function(){i.classList.remove(t.CSS.containerLoading)}),this.element=i,i}},{key:\"createPreloader\",value:function(){var e=document.createElement(\"preloader\"),t=document.createElement(\"div\");return t.textContent=this.data.source,e.classList.add(this.CSS.preloader),t.classList.add(this.CSS.url),e.appendChild(t),e}},{key:\"save\",value:function(){return this.data}},{key:\"onPaste\",value:function(t){var n=t.detail,r=n.key,i=n.data,o=e.services[r],a=o.regex,s=o.embedUrl,l=o.width,c=o.height,u=o.id,d=void 0===u?function(e){return e.shift()}:u,f=a.exec(i).slice(1),h=s.replace(/<\\%\\= remote\\_id \\%\\>/g,d(f));this.data={service:r,source:i,embed:h,width:l,height:c}}},{key:\"embedIsReady\",value:function(e){var t=null;return new Promise(function(n,r){(t=new MutationObserver(Object(f.debounce)(n,450))).observe(e,{childList:!0,subtree:!0})}).then(function(){t.disconnect()})}},{key:\"data\",set:function(e){if(!(e instanceof Object))throw Error(\"Embed Tool data should be object\");var t=e.service,n=e.source,r=e.embed,i=e.width,o=e.height,a=e.caption,s=void 0===a?\"\":a;this._data={service:t||this.data.service,source:n||this.data.source,embed:r||this.data.embed,width:i||this.data.width,height:o||this.data.height,caption:s||this.data.caption||\"\"};var l=this.element;l&&l.parentNode.replaceChild(this.render(),l)},get:function(){if(this.element){var e=this.element.querySelector(\".\".concat(this.api.styles.input));this._data.caption=e?e.innerHTML:\"\"}return this._data}},{key:\"CSS\",get:function(){return{baseClass:this.api.styles.block,input:this.api.styles.input,container:\"embed-tool\",containerLoading:\"embed-tool--loading\",preloader:\"embed-tool__preloader\",caption:\"embed-tool__caption\",url:\"embed-tool__url\",content:\"embed-tool__content\"}}}],[{key:\"prepare\",value:function(t){var n=t.config,r=(void 0===n?{}:n).services,o=void 0===r?{}:r,s=Object.entries(d),l=Object.entries(o).filter(function(e){var t=a()(e,2),n=(t[0],t[1]);return\"boolean\"==typeof n&&!0===n}).map(function(e){return a()(e,1)[0]}),c=Object.entries(o).filter(function(e){var t=a()(e,2),n=(t[0],t[1]);return\"object\"===i()(n)}).filter(function(t){var n=a()(t,2),r=(n[0],n[1]);return e.checkServiceConfig(r)}).map(function(e){var t=a()(e,2),n=t[0],r=t[1];return[n,{regex:r.regex,embedUrl:r.embedUrl,html:r.html,height:r.height,width:r.width,id:r.id}]});l.length&&(s=s.filter(function(e){var t=a()(e,1)[0];return l.includes(t)})),s=s.concat(c),e.services=s.reduce(function(e,t){var n=a()(t,2),r=n[0],i=n[1];return r in e?(e[r]=Object.assign({},e[r],i),e):(e[r]=i,e)},{}),e.patterns=s.reduce(function(e,t){var n=a()(t,2),r=n[0],i=n[1];return e[r]=i.regex,e},{})}},{key:\"checkServiceConfig\",value:function(e){var t=e.regex,n=e.embedUrl,r=e.html,i=e.height,o=e.width,a=e.id,s=t&&t instanceof RegExp&&n&&\"string\"==typeof n&&r&&\"string\"==typeof r;return s=(s=(s=s&&(void 0===a||a instanceof Function))&&(void 0===i||Number.isFinite(i)))&&(void 0===o||Number.isFinite(o))}},{key:\"pasteConfig\",get:function(){return{patterns:e.patterns}}}]),e}()}]).default});\n\n//# sourceURL=webpack://Docs/./node_modules/@editorjs/embed/dist/bundle.js?"); - -/***/ }), - /***/ "./node_modules/@editorjs/header/dist/bundle.js": /*!******************************************************!*\ !*** ./node_modules/@editorjs/header/dist/bundle.js ***! @@ -99,28 +88,6 @@ eval("!function(t,e){ true?module.exports=e():undefined}(window,function(){retur /***/ }), -/***/ "./node_modules/@editorjs/quote/dist/bundle.js": -/*!*****************************************************!*\ - !*** ./node_modules/@editorjs/quote/dist/bundle.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("!function(t,e){ true?module.exports=e():undefined}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"/\",n(n.s=0)}([function(t,e,n){function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e'},{name:\"center\",icon:''}]}}],[{key:\"toolbox\",get:function(){return{icon:'',title:\"Quote\"}}},{key:\"contentless\",get:function(){return!0}},{key:\"enableLineBreaks\",get:function(){return!0}},{key:\"DEFAULT_QUOTE_PLACEHOLDER\",get:function(){return\"Enter a quote\"}},{key:\"DEFAULT_CAPTION_PLACEHOLDER\",get:function(){return\"Enter a caption\"}},{key:\"ALIGNMENTS\",get:function(){return{left:\"left\",center:\"center\"}}},{key:\"DEFAULT_ALIGNMENT\",get:function(){return t.ALIGNMENTS.left}}]),i(t,[{key:\"render\",value:function(){var t=this._make(\"blockquote\",[this.CSS.baseClass,this.CSS.wrapper]),e=this._make(\"div\",[this.CSS.input,this.CSS.text],{contentEditable:!0,innerHTML:this.data.text}),n=this._make(\"div\",[this.CSS.input,this.CSS.caption],{contentEditable:!0,innerHTML:this.data.caption});return e.dataset.placeholder=this.quotePlaceholder,n.dataset.placeholder=this.captionPlaceholder,t.appendChild(e),t.appendChild(n),t}},{key:\"save\",value:function(t){var e=t.querySelector(\".\".concat(this.CSS.text)),n=t.querySelector(\".\".concat(this.CSS.caption));return Object.assign(this.data,{text:e.innerHTML,caption:n.innerHTML})}},{key:\"renderSettings\",value:function(){var t=this,e=this._make(\"div\",[this.CSS.settingsWrapper],{});return this.settings.map(function(n){var r,o=t._make(\"div\",t.CSS.settingsButton,{innerHTML:n.icon,title:\"\".concat((r=n.name,r[0].toUpperCase()+r.substr(1)),\" alignment\")});return o.classList.toggle(t.CSS.settingsButtonActive,n.name===t.data.alignment),e.appendChild(o),o}).forEach(function(e,n,r){e.addEventListener(\"click\",function(){t._toggleTune(t.settings[n].name),r.forEach(function(e,n){var r=t.settings[n].name;e.classList.toggle(t.CSS.settingsButtonActive,r===t.data.alignment)})})}),e}},{key:\"_toggleTune\",value:function(t){this.data.alignment=t}},{key:\"_make\",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(t);Array.isArray(n)?(e=i.classList).add.apply(e,r(n)):n&&i.classList.add(n);for(var a in o)i[a]=o[a];return i}}],[{key:\"sanitize\",get:function(){return{text:{br:!0},caption:{br:!0},alignment:{}}}}]),t}();t.exports=a},function(t,e,n){var r=n(2);\"string\"==typeof r&&(r=[[t.i,r,\"\"]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,\".cdx-quote-icon svg {\\n transform: rotate(180deg);\\n}\\n\\n.cdx-quote {\\n margin: 0;\\n}\\n\\n.cdx-quote__text {\\n min-height: 158px;\\n margin-bottom: 10px;\\n}\\n\\n.cdx-quote__caption {}\\n\\n.cdx-quote-settings {\\n display: flex;\\n}\\n\\n.cdx-quote-settings .cdx-settings-button {\\n width: 50%;\\n}\\n\",\"\"])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||\"\",r=t[3];if(!r)return n;if(e&&\"function\"==typeof btoa){var o=(a=r,\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+\" */\"),i=r.sources.map(function(t){return\"/*# sourceURL=\"+r.sourceRoot+t+\" */\"});return[n].concat(i).concat([o]).join(\"\\n\")}var a;return[n].join(\"\\n\")}(e,t);return e[2]?\"@media \"+e[2]+\"{\"+n+\"}\":n}).join(\"\")},e.i=function(t,n){\"string\"==typeof t&&(t=[[null,t,\"\"]]);for(var r={},o=0;o=0&&l.splice(e,1)}function g(t){var e=document.createElement(\"style\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),m(e,t.attrs),h(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function y(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var a=c++;n=u||(u=g(e)),r=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else t.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(t){var e=document.createElement(\"link\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),t.attrs.rel=\"stylesheet\",m(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute(\"media\",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(e=e||{}).attrs=\"object\"==typeof e.attrs?e.attrs:{},e.singleton||\"boolean\"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto=\"head\"),e.insertAt||(e.insertAt=\"bottom\");var n=d(t,e);return p(n,e),function(t){for(var r=[],o=0;o',title:\"Raw HTML\"}}}]),o(e,[{key:\"drawView\",value:function(){var e=document.createElement(\"div\"),t=document.createElement(\"textarea\");return e.classList.add(this.CSS.baseClass,this.CSS.wrapper),t.classList.add(this.CSS.textarea,this.CSS.input),t.textContent=this.data.html,t.placeholder=this.placeholder,e.appendChild(t),e}},{key:\"render\",value:function(){return this.element}},{key:\"save\",value:function(e){return{html:e.querySelector(\"textarea\").value}}}],[{key:\"DEFAULT_PLACEHOLDER\",get:function(){return\"Enter HTML code\"}}]),e}();e.exports=i},function(e,t,n){var r=n(2);\"string\"==typeof r&&(r=[[e.i,r,\"\"]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,\".ce-rawtool__textarea {\\n min-height: 200px;\\n resize: vertical;\\n border-radius: 5px;\\n background-color: #1e2128;\\n font-family: Menlo, Monaco, Consolas, Courier New, monospace;\\n font-size: 10px;\\n line-height: 1.8;\\n letter-spacing: -0.2px;\\n color: #9ca3b3;\\n}\\n\",\"\"])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||\"\",r=e[3];if(!r)return n;if(t&&\"function\"==typeof btoa){var o=(a=r,\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+\" */\"),i=r.sources.map(function(e){return\"/*# sourceURL=\"+r.sourceRoot+e+\" */\"});return[n].concat(i).concat([o]).join(\"\\n\")}var a;return[n].join(\"\\n\")}(t,e);return t[2]?\"@media \"+t[2]+\"{\"+n+\"}\":n}).join(\"\")},t.i=function(e,n){\"string\"==typeof e&&(e=[[null,e,\"\"]]);for(var r={},o=0;o=0&&l.splice(t,1)}function b(e){var t=document.createElement(\"style\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=u||(u=b(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(e){var t=document.createElement(\"link\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),e.attrs.rel=\"stylesheet\",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute(\"media\",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var n=d(e,t);return p(n,t),function(e){for(var r=[],o=0;o 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Editor);\n\n var defaultConfig = {\n tools: {\n header: {\n class: _editorjs_header__WEBPACK_IMPORTED_MODULE_3___default.a,\n inlineToolbar: ['link', 'marker'],\n config: {\n placeholder: options.headerPlaceholder || ''\n }\n },\n quote: {\n class: _editorjs_quote__WEBPACK_IMPORTED_MODULE_4___default.a,\n inlineToolbar: true\n },\n code: {\n class: _editorjs_code__WEBPACK_IMPORTED_MODULE_6___default.a,\n shortcut: 'CMD+SHIFT+D'\n },\n rawTool: {\n class: _editorjs_raw__WEBPACK_IMPORTED_MODULE_11___default.a,\n shortcut: 'CMD+SHIFT+R'\n },\n delimiter: _editorjs_delimiter__WEBPACK_IMPORTED_MODULE_7___default.a,\n embed: _editorjs_embed__WEBPACK_IMPORTED_MODULE_12___default.a,\n inlineCode: {\n class: _editorjs_inline_code__WEBPACK_IMPORTED_MODULE_8___default.a,\n shortcut: 'CMD+SHIFT+C'\n },\n marker: {\n class: _editorjs_marker__WEBPACK_IMPORTED_MODULE_5___default.a,\n shortcut: 'CMD+SHIFT+M'\n },\n list: {\n class: _editorjs_list__WEBPACK_IMPORTED_MODULE_9___default.a,\n inlineToolbar: true\n },\n image: {\n class: _editorjs_image__WEBPACK_IMPORTED_MODULE_10___default.a,\n inlineToolbar: true,\n config: {\n types: 'image/*, video/mp4',\n endpoints: {\n byFile: '/api/transport/image',\n byUrl: '/api/transport/fetch'\n },\n additionalRequestData: {\n map: JSON.stringify({\n path: 'file:url',\n size: 'file:size',\n mimetype: 'file:mime'\n })\n }\n }\n }\n },\n data: {\n blocks: [{\n type: 'header',\n data: {\n text: '',\n level: 2\n }\n }]\n }\n };\n this.editor = new _editorjs_editorjs__WEBPACK_IMPORTED_MODULE_2___default.a(Object.assign(defaultConfig, editorConfig));\n }\n /**\n * Return Editor data\n * @return {Promise.<{}>}\n */\n\n\n _createClass(Editor, [{\n key: \"save\",\n value: function save() {\n return this.editor.saver.save();\n }\n }]);\n\n return Editor;\n}();\n\n\n\n//# sourceURL=webpack://Docs/./src/frontend/js/classes/editor.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Editor; });\n/* harmony import */ var core_js_modules_es6_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.object.define-property */ \"./node_modules/core-js/modules/es6.object.define-property.js\");\n/* harmony import */ var core_js_modules_es6_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_define_property__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.assign */ \"./node_modules/core-js/modules/es6.object.assign.js\");\n/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _editorjs_editorjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @editorjs/editorjs */ \"./node_modules/@editorjs/editorjs/dist/editor.js\");\n/* harmony import */ var _editorjs_editorjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_editorjs_editorjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _editorjs_header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @editorjs/header */ \"./node_modules/@editorjs/header/dist/bundle.js\");\n/* harmony import */ var _editorjs_header__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_editorjs_header__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _editorjs_image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @editorjs/image */ \"./node_modules/@editorjs/image/dist/bundle.js\");\n/* harmony import */ var _editorjs_image__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_editorjs_image__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _editorjs_code__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @editorjs/code */ \"./node_modules/@editorjs/code/dist/bundle.js\");\n/* harmony import */ var _editorjs_code__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_editorjs_code__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _editorjs_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @editorjs/list */ \"./node_modules/@editorjs/list/dist/bundle.js\");\n/* harmony import */ var _editorjs_list__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_editorjs_list__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _editorjs_delimiter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @editorjs/delimiter */ \"./node_modules/@editorjs/delimiter/dist/bundle.js\");\n/* harmony import */ var _editorjs_delimiter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_editorjs_delimiter__WEBPACK_IMPORTED_MODULE_7__);\n!(function webpackMissingModule() { var e = new Error(\"Cannot find module '@editorjs/table'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }());\n/* harmony import */ var _editorjs_inline_code__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @editorjs/inline-code */ \"./node_modules/@editorjs/inline-code/dist/bundle.js\");\n/* harmony import */ var _editorjs_inline_code__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_editorjs_inline_code__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _editorjs_marker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @editorjs/marker */ \"./node_modules/@editorjs/marker/dist/bundle.js\");\n/* harmony import */ var _editorjs_marker__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_editorjs_marker__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/**\n * Block Tools for the Editor\n */\n\n\n\n\n\n\n\n/**\n * Inline Tools for the Editor\n */\n\n\n\n/**\n * Class for working with Editor.js\n */\n\nvar Editor =\n/*#__PURE__*/\nfunction () {\n /**\n * Creates Editor instance\n * @param {object} editorConfig - configuration object for Editor.js\n * @param {object} data.blocks - data to start with\n * @param {object} options\n * @param {string} options.headerPlaceholder - placeholder for Header tool\n */\n function Editor() {\n var editorConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Editor);\n\n var defaultConfig = {\n tools: {\n header: {\n class: _editorjs_header__WEBPACK_IMPORTED_MODULE_3___default.a,\n inlineToolbar: ['link', 'marker', 'inlineCode'],\n config: {\n placeholder: options.headerPlaceholder || ''\n }\n },\n image: {\n class: _editorjs_image__WEBPACK_IMPORTED_MODULE_4___default.a,\n inlineToolbar: true,\n config: {\n types: 'image/*, video/mp4',\n endpoints: {\n byFile: '/api/transport/image',\n byUrl: '/api/transport/fetch'\n },\n additionalRequestData: {\n map: JSON.stringify({\n path: 'file:url',\n size: 'file:size',\n mimetype: 'file:mime'\n })\n }\n }\n },\n code: {\n class: _editorjs_code__WEBPACK_IMPORTED_MODULE_5___default.a,\n shortcut: 'CMD+SHIFT+D'\n },\n list: {\n class: _editorjs_list__WEBPACK_IMPORTED_MODULE_6___default.a,\n inlineToolbar: true\n },\n delimiter: _editorjs_delimiter__WEBPACK_IMPORTED_MODULE_7___default.a,\n table: {\n class: !(function webpackMissingModule() { var e = new Error(\"Cannot find module '@editorjs/table'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()),\n inlineToolbar: true\n },\n\n /**\n * Inline Tools\n */\n inlineCode: {\n class: _editorjs_inline_code__WEBPACK_IMPORTED_MODULE_9___default.a,\n shortcut: 'CMD+SHIFT+C'\n },\n marker: {\n class: _editorjs_marker__WEBPACK_IMPORTED_MODULE_10___default.a,\n shortcut: 'CMD+SHIFT+M'\n }\n },\n data: {\n blocks: [{\n type: 'header',\n data: {\n text: '',\n level: 2\n }\n }]\n }\n };\n this.editor = new _editorjs_editorjs__WEBPACK_IMPORTED_MODULE_2___default.a(Object.assign(defaultConfig, editorConfig));\n }\n /**\n * Return Editor data\n * @return {Promise.<{}>}\n */\n\n\n _createClass(Editor, [{\n key: \"save\",\n value: function save() {\n return this.editor.saver.save();\n }\n }]);\n\n return Editor;\n}();\n\n\n\n//# sourceURL=webpack://Docs/./src/frontend/js/classes/editor.js?"); /***/ }) diff --git a/public/dist/main.css b/public/dist/main.css index 7483538..980ea26 100644 --- a/public/dist/main.css +++ b/public/dist/main.css @@ -1 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--color-text-main:#1d202b;--color-text-second:#7b7e89;--color-line-gray:#e8e8eb;--color-link-active:#388ae5;--color-button-danger:#ff1629;--layout-padding-horisontal:30px;--layout-padding-vertical:40px;--layout-width-aside:200px;--layout-width-main-col:650px}@media (max-width:980px){:root{--layout-padding-horisontal:15px;--layout-padding-vertical:15px}}.docs{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 30px;padding:0 var(--layout-padding-horisontal)}@media (max-width:980px){.docs{-ms-flex-wrap:wrap;flex-wrap:wrap}}.docs__aside{width:200px;width:var(--layout-width-aside)}@media (max-width:980px){.docs__aside{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%;padding:20px 30px!important;padding:20px var(--layout-padding-horisontal)!important;margin:0 -30px;margin:0 calc(-1*var(--layout-padding-horisontal));border-bottom:1px solid #e8e8eb;border-bottom:1px solid var(--color-line-gray)}}.docs__content{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2;word-wrap:break-word}@media (max-width:980px){.docs__content{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}}.docs__content-inner{max-width:650px;max-width:var(--layout-width-main-col);margin:0 auto}.docs__aside,.docs__content{padding:40px 0;padding:var(--layout-padding-vertical) 0}@media (max-width:980px){.docs__aside,.docs__content{padding:20px 0}}.docs-header{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;padding:0 30px;padding:0 var(--layout-padding-horisontal);border-bottom:1px solid #e8e8eb;border-bottom:1px solid var(--color-line-gray);font-size:15.8px;line-height:50px;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}@media (max-width:980px){.docs-header{line-height:40px}}.docs-header a{display:inline-block;text-decoration:none}.docs-header__logo{font-weight:700;color:inherit}.docs-header__menu{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 0 0 auto;padding-left:0}@media (max-width:980px){.docs-header__menu{-ms-flex-preferred-size:100%;flex-basis:100%;font-size:12px}}.docs-header__menu li{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;list-style:none;margin-left:20px}@media (max-width:980px){.docs-header__menu li{margin-left:0;margin-right:15px}}@media (max-width:980px){.docs-header__menu-add{position:absolute;right:15px;top:15px;line-height:1em;margin:0!important}}@media (max-width:980px){.docs-header__menu-add a{font-size:0;padding:8px;margin-right:0}}.docs-header__menu a:not(.docs-header__button){color:inherit}.docs-header__menu a:not(.docs-header__button):hover{color:#388ae5;color:var(--color-link-active)}.docs-header__button{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.docs-header__button svg{margin:0 .3em 0 -.05em}.docs-header__button:hover{background:#387ecc}.docs-header__button{margin:auto 30px auto auto}.docs-aside{font-size:15px;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.docs-aside{font-size:13px;display:none;margin-top:20px}}.docs-aside--toggled{display:block!important}.docs-aside a{text-decoration:none}.docs-aside__section{margin-bottom:30px}@media (max-width:980px){.docs-aside__section{margin-bottom:20px}}.docs-aside__section:last-of-type{margin-bottom:0}.docs-aside__section-title{margin-bottom:15px;color:#388ae5;color:var(--color-link-active)}@media (max-width:980px){.docs-aside__section-title{margin-bottom:10px}}.docs-aside__section-list{padding-left:0;list-style:none}.docs-aside__section-list a{display:inline-block;color:inherit;padding:8px 0}.docs-aside-toggler{display:none;font-size:13px;cursor:pointer;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.docs-aside-toggler{display:block}}.docs-aside-toggler svg{margin-right:10px}.writing-header{display:-webkit-box;display:-ms-flexbox;display:flex;position:-webkit-sticky;position:sticky;top:0;padding:15px 0;margin-top:-40px;margin-top:calc(-1*var(--layout-padding-vertical));background:#fff;-webkit-box-shadow:0 3px 10px #fff;box-shadow:0 3px 10px #fff;z-index:2;font-size:14px}.writing-header__save{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.writing-header__save svg{margin:0 .3em 0 -.05em}.writing-header__save:hover{background:#387ecc}.writing-header__save{margin:auto}.writing-header__left{margin:auto 0;color:#7b7e89;color:var(--color-text-second)}.writing-header__left span{margin-right:10px}.writing-header select{max-width:100px}.writing-buttons__remove{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#ff1629;background:var(--color-button-danger);color:#fff;-webkit-box-shadow:none;box-shadow:none}.writing-buttons__remove svg{margin:0 .3em 0 -.05em}.writing-buttons__remove:hover{background:#e61627}.uri-input{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:10px 12px;border-radius:3px;border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);outline:none}@media (min-width:1050px){.writing-editor{margin:0 -100px}}.codex-editor__redactor .ce-block:first-of-type .ce-header{font-size:32px}.page{font-size:16px;line-height:1.6}.page__header{display:-webkit-box;display:-ms-flexbox;display:flex;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.page__header{font-size:13px}}.page__header-nav{color:inherit;text-decoration:none}@media (max-width:980px){.page__header-nav{display:none}}.page__header-nav:hover{color:#388ae5;color:var(--color-link-active)}.page__header-nav:not(:last-of-type):after{content:"\BB";margin:0 .7em 0 .45em}.page__header-time{margin-left:auto}@media (max-width:980px){.page__header-time{margin-left:0}}.page__header-button{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.page__header-button svg{margin:0 .3em 0 -.05em}.page__header-button:hover{background:#387ecc}.page__header-button{padding:5px 10px;font-size:13px;margin-left:10px}.page__title{font-size:26px;font-weight:700;letter-spacing:-.04px;margin-bottom:-.2em}.page .cdx-marker{background:rgba(245,235,111,.33);padding:3px 0}.page__content a{text-decoration:none;border-bottom:1px solid #000;padding-bottom:1px;color:inherit}.page__content a:hover{color:#388ae5;color:var(--color-link-active);border-bottom-color:#388ae5;border-bottom-color:var(--color-link-active)}.block-header{margin:1.5em 0 .5em}.block-header--2{font-size:22px;font-weight:500}.block-header--3{font-size:18px;font-weight:500}.block-code{padding:15px!important;border-radius:5px;font-size:13px;background:#fcfaff!important;border:1px solid #ededf0;font-family:Menlo,Monaco,Consolas,Courier New,monospace;line-height:1.7em}.block-list li{margin:10px 0}.block-image{margin:40px auto;text-align:center}.block-image__content img{vertical-align:bottom;max-width:100%}.block-image__content--stretched{max-width:none!important;width:calc(100% + 120px)!important;margin-left:-60px}.block-image__content--stretched img{width:100%}.block-image__content--bordered img{border:3px solid #e8e8eb;border:3px solid var(--color-line-gray);-webkit-box-sizing:border-box;box-sizing:border-box}.block-image__content--with-background{padding:15px;background:#e8e8eb;background:var(--color-line-gray)}.block-image__content--with-background img{max-width:60%;margin:0 auto}.block-image__caption{margin:1em auto;color:#7b7e89;color:var(--color-text-second)}.block-delimiter{line-height:1.6em;width:100%;text-align:center}.block-delimiter:before{display:inline-block;content:"***";font-size:30px;line-height:65px;height:30px;letter-spacing:.2em}.landing-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.landing-loader{position:absolute;left:50%;top:50%;z-index:-1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.landing-loader>svg{width:80px;height:80px}.landing-frame{width:100%;height:100%;opacity:0;-webkit-transition:opacity .5s ease;transition:opacity .5s ease;will-change:opacity}.auth-form{font-size:15px;text-align:center;margin-top:30vh}@media (max-width:980px){.auth-form h1{font-size:20px}}.auth-form p{margin:40px 0 20px}.auth-form input[type=password]{padding:9px;font-size:15px;outline:none;border-radius:3px;-webkit-appearance:none;border:1px solid #e8e8eb;border:1px solid var(--color-line-gray)}.auth-form input[type=submit]{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.auth-form input[type=submit] svg{margin:0 .3em 0 -.05em}.auth-form input[type=submit]:hover{background:#387ecc}.auth-form input[type=submit]{font-size:15px;padding:10px 20px;line-height:inherit;vertical-align:top}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Helvetica,Arial,Verdana;color:#1d202b;color:var(--color-text-main);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}svg{fill:currentColor} +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--color-text-main:#1d202b;--color-text-second:#7b7e89;--color-line-gray:#e8e8eb;--color-link-active:#388ae5;--color-button-danger:#ff1629;--layout-padding-horisontal:30px;--layout-padding-vertical:40px;--layout-width-aside:200px;--layout-width-main-col:650px}@media (max-width:980px){:root{--layout-padding-horisontal:15px;--layout-padding-vertical:15px}}.docs{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 30px;padding:0 var(--layout-padding-horisontal)}@media (max-width:980px){.docs{-ms-flex-wrap:wrap;flex-wrap:wrap}}.docs__aside{width:200px;width:var(--layout-width-aside)}@media (max-width:980px){.docs__aside{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%;padding:20px 30px!important;padding:20px var(--layout-padding-horisontal)!important;margin:0 -30px;margin:0 calc(-1*var(--layout-padding-horisontal));border-bottom:1px solid #e8e8eb;border-bottom:1px solid var(--color-line-gray)}}.docs__content{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2;word-wrap:break-word}@media (max-width:980px){.docs__content{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}}.docs__content-inner{max-width:650px;max-width:var(--layout-width-main-col);margin:0 auto}.docs__aside,.docs__content{padding:40px 0;padding:var(--layout-padding-vertical) 0}@media (max-width:980px){.docs__aside,.docs__content{padding:20px 0}}.docs-header{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;padding:0 30px;padding:0 var(--layout-padding-horisontal);border-bottom:1px solid #e8e8eb;border-bottom:1px solid var(--color-line-gray);font-size:15.8px;line-height:50px;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}@media (max-width:980px){.docs-header{line-height:40px}}.docs-header a{display:inline-block;text-decoration:none}.docs-header__logo{font-weight:700;color:inherit}.docs-header__menu{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 0 0 auto;padding-left:0}@media (max-width:980px){.docs-header__menu{-ms-flex-preferred-size:100%;flex-basis:100%;font-size:12px}}.docs-header__menu li{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;list-style:none;margin-left:20px}@media (max-width:980px){.docs-header__menu li{margin-left:0;margin-right:15px}}@media (max-width:980px){.docs-header__menu-add{position:absolute;right:15px;top:15px;line-height:1em;margin:0!important}}@media (max-width:980px){.docs-header__menu-add a{font-size:0;padding:8px;margin-right:0}}.docs-header__menu a:not(.docs-header__button){color:inherit}.docs-header__menu a:not(.docs-header__button):hover{color:#388ae5;color:var(--color-link-active)}.docs-header__button{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.docs-header__button svg{margin:0 .3em 0 -.05em}.docs-header__button:hover{background:#387ecc}.docs-header__button{margin:auto 30px auto auto}.docs-aside{font-size:15px;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.docs-aside{font-size:13px;display:none;margin-top:20px}}.docs-aside--toggled{display:block!important}.docs-aside a{text-decoration:none}.docs-aside__section{margin-bottom:30px}@media (max-width:980px){.docs-aside__section{margin-bottom:20px}}.docs-aside__section:last-of-type{margin-bottom:0}.docs-aside__section-title{margin-bottom:15px;color:#388ae5;color:var(--color-link-active)}@media (max-width:980px){.docs-aside__section-title{margin-bottom:10px}}.docs-aside__section-list{padding-left:0;list-style:none}.docs-aside__section-list a{display:inline-block;color:inherit;padding:8px 0}.docs-aside-toggler{display:none;font-size:13px;cursor:pointer;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.docs-aside-toggler{display:block}}.docs-aside-toggler svg{margin-right:10px}.writing-header{display:-webkit-box;display:-ms-flexbox;display:flex;position:-webkit-sticky;position:sticky;top:0;padding:15px 0;margin-top:-40px;margin-top:calc(-1*var(--layout-padding-vertical));background:#fff;-webkit-box-shadow:0 3px 10px #fff;box-shadow:0 3px 10px #fff;z-index:2;font-size:14px}.writing-header__save{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.writing-header__save svg{margin:0 .3em 0 -.05em}.writing-header__save:hover{background:#387ecc}.writing-header__save{margin:auto}.writing-header__left{margin:auto 0;color:#7b7e89;color:var(--color-text-second)}.writing-header__left span{margin-right:10px}.writing-header select{max-width:100px}.writing-buttons__remove{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#ff1629;background:var(--color-button-danger);color:#fff;-webkit-box-shadow:none;box-shadow:none}.writing-buttons__remove svg{margin:0 .3em 0 -.05em}.writing-buttons__remove:hover{background:#e61627}.uri-input{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:10px 12px;border-radius:3px;border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);outline:none}@media (min-width:1050px){.writing-editor{margin:0 -100px}}.codex-editor__redactor .ce-block:first-of-type .ce-header{font-size:32px}.page{font-size:16px;line-height:1.6}.page__header{display:-webkit-box;display:-ms-flexbox;display:flex;color:#7b7e89;color:var(--color-text-second)}@media (max-width:980px){.page__header{font-size:13px}}.page__header-nav{color:inherit;text-decoration:none}@media (max-width:980px){.page__header-nav{display:none}}.page__header-nav:hover{color:#388ae5;color:var(--color-link-active)}.page__header-nav:not(:last-of-type):after{content:"\BB";margin:0 .7em 0 .45em}.page__header-time{margin-left:auto}@media (max-width:980px){.page__header-time{margin-left:0}}.page__header-button{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.page__header-button svg{margin:0 .3em 0 -.05em}.page__header-button:hover{background:#387ecc}.page__header-button{padding:5px 10px;font-size:13px;margin-left:10px}.page__title{font-size:26px;font-weight:700;letter-spacing:-.04px;margin-bottom:-.2em}.page .cdx-marker{background:rgba(245,235,111,.33);padding:3px 0}.page__content a{text-decoration:none;border-bottom:1px solid #000;padding-bottom:1px;color:inherit}.page__content a:hover{color:#388ae5;color:var(--color-link-active);border-bottom-color:#388ae5;border-bottom-color:var(--color-link-active)}.block-header{margin:1.5em 0 .5em}.block-header--2{font-size:22px;font-weight:500}.block-header--3{font-size:18px;font-weight:500}.block-code{padding:15px!important;border-radius:5px;font-size:13px;background:#fcfaff!important;border:1px solid #ededf0;font-family:Menlo,Monaco,Consolas,Courier New,monospace;line-height:1.7em}.block-list li{margin:10px 0}.block-image{margin:40px auto;text-align:center}.block-image__content img,.block-image__content video{vertical-align:bottom;max-width:100%}.block-image__content--stretched{max-width:none!important;width:calc(100% + 120px)!important;margin-left:-60px}.block-image__content--stretched img,.block-image__content--stretched video{width:100%}.block-image__content--bordered img,.block-image__content--bordered video{border:3px solid #e8e8eb;border:3px solid var(--color-line-gray);-webkit-box-sizing:border-box;box-sizing:border-box}.block-image__content--with-background{padding:15px;background:#e8e8eb;background:var(--color-line-gray)}.block-image__content--with-background img,.block-image__content--with-background video{max-width:60%;margin:0 auto}.block-image__caption{margin:1em auto;color:#7b7e89;color:var(--color-text-second)}.block-delimiter{line-height:1.6em;width:100%;text-align:center}.block-delimiter:before{display:inline-block;content:"***";font-size:30px;line-height:65px;height:30px;letter-spacing:.2em}.block-table{margin:20px 0;table-layout:fixed;width:100%;border-radius:3px;border-collapse:collapse}.block-table,.block-table td{border:1px solid #e8e8eb;border:1px solid var(--color-line-gray)}.block-table td{padding:8px 10px}.landing-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.landing-loader{position:absolute;left:50%;top:50%;z-index:-1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.landing-loader>svg{width:80px;height:80px}.landing-frame{width:100%;height:100%;opacity:0;-webkit-transition:opacity .5s ease;transition:opacity .5s ease;will-change:opacity}.auth-form{font-size:15px;text-align:center;margin-top:30vh}@media (max-width:980px){.auth-form h1{font-size:20px}}.auth-form p{margin:40px 0 20px}.auth-form input[type=password]{padding:9px;font-size:15px;outline:none;border-radius:3px;-webkit-appearance:none;border:1px solid #e8e8eb;border:1px solid var(--color-line-gray)}.auth-form input[type=submit]{display:inline-block;padding:9px 15px;border-radius:3px;color:#6c6375;background:#fcfcff;-webkit-box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);box-shadow:inset 0 0 0 1px rgba(184,189,206,.2);font-size:14px;line-height:1em;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-appearance:none;border:0;background:#388ae5;background:var(--color-link-active);color:#fff;-webkit-box-shadow:none;box-shadow:none}.auth-form input[type=submit] svg{margin:0 .3em 0 -.05em}.auth-form input[type=submit]:hover{background:#387ecc}.auth-form input[type=submit]{font-size:15px;padding:10px 20px;line-height:inherit;vertical-align:top}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Helvetica,Arial,Verdana;color:#1d202b;color:var(--color-text-main);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}svg{fill:currentColor} diff --git a/src/frontend/js/classes/editor.js b/src/frontend/js/classes/editor.js index cf0d30c..8d66609 100644 --- a/src/frontend/js/classes/editor.js +++ b/src/frontend/js/classes/editor.js @@ -1,18 +1,20 @@ import EditorJS from '@editorjs/editorjs'; /** - * Tools for the Editor + * Block Tools for the Editor */ import Header from '@editorjs/header'; -import Quote from '@editorjs/quote'; -import Marker from '@editorjs/marker'; -import CodeTool from '@editorjs/code'; -import Delimiter from '@editorjs/delimiter'; -import InlineCode from '@editorjs/inline-code'; -import List from '@editorjs/list'; import Image from '@editorjs/image'; -import RawTool from '@editorjs/raw'; -import Embed from '@editorjs/embed'; +import CodeTool from '@editorjs/code'; +import List from '@editorjs/list'; +import Delimiter from '@editorjs/delimiter'; +import Table from '@editorjs/table'; + +/** + * Inline Tools for the Editor + */ +import InlineCode from '@editorjs/inline-code'; +import Marker from '@editorjs/marker'; /** * Class for working with Editor.js @@ -30,37 +32,12 @@ export default class Editor { tools: { header: { class: Header, - inlineToolbar: ['link', 'marker'], + inlineToolbar: ['link', 'marker', 'inlineCode'], config: { placeholder: options.headerPlaceholder || '' } }, - quote: { - class: Quote, - inlineToolbar: true - }, - code: { - class: CodeTool, - shortcut: 'CMD+SHIFT+D' - }, - rawTool: { - class: RawTool, - shortcut: 'CMD+SHIFT+R' - }, - delimiter: Delimiter, - embed: Embed, - inlineCode: { - class: InlineCode, - shortcut: 'CMD+SHIFT+C' - }, - marker: { - class: Marker, - shortcut: 'CMD+SHIFT+M' - }, - list: { - class: List, - inlineToolbar: true - }, + image: { class: Image, inlineToolbar: true, @@ -78,6 +55,36 @@ export default class Editor { }) } } + }, + + code: { + class: CodeTool, + shortcut: 'CMD+SHIFT+D' + }, + + list: { + class: List, + inlineToolbar: true + }, + + delimiter: Delimiter, + + table: { + class: Table, + inlineToolbar: true + }, + + /** + * Inline Tools + */ + inlineCode: { + class: InlineCode, + shortcut: 'CMD+SHIFT+C' + }, + + marker: { + class: Marker, + shortcut: 'CMD+SHIFT+M' } }, data: { diff --git a/src/frontend/styles/components/page.pcss b/src/frontend/styles/components/page.pcss index 31108e5..c0554af 100644 --- a/src/frontend/styles/components/page.pcss +++ b/src/frontend/styles/components/page.pcss @@ -126,7 +126,7 @@ text-align: center; &__content { - img { + img, video { vertical-align: bottom; max-width: 100%; } @@ -136,13 +136,13 @@ width: calc(100% + 120px) !important; margin-left: -60px; - img { + img, video { width: 100%; } } &--bordered { - img { + img, video { border: 3px solid var(--color-line-gray); box-sizing: border-box; } @@ -152,7 +152,7 @@ padding: 15px; background: var(--color-line-gray); - img { + img, video { max-width: 60%; margin: 0 auto; } @@ -183,3 +183,21 @@ letter-spacing: 0.2em; } } + +/** + * Table + * ================== + */ +.block-table { + margin: 20px 0; + table-layout: fixed; + width: 100%; + border-radius: 3px; + border-collapse: collapse; + border: 1px solid var(--color-line-gray); + + td { + padding: 8px 10px; + border: 1px solid var(--color-line-gray); + } +} diff --git a/src/routes/auth.js b/src/routes/auth.js index 3738d3d..18bad87 100644 --- a/src/routes/auth.js +++ b/src/routes/auth.js @@ -1,7 +1,6 @@ require('dotenv').config(); const express = require('express'); -const bodyParser = require('body-parser'); const jwt = require('jsonwebtoken'); const router = express.Router(); const Users = require('../controllers/users'); @@ -9,7 +8,7 @@ const config = require('../../config/index'); const bcrypt = require('bcrypt'); const csrf = require('csurf'); const csrfProtection = csrf({ cookie: true }); -const parseForm = bodyParser.urlencoded({ extended: false }); +const parseForm = express.urlencoded({ extended: false }); /** * Authorization page diff --git a/src/views/components/aside.twig b/src/views/components/aside.twig index 173960f..b48a296 100644 --- a/src/views/components/aside.twig +++ b/src/views/components/aside.twig @@ -10,7 +10,7 @@ {% else %} href="/page/{{ firstLevelPage._id }}" {% endif %}> - {{ firstLevelPage.title }} + {{ firstLevelPage.title | striptags }} {% if firstLevelPage.children is not empty %}
    @@ -22,7 +22,7 @@ {% else %} href="/page/{{ child._id }}" {% endif %}> - {{ child.title }} + {{ child.title | striptags }} {% endfor %} diff --git a/src/views/components/header.twig b/src/views/components/header.twig index 6507977..90dc96d 100644 --- a/src/views/components/header.twig +++ b/src/views/components/header.twig @@ -1,6 +1,6 @@
      {% if isAuthorized == true %} @@ -19,7 +19,7 @@ {% else %} href="/page/{{ option._id }}" {% endif %}> - {{ option.title }} + {{ option.title | striptags }} {% endfor %} diff --git a/src/views/layout.twig b/src/views/layout.twig index e093c07..8c46440 100644 --- a/src/views/layout.twig +++ b/src/views/layout.twig @@ -1,11 +1,11 @@ - {{ config.title }} + {{ (page.title ?: config.title) | striptags }} - - + + diff --git a/src/views/pages/blocks/image.twig b/src/views/pages/blocks/image.twig index 6f023ac..a0feceb 100644 --- a/src/views/pages/blocks/image.twig +++ b/src/views/pages/blocks/image.twig @@ -14,7 +14,14 @@
      - {{caption ? caption : ''}} + {% if file.mime and file.mime == 'video/mp4' %} + + {% else %} + {{caption ? caption : ''}} + {% endif %} +
      {% if caption %}