From 044c24c95015e91be8a45e5fe2f40a3c4b2b8168 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Fri, 15 Feb 2019 17:56:56 +0300 Subject: [PATCH] Landing + mobile adoptation (#38) * Landing + mobile adoptation * replace svg * small updates * use landing as iframe * Delete .codexdocsrc * remove unused * updates * Delete _index.twig * update header shrink in chrome * Delete .codexdocsrc * remove focus --- .codexdocsrc => .codexdocsrc.sample | 5 +- .gitignore | 1 + package.json | 9 +- public/dist/code-styling.bundle.js | 2 +- public/dist/editor.bundle.js | 63 +- public/dist/main.bundle.js | 4 +- public/dist/main.css | 2 +- src/frontend/js/app.js | 4 +- src/frontend/js/classes/editor.js | 70 +- src/frontend/js/modules/writing.js | 10 +- src/frontend/styles/components/aside.pcss | 37 + src/frontend/styles/components/header.pcss | 33 + src/frontend/styles/components/landing.pcss | 30 + src/frontend/styles/components/page.pcss | 12 + src/frontend/styles/layout.pcss | 21 + src/frontend/styles/main.pcss | 1 + src/frontend/styles/vars.pcss | 14 + src/frontend/svg/loader.svg | 60 ++ src/frontend/svg/menu.svg | 1 + src/models/alias.js | 12 +- src/models/page.js | 16 +- src/models/pageOrder.js | 8 +- src/routes/home.js | 4 +- src/utils/rcparser.js | 13 +- src/views/components/aside.twig | 3 + src/views/components/header.twig | 2 +- src/views/index.twig | 6 - src/views/layout.twig | 2 +- src/views/pages/index.twig | 16 + yarn.lock | 1036 +------------------ 30 files changed, 429 insertions(+), 1068 deletions(-) rename .codexdocsrc => .codexdocsrc.sample (55%) create mode 100644 src/frontend/styles/components/landing.pcss create mode 100644 src/frontend/svg/loader.svg create mode 100644 src/frontend/svg/menu.svg delete mode 100644 src/views/index.twig create mode 100644 src/views/pages/index.twig diff --git a/.codexdocsrc b/.codexdocsrc.sample similarity index 55% rename from .codexdocsrc rename to .codexdocsrc.sample index f42c13c..f6c51c2 100644 --- a/.codexdocsrc +++ b/.codexdocsrc.sample @@ -1,9 +1,10 @@ { - "title": "CodeX Editor   🤩🧦🤨", + "title": "CodeX Docs", "menu": [ "Guides", "API", "Plugins", {"title": "Support Project", "uri": "/support"} - ] + ], + "landingFrameSrc": "https://codex.so/editor?frame=1" } diff --git a/.gitignore b/.gitignore index 1a1c337..a869672 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ typings/ # Cache of babel and others .cache/ .eslintcache +.DS_Store diff --git a/package.json b/package.json index 5c83380..8ea80c0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,12 @@ "@babel/polyfill": "^7.0.0", "body-parser": "latest", "codex.editor": "^2.1.3", + "codex.editor.delimiter": "^1.0.2", + "codex.editor.embed": "^2.1.2", "codex.editor.header": "^2.0.5", + "codex.editor.image": "^2.0.3", + "codex.editor.quote": "^2.1.5", + "codex.editor.raw": "^2.0.2", "cookie-parser": "~1.4.3", "debug": "~4.1.0", "eslint-plugin-standard": "^4.0.0", @@ -40,8 +45,8 @@ "chai": "^4.1.2", "chai-http": "^4.0.0", "codex.editor.code": "^2.0.0", - "codex.editor.inline-code": "^1.0.1", - "codex.editor.list": "^1.0.2", + "codex.editor.inline-code": "^1.2.0", + "codex.editor.list": "^1.2.3", "codex.editor.marker": "^1.0.1", "cross-env": "^5.2.0", "css-loader": "^1.0.0", diff --git a/public/dist/code-styling.bundle.js b/public/dist/code-styling.bundle.js index 163b831..19af361 100644 --- a/public/dist/code-styling.bundle.js +++ b/public/dist/code-styling.bundle.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(59).concat([function(e,n,t){var r=t(64),a=t(19);e.exports=function(e){return r(a(e))}},function(e,n,t){var r=t(32)("keys"),a=t(21);e.exports=function(e){return r[e]||(r[e]=a(e))}},function(e,n,t){var r=t(19);e.exports=function(e){return Object(r(e))}},function(e,n,t){"use strict";var r=t(22),a=t(10),i=t(12),o=t(9),s=t(16),c=t(73),u=t(31),l=t(79),f=t(1)("iterator"),g=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,n,t,p,v,E,h){c(t,n,p);var b,m,y,_=function(e){if(!g&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new t(this,e)}}return function(){return new t(this,e)}},R=n+" Iterator",w="values"==v,N=!1,O=e.prototype,M=O[f]||O["@@iterator"]||v&&O[v],S=M||_(v),x=v?w?_("entries"):S:void 0,A="Array"==n&&O.entries||M;if(A&&(y=l(A.call(new e)))!==Object.prototype&&y.next&&(u(y,R,!0),r||"function"==typeof y[f]||o(y,f,d)),w&&M&&"values"!==M.name&&(N=!0,S=function(){return M.call(this)}),r&&!h||!g&&!N&&O[f]||o(O,f,S),s[n]=S,s[R]=d,v)if(b={values:w?S:_("values"),keys:E?S:_("keys"),entries:x},h)for(m in b)m in O||i(O,m,b[m]);else a(a.P+a.F*(g||N),n,b);return b}},function(e,n,t){var r=t(76),a=t(65);e.exports=Object.keys||function(e){return r(e,a)}},function(e,n,t){var r=t(13);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},,,,,,,function(e,n,t){"use strict";var r=t(38)(!0);t(62)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,n=this._t,t=this._i;return t>=n.length?{value:void 0,done:!0}:(e=r(n,t),this._i+=e.length,{value:e,done:!1})})},function(e,n,t){"use strict";var r=t(74),a=t(30),i=t(31),o={};t(9)(o,t(1)("iterator"),function(){return this}),e.exports=function(e,n,t){e.prototype=r(o,{next:a(1,t)}),i(e,n+" Iterator")}},function(e,n,t){var r=t(2),a=t(75),i=t(65),o=t(60)("IE_PROTO"),s=function(){},c=function(){var e,n=t(20)("iframe"),r=i.length;for(n.style.display="none",t(36).appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("