From 6037b1558947236c292656a46ee50d481d4389ca Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Sun, 7 Jan 2018 16:22:04 +0000 Subject: [PATCH] Added landing page --- build/dev-server.js | 4 +- build/webpack.prod.conf.js | 2 +- build/webpack.style.conf.js | 1 - index.js | 4 +- server/index.js | 4 +- src/components/menus/MainMenu.vue | 4 +- src/components/modals/AboutModal.vue | 11 +- src/data/welcomeFile.md | 8 +- static/landing/discussion.png | Bin 0 -> 36410 bytes static/landing/favicon.ico | Bin 0 -> 33310 bytes static/landing/gfm.png | Bin 0 -> 16128 bytes static/landing/index.html | 397 +++++++++++++++++++++++++ static/landing/katex.gif | Bin 0 -> 5812 bytes static/landing/logo.svg | 1 + static/landing/mermaid.gif | Bin 0 -> 13545 bytes static/landing/navigation-bar.png | Bin 0 -> 4425 bytes static/landing/providers.png | Bin 0 -> 36047 bytes static/landing/scroll-sync.gif | Bin 0 -> 57425 bytes static/landing/smart-layout.png | Bin 0 -> 9013 bytes static/landing/syntax-highlighting.gif | Bin 0 -> 19260 bytes static/landing/workspace.png | Bin 0 -> 16056 bytes 21 files changed, 415 insertions(+), 21 deletions(-) create mode 100644 static/landing/discussion.png create mode 100644 static/landing/favicon.ico create mode 100644 static/landing/gfm.png create mode 100644 static/landing/index.html create mode 100644 static/landing/katex.gif create mode 100644 static/landing/logo.svg create mode 100644 static/landing/mermaid.gif create mode 100644 static/landing/navigation-bar.png create mode 100644 static/landing/providers.png create mode 100644 static/landing/scroll-sync.gif create mode 100644 static/landing/smart-layout.png create mode 100644 static/landing/syntax-highlighting.gif create mode 100644 static/landing/workspace.png diff --git a/build/dev-server.js b/build/dev-server.js index 907efb5d..a517b6cc 100644 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -1,9 +1,9 @@ require('./check-versions')() var config = require('../config') -Object.entries(config.dev.env).forEach(([key, value]) => { +Object.keys(config.dev.env).forEach((key) => { if (!process.env[key]) { - process.env[key] = JSON.parse(value); + process.env[key] = JSON.parse(config.dev.env[key]); } }); diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index f72e9df5..2e78e351 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -99,7 +99,7 @@ var webpackConfig = merge(baseWebpackConfig, { events: true }, excludes: ['**/.*', '**/*.map', '**/index.html', '**/static/oauth2/callback.html', '**/icons-*/*.png', '**/static/fonts/KaTeX_*'], - externals: ['/app', '/oauth2/callback'] + externals: ['/', '/app', '/oauth2/callback'] }) ] }) diff --git a/build/webpack.style.conf.js b/build/webpack.style.conf.js index 06745ea2..fbccd20b 100644 --- a/build/webpack.style.conf.js +++ b/build/webpack.style.conf.js @@ -5,7 +5,6 @@ var utils = require('./utils') var config = require('../config') var vueLoaderConfig = require('./vue-loader.conf') var StylelintPlugin = require('stylelint-webpack-plugin') -var FaviconsWebpackPlugin = require('favicons-webpack-plugin') var ExtractTextPlugin = require('extract-text-webpack-plugin') var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') diff --git a/index.js b/index.js index 4ff493f3..f549108e 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ const env = require('./config/prod.env'); -Object.entries(env).forEach(([key, value]) => { +Object.keys(env).forEach((key) => { if (!process.env[key]) { - process.env[key] = JSON.parse(value); + process.env[key] = JSON.parse(env[key]); } }); diff --git a/server/index.js b/server/index.js index 7e599f3f..6ea23175 100644 --- a/server/index.js +++ b/server/index.js @@ -44,6 +44,8 @@ module.exports = (app, serveV4) => { /* eslint-enable global-require, import/no-unresolved */ } + // Serve landing.html + app.get('/', (req, res) => res.sendFile(resolvePath('static/landing/index.html'))); // Serve callback.html app.get('/oauth2/callback', (req, res) => res.sendFile(resolvePath('static/oauth2/callback.html'))); // Google Drive action receiver @@ -53,8 +55,6 @@ module.exports = (app, serveV4) => { // Serve static resources if (process.env.NODE_ENV === 'production') { if (serveV4) { - // Serve landing.html in / - app.get('/', (req, res) => res.sendFile(resolvePath('stackedit_v4/views/landing.html'))); // Serve editor.html in /viewer app.get('/editor', (req, res) => res.sendFile(resolvePath('stackedit_v4/views/editor.html'))); // Serve viewer.html in /viewer diff --git a/src/components/menus/MainMenu.vue b/src/components/menus/MainMenu.vue index 6610900a..561b2212 100644 --- a/src/components/menus/MainMenu.vue +++ b/src/components/menus/MainMenu.vue @@ -36,12 +36,12 @@
Synchronize
- Open, save, collaborate in the Cloud. + Sync your files in the Cloud.
Publish
- Export your file to the web. + Export your files to the web.
diff --git a/src/components/modals/AboutModal.vue b/src/components/modals/AboutModal.vue index e81bea57..34046535 100644 --- a/src/components/modals/AboutModal.vue +++ b/src/components/modals/AboutModal.vue @@ -2,15 +2,18 @@