From 2609af2105f0f91f4dc7ab33338bb52a74b68c8c Mon Sep 17 00:00:00 2001 From: Yann Flory Date: Fri, 30 Sep 2016 17:39:16 +0200 Subject: [PATCH] Use the CodeMirror editor in the slide application --- bower.json | 4 +- customize.dist/messages.js | 15 + customize.dist/translations/messages.fr.js | 4 +- customize.dist/translations/messages.js | 3 +- www/common/cryptpad-common.js | 19 +- www/slide/index.html | 105 +-- www/slide/inner.html | 152 ++++ www/slide/main.js | 960 +++++++++++++------- www/slide/modes.js | 146 +++ www/slide/oldmain.js | 375 ++++++++ www/slide/slide.js | 3 +- www/slide/theme/3024-day.css | 41 + www/slide/theme/3024-night.css | 39 + www/slide/theme/abcdef.css | 32 + www/slide/theme/ambiance-mobile.css | 5 + www/slide/theme/ambiance.css | 74 ++ www/slide/theme/ansuz.css | 89 ++ www/slide/theme/base16-dark.css | 38 + www/slide/theme/base16-light.css | 38 + www/slide/theme/bespin.css | 34 + www/slide/theme/blackboard.css | 32 + www/slide/theme/cobalt.css | 25 + www/slide/theme/colorforth.css | 33 + www/slide/theme/default.css | 0 www/slide/theme/dracula.css | 41 + www/slide/theme/eclipse.css | 23 + www/slide/theme/elegant.css | 13 + www/slide/theme/erlang-dark.css | 34 + www/slide/theme/hopscotch.css | 34 + www/slide/theme/icecoder.css | 43 + www/slide/theme/isotope.css | 34 + www/slide/theme/lesser-dark.css | 47 + www/slide/theme/liquibyte.css | 95 ++ www/slide/theme/material.css | 53 ++ www/slide/theme/mbo.css | 37 + www/slide/theme/mdn-like.css | 46 + www/slide/theme/midnight.css | 45 + www/slide/theme/monokai.css | 36 + www/slide/theme/neat.css | 12 + www/slide/theme/neo.css | 43 + www/slide/theme/night.css | 27 + www/slide/theme/paraiso-dark.css | 38 + www/slide/theme/paraiso-light.css | 38 + www/slide/theme/pastel-on-dark.css | 53 ++ www/slide/theme/railscasts.css | 34 + www/slide/theme/rubyblue.css | 25 + www/slide/theme/seti.css | 44 + www/slide/theme/solarized.css | 169 ++++ www/slide/theme/src/ansuz.less | 67 ++ www/slide/theme/src/template.less | 67 ++ www/slide/theme/the-matrix.css | 30 + www/slide/theme/tomorrow-night-bright.css | 35 + www/slide/theme/tomorrow-night-eighties.css | 38 + www/slide/theme/ttcn.css | 64 ++ www/slide/theme/twilight.css | 32 + www/slide/theme/vibrant-ink.css | 34 + www/slide/theme/xq-dark.css | 53 ++ www/slide/theme/xq-light.css | 43 + www/slide/theme/yeti.css | 44 + www/slide/theme/zenburn.css | 37 + www/slide/themes.js | 57 ++ 61 files changed, 3529 insertions(+), 402 deletions(-) create mode 100644 www/slide/inner.html create mode 100644 www/slide/modes.js create mode 100644 www/slide/oldmain.js create mode 100644 www/slide/theme/3024-day.css create mode 100644 www/slide/theme/3024-night.css create mode 100644 www/slide/theme/abcdef.css create mode 100644 www/slide/theme/ambiance-mobile.css create mode 100644 www/slide/theme/ambiance.css create mode 100644 www/slide/theme/ansuz.css create mode 100644 www/slide/theme/base16-dark.css create mode 100644 www/slide/theme/base16-light.css create mode 100644 www/slide/theme/bespin.css create mode 100644 www/slide/theme/blackboard.css create mode 100644 www/slide/theme/cobalt.css create mode 100644 www/slide/theme/colorforth.css create mode 100644 www/slide/theme/default.css create mode 100644 www/slide/theme/dracula.css create mode 100644 www/slide/theme/eclipse.css create mode 100644 www/slide/theme/elegant.css create mode 100644 www/slide/theme/erlang-dark.css create mode 100644 www/slide/theme/hopscotch.css create mode 100644 www/slide/theme/icecoder.css create mode 100644 www/slide/theme/isotope.css create mode 100644 www/slide/theme/lesser-dark.css create mode 100644 www/slide/theme/liquibyte.css create mode 100644 www/slide/theme/material.css create mode 100644 www/slide/theme/mbo.css create mode 100644 www/slide/theme/mdn-like.css create mode 100644 www/slide/theme/midnight.css create mode 100644 www/slide/theme/monokai.css create mode 100644 www/slide/theme/neat.css create mode 100644 www/slide/theme/neo.css create mode 100644 www/slide/theme/night.css create mode 100644 www/slide/theme/paraiso-dark.css create mode 100644 www/slide/theme/paraiso-light.css create mode 100644 www/slide/theme/pastel-on-dark.css create mode 100644 www/slide/theme/railscasts.css create mode 100644 www/slide/theme/rubyblue.css create mode 100644 www/slide/theme/seti.css create mode 100644 www/slide/theme/solarized.css create mode 100644 www/slide/theme/src/ansuz.less create mode 100644 www/slide/theme/src/template.less create mode 100644 www/slide/theme/the-matrix.css create mode 100644 www/slide/theme/tomorrow-night-bright.css create mode 100644 www/slide/theme/tomorrow-night-eighties.css create mode 100644 www/slide/theme/ttcn.css create mode 100644 www/slide/theme/twilight.css create mode 100644 www/slide/theme/vibrant-ink.css create mode 100644 www/slide/theme/xq-dark.css create mode 100644 www/slide/theme/xq-light.css create mode 100644 www/slide/theme/yeti.css create mode 100644 www/slide/theme/zenburn.css create mode 100644 www/slide/themes.js diff --git a/bower.json b/bower.json index c26a379ef..c7100f505 100644 --- a/bower.json +++ b/bower.json @@ -20,6 +20,7 @@ "dependencies": { "jquery": "~2.1.3", "tweetnacl": "~0.12.2", + "components-font-awesome": "^4.6.3", "ckeditor": "~4.5.6", "codemirror": "^5.19.0", "requirejs": "~2.1.15", @@ -40,7 +41,6 @@ "diff-dom": "#gh-pages", "alertifyjs": "^1.0.11", "spin.js": "^2.3.2", - "scrypt-async": "^1.2.0", - "components-font-awesome": "^4.6.3" + "scrypt-async": "^1.2.0" } } diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 1b21b9835..10ee247fa 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -69,5 +69,20 @@ define(['/customize/languageSelector.js', '*/' ].join(''); + messages.slideInitialState = [ + '# CryptSlide\n', + '* This is a zero knowledge realtime collaborative editor.\n', + '* What you type here is encrypted so only people who have the link can access it.\n', + '* Even the server cannot see what you type.\n', + '* What you see here, what you hear here, when you leave here, let it stay here.\n', + '\n', + '---', + '\n', + '# How to use\n', + '1. Write your slides content using the markdown syntax\n', + '2. Separate your slides with ---\n', + '3. Click on the "Play" button to see the result' + ].join(''); + return messages; }); diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 0dbc1eb53..838f5edf3 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -47,8 +47,8 @@ define(function () { out.back = '⇐ Retour'; out.backToCryptpad = '⇐ Retour vers Cryptpad'; - out.changeNameButton = 'Changer de nom'; - out.changeNamePrompt = 'Changer votre nom : '; + out.userButton = 'UTILISATEUR'; + out.userButtonTitle = "Changer votre nom d'utilisateur"; out.renameButton = 'RENOMMER'; out.renameButtonTitle = 'Changer le titre utilisé par ce document dans la page d\'accueil de Cryptpad'; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 2d4e6ba09..054c08f63 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -47,7 +47,8 @@ define(function () { out.back = '⇐ Back'; out.backToCryptpad = '⇐ Back to Cryptpad'; - out.changeNameButton = 'Change name'; + out.userButton = 'USER'; + out.userButtonTitle = 'Change your username'; out.changeNamePrompt = 'Change your name: '; out.renameButton = 'RENAME'; diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index be31e9f5e..127f016a0 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -616,14 +616,14 @@ define([ switch (type) { case 'export': button = $('