diff --git a/customize.dist/main.css b/customize.dist/main.css index 5c8d6ae96..8e639db72 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -416,6 +416,7 @@ padding: 5px; box-sizing: border-box; font-size: 30px; + border-bottom: 1px solid #d9d9d9; } #cryptpadTopBar > span { vertical-align: middle; @@ -457,7 +458,7 @@ html.cp, .cp body { font-size: .875em; - background-color: #fff; + background-color: #fafafa; color: #555; font-family: Georgia,Cambria,serif; height: 100%; @@ -534,11 +535,14 @@ html.cp, } .cp a { cursor: pointer; - color: #3333ff; + color: #41b7d8; text-decoration: none; } .cp a:hover { - color: #0000cc; + color: #279ebf; +} +.cp a:visited { + color: #558; } .cp img { height: auto; @@ -565,7 +569,7 @@ html.cp, width: 100%; margin-left: auto; margin-right: auto; - background: #fff; + background: #fafafa; padding: 10px 0; position: relative; } @@ -663,14 +667,14 @@ html.cp, .cp .btn-default:hover { background-color: #d8d8d8; } -.cp .mainOverlay { +.cp #main .mainOverlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #000; - opacity: 0.3; + opacity: 0.35; } .cp #noscriptContainer { color: black; @@ -679,8 +683,6 @@ html.cp, left: 0; bottom: 0; right: 0; - background: url('/customize/bg3.jpg') no-repeat center center; - background-size: cover; } .cp #noscriptContainer #noscript { width: 1000px; @@ -711,6 +713,7 @@ html.cp, } .cp #main_other { padding: 0 15vw; + background-color: #fafafa; } .cp .category { margin-top: 5px; diff --git a/customize.dist/src/less/cryptpad.less b/customize.dist/src/less/cryptpad.less index 29b263b3c..35276580f 100644 --- a/customize.dist/src/less/cryptpad.less +++ b/customize.dist/src/less/cryptpad.less @@ -9,7 +9,7 @@ html.cp, .cp body { font-size: .875em; - background-color: @base; + background-color: @page-white; //@base; color: @fore; font-family: Georgia,Cambria,serif; @@ -90,11 +90,16 @@ h6 { a { cursor: pointer; - color: @cp-darkblue; + color: @cp-light-blue; + //#41b7d8; //@cp-darkblue; + text-decoration: none; &:hover { - color: @cp-accent2; + color: darken(@cp-light-blue, 10%); //@cp-accent2; + } + &:visited { + color: @cp-purple; } } @@ -124,7 +129,7 @@ body.html { width: 100%; margin-left: auto; margin-right: auto; - background: #fff; //@base; + background: @page-white; padding: 10px 0;//@main-border-width; position: relative; @@ -230,14 +235,16 @@ body.html { } } -.mainOverlay { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #000; - opacity: 0.3; +#main { + .mainOverlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #000; + opacity: 0.35; + } } #noscriptContainer { color: black; @@ -264,8 +271,6 @@ body.html { transform: translateY(-50%); } } - background: @main-bg; - background-size: cover; } #main { background: @main-bg; @@ -278,6 +283,7 @@ body.html { } #main_other { padding: 0 @main-border-width; + background-color: @page-white; } .category { diff --git a/customize.dist/src/less/topbar.less b/customize.dist/src/less/topbar.less index a5d4addc4..600031d00 100644 --- a/customize.dist/src/less/topbar.less +++ b/customize.dist/src/less/topbar.less @@ -13,6 +13,8 @@ box-sizing: border-box; font-size: 30px; + border-bottom: 1px solid darken(@topbar-back, 15%); + &> span { vertical-align: middle; display: inline-block; diff --git a/customize.dist/src/less/variables.less b/customize.dist/src/less/variables.less index ef83f944e..cb8e0b434 100644 --- a/customize.dist/src/less/variables.less +++ b/customize.dist/src/less/variables.less @@ -18,10 +18,12 @@ @cp-blue: #00CFC1; @cp-blue: #00ADEE; -@cp-light-blue: lighten(@cp-blue, 20%); +@cp-light-blue: #41b7d8; // lighten(@cp-blue, 20%); @cp-purple: #558; +@page-white: #fafafa; + // alertify things @box-shadow: 0 2px 5px 0 rgba(0,0,0,.2); diff --git a/www/slide/oldmain.js b/www/slide/oldmain.js deleted file mode 100644 index 9d16b2e59..000000000 --- a/www/slide/oldmain.js +++ /dev/null @@ -1,375 +0,0 @@ -require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify'} }); -define([ - '/api/config?cb=' + Math.random().toString(16).substring(2), - '/customize/messages.js?pad=slide', - '/bower_components/chainpad-netflux/chainpad-netflux.js', - '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/textpatcher/TextPatcher.amd.js', - '/common/cryptpad-common.js', - '/slide/slide.js', - '/common/notify.js', - '/common/visible.js', - '/common/clipboard.js', - 'json.sortify', - '/bower_components/file-saver/FileSaver.min.js', - '/bower_components/jquery/dist/jquery.min.js', - '/customize/pad.js' -], function (Config, Messages, Realtime, Crypto, TextPatcher, Cryptpad, Slide, Notify, Visible, Clipboard, JSONSortify) { - var $ = window.jQuery; - var saveAs = window.saveAs; - - /* - TODO - * patch in changes using DiffDOM - * predraw some things in case they use external assets - * strip out script tags? - * better CSS - * use codemirror instead of a text editor - * add ability to link to a rendered slide - * ui hint for escaping presentation mode - */ - - Cryptpad.styleAlerts(); - - var secret = Cryptpad.getSecrets(); - var readOnly = secret.keys && !secret.keys.editKeyStr; - Slide.readOnly = readOnly; - if (!secret.keys) { - secret.keys = secret.key; - } - - var APP = window.APP = { - TextPatcher: TextPatcher, - Slide: Slide, - }; - - var Stringify = APP.Stringify = JSONSortify; - - var initializing = true; - var $textarea = $('textarea'); - - var suggestName = function () { - var title = ''; - var patt = /^#\s+(.*)\s*$/; - $textarea.val().split("\n").some(function (line) { - if (!patt.test(line)) { return; } - line.replace(patt, function (a, b) { - title = b; - }); - return true; - }); - return title; - }; - - var unnotify = function () { - if (!(APP.tabNofification && - typeof(APP.tabNofification.cancel) === 'function')) { return; } - APP.tabNofification.cancel(); - }; - - var notify = function () { - if (!(Visible.isSupported() && !Visible.currently())) { return; } - unnotify(); - APP.tabNofification = Notify.tab(1000, 10); - }; - - var $modal = $('#modal'); - var $content = $('#content'); - Slide.setModal($modal, $content); - - var enterPresentationMode = function (shouldLog) { - Slide.show(true, $textarea.val()); - if (shouldLog) { - Cryptpad.log(Messages.presentSuccess); - } - }; - - if (readOnly) { - enterPresentationMode(false); - } - - var config = APP.config = { - initialState: '{}', - websocketURL: Config.websocketURL, - channel: secret.channel, - crypto: Crypto.createEncryptor(secret.keys), - validateKey: secret.keys.validateKey || undefined, - readOnly: readOnly, - }; - - var setEditable = function (bool) { - if (readOnly && bool) { return; } - $textarea.attr('disabled', !bool); - }; - var canonicalize = function (text) { return text.replace(/\r\n/g, '\n'); }; - - setEditable(false); - - var safelyParseContent = function (S, k, first) { - if (!first) { return JSON.parse(S); } - try { return JSON.parse(S); } - catch (err) { - console.log("Migrating text content to object form"); - var O = {}; - O[k] = S; - return O; - } - }; - - var getUserObj = function (rt) { - return safelyParseContent(rt.getUserDoc(), 'content'); - }; - - var onLocal = config.onLocal = function () { - if (initializing) { return; } - if (readOnly) { return; } - - var textContent = canonicalize($textarea.val()); - - var userObj = getUserObj(APP.realtime); - - userObj.content = textContent; - - var content = Stringify(userObj); - - APP.patchText(content); - Slide.update(textContent); - }; - - var Button = function (opt) { - return $('