From 13288ee18bc080d65ff0557918bdd135c628a096 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Jun 2017 15:52:25 +0200 Subject: [PATCH] Update the userlist in code, slide and pad --- customize.dist/main.css | 8 - customize.dist/src/less/dropdown.less | 6 - customize.dist/src/less/toolbar.less | 190 +++++++---- customize.dist/toolbar.css | 465 +++++++++++++++++--------- www/code/code.css | 2 +- www/code/code.less | 3 +- www/code/main.js | 4 +- www/common/cryptpad-common.js | 1 - www/common/toolbar2.js | 80 +++-- www/pad/inner.html | 2 +- www/pad/main.js | 6 +- www/slide/main.js | 4 +- 12 files changed, 498 insertions(+), 273 deletions(-) diff --git a/customize.dist/main.css b/customize.dist/main.css index b02ff7b9c..0f10044a2 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -467,14 +467,6 @@ white-space: normal; text-align: left; } -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users { - text-align: baseline; -} -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .yourself, -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .anonymous, -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .viewer { - font-style: italic; -} .dropdown-bar .dropdown-bar-content p h2 { font-weight: bold; text-align: center; diff --git a/customize.dist/src/less/dropdown.less b/customize.dist/src/less/dropdown.less index 9ea8a3226..46c01e697 100644 --- a/customize.dist/src/less/dropdown.less +++ b/customize.dist/src/less/dropdown.less @@ -77,12 +77,6 @@ margin: 0; white-space: normal; text-align: left; - &.cryptpad-dropdown-users { - text-align:baseline; - .yourself, .anonymous, .viewer { - font-style: italic; - } - } h2 { font-weight: bold; text-align: center; diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 8626066e0..534341f99 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -24,33 +24,95 @@ .cke_reset_all * { color: inherit; } -.cryptpad-toolbar { - @toolbar-green: #5cb85c; +#cke_1_contents { + margin-top: -1px; + display: flex; +} + +.userlist-drawer { + font: normal normal normal 14px Arial,Helvetica,Tahoma,Verdana,Sans-Serif; + width: 175px; + display: block; + overflow-y: auto; + overflow-x: hidden; + padding: 10px; box-sizing: border-box; - padding: 0px; + h2 { + font-size: 1.2em; + font-weight: bold; + text-align: center; + padding: 5px 0px; + margin: 5px 0px; + font-size: 16px; + white-space: normal; + } + text-align:baseline; + .viewer { + font-style: italic; + padding: 5px; + background: rgba(0,0,0,0.1); + margin: 2px 0; + } - //background-color: #BBBBFF; - background-color: @toolbar-default-bg; - color: @toolbar-default-color; + .userlist-others { + display: flex; + flex-flow: column; + margin: 10px 0; + margin-bottom: 20px; + &>span { + overflow: hidden; + text-overflow: ellipsis; + padding: 5px; + background: rgba(0,0,0,0.1); + margin: 2px 0; + } + } +} +body { .addToolbarColors (@color, @bg-color) { - background-color: @bgcolor; - color: @color; - .cryptpad-toolbar-leftside, .cryptpad-toolbar-rightside, .drawer-content { - background-color: lighten(@bgcolor, 8%); - button:hover { - background-color: @bgcolor; + .userlist-drawer { + background-color: @bgcolor; + color: @color; + h2 { + background-color: darken(@bgcolor, 10%); } } - .hoverable:hover { - .editable { - cursor: text; - border: 1px solid lighten(@bgcolor, 15%); - background: darken(@bgcolor, 10%); - color: @color; + .cryptpad-toolbar { + background-color: @bgcolor; + color: @color; + .userlist-drawer { + background-color: @bgcolor; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; + } + .cryptpad-toolbar-leftside, .cryptpad-toolbar-rightside, .drawer-content { + background-color: lighten(@bgcolor, 8%); + button:hover { + background-color: @bgcolor; + } + } + .hoverable:hover { + .editable { + cursor: text; + border: 1px solid lighten(@bgcolor, 15%); + background: darken(@bgcolor, 10%); + color: @color; + } + .pencilIcon { + border: 1px solid lighten(@bgcolor, 15%); + background: darken(@bgcolor, 10%); + color: @color; + &:hover { + background: darken(@bgcolor, 5%); + } + } } - .pencilIcon { + .saveIcon { border: 1px solid lighten(@bgcolor, 15%); background: darken(@bgcolor, 10%); color: @color; @@ -58,85 +120,91 @@ background: darken(@bgcolor, 5%); } } - } - .saveIcon { - border: 1px solid lighten(@bgcolor, 15%); - background: darken(@bgcolor, 10%); - color: @color; - &:hover { - background: darken(@bgcolor, 5%); + input { + border: 1px solid lighten(@bgcolor, 15%); + background: darken(@bgcolor, 10%); + color: @color; } - } - input { - border: 1px solid lighten(@bgcolor, 15%); - background: darken(@bgcolor, 10%); - color: @color; - } - .dropdown-bar-content { - background: darken(@bgcolor, 5%); - border: 1px solid @color; - color: @color; - a { + .dropdown-bar-content { + background: darken(@bgcolor, 5%); + border: 1px solid @color; color: @color; - &.active { - background-color: darken(@bgcolor, 10%); - color: @color; - } - &:hover { - background-color: @bgcolor; + a { color: @color; + &.active { + background-color: darken(@bgcolor, 10%); + color: @color; + } + &:hover { + background-color: @bgcolor; + color: @color; + } } - } - hr { - background-color: darken(@bgcolor, 15%); - } - p { - h2 { - background-color: darken(@bgcolor, 10%); + hr { + background-color: darken(@bgcolor, 15%); } - .accountData { - background-color: @bgcolor; + p { + h2 { + background-color: darken(@bgcolor, 10%); + } + .accountData { + background-color: @bgcolor; + } } } } } - &.pad { + &.app-pad { @bgcolor: @toolbar-pad-bg; @color: @toolbar-pad-color; .addToolbarColors(@color, @bgcolor); } - &.code { + &.app-code { @bgcolor: @toolbar-code-bg; @color: @toolbar-code-color; .addToolbarColors(@color, @bgcolor); } - &.slide { + &.app-slide { @bgcolor: @toolbar-slide-bg; @color: @toolbar-slide-color; .addToolbarColors(@color, @bgcolor); } - &.poll { + &.app-poll { @bgcolor: @toolbar-poll-bg; @color: @toolbar-poll-color; .addToolbarColors(@color, @bgcolor); } - &.whiteboard { + &.app-whiteboard { @bgcolor: @toolbar-whiteboard-bg; @color: @toolbar-whiteboard-color; .addToolbarColors(@color, @bgcolor); } - &.drive { + &.app-drive { @bgcolor: @toolbar-drive-bg; @color: @toolbar-drive-color; .addToolbarColors(@color, @bgcolor); } - &.file { + &.app-file { @bgcolor: @toolbar-file-bg; @color: @toolbar-file-color; .addToolbarColors(@color, @bgcolor); } +} + +.cryptpad-toolbar { + @toolbar-green: #5cb85c; + + box-sizing: border-box; + padding: 0px; + + //background-color: #BBBBFF; + background-color: @toolbar-default-bg; + color: @toolbar-default-color; + + + .fa { font: normal normal normal 14px/1 FontAwesome; font-family: FontAwesome; @@ -664,7 +732,9 @@ } } button { - margin: 2px 4px 2px 0px; + margin: 0px; + border-radius: 0; + height: 100%; } .dropdown-bar-content { margin-top: -1px; diff --git a/customize.dist/toolbar.css b/customize.dist/toolbar.css index 70bcff7a2..b50c7c0a3 100644 --- a/customize.dist/toolbar.css +++ b/customize.dist/toolbar.css @@ -59,14 +59,6 @@ white-space: normal; text-align: left; } -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users { - text-align: baseline; -} -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .yourself, -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .anonymous, -.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .viewer { - font-style: italic; -} .dropdown-bar .dropdown-bar-content p h2 { font-weight: bold; text-align: center; @@ -101,483 +93,630 @@ .cke_reset_all * { color: inherit; } -.cryptpad-toolbar { +#cke_1_contents { + margin-top: -1px; + display: flex; +} +.userlist-drawer { + font: normal normal normal 14px Arial, Helvetica, Tahoma, Verdana, Sans-Serif; + width: 175px; + display: block; + overflow-y: auto; + overflow-x: hidden; + padding: 10px; box-sizing: border-box; - padding: 0px; - background-color: #ddd; - color: #000; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif; - width: 100%; - z-index: 9001; + text-align: baseline; +} +.userlist-drawer h2 { + font-size: 1.2em; + font-weight: bold; + text-align: center; + padding: 5px 0px; + margin: 5px 0px; + font-size: 16px; + white-space: normal; } -.cryptpad-toolbar.pad { +.userlist-drawer .viewer { + font-style: italic; + padding: 5px; + background: rgba(0, 0, 0, 0.1); + margin: 2px 0; +} +.userlist-drawer .userlist-others { + display: flex; + flex-flow: column; + margin: 10px 0; + margin-bottom: 20px; +} +.userlist-drawer .userlist-others > span { + overflow: hidden; + text-overflow: ellipsis; + padding: 5px; + background: rgba(0, 0, 0, 0.1); + margin: 2px 0; +} +body.app-pad .userlist-drawer { + background-color: #1c4fa0; + color: #fff; +} +body.app-pad .userlist-drawer h2 { + background-color: #143a75; +} +body.app-pad .cryptpad-toolbar { background-color: #1c4fa0; color: #fff; } -.cryptpad-toolbar.pad .cryptpad-toolbar-leftside, -.cryptpad-toolbar.pad .cryptpad-toolbar-rightside, -.cryptpad-toolbar.pad .drawer-content { +body.app-pad .cryptpad-toolbar .userlist-drawer { + background-color: #1c4fa0; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-pad .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-pad .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-pad .cryptpad-toolbar .drawer-content { background-color: #2260c3; } -.cryptpad-toolbar.pad .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.pad .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.pad .drawer-content button:hover { +body.app-pad .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-pad .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-pad .cryptpad-toolbar .drawer-content button:hover { background-color: #1c4fa0; } -.cryptpad-toolbar.pad .hoverable:hover .editable { +body.app-pad .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #2e71da; background: #143a75; color: #fff; } -.cryptpad-toolbar.pad .hoverable:hover .pencilIcon { +body.app-pad .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #2e71da; background: #143a75; color: #fff; } -.cryptpad-toolbar.pad .hoverable:hover .pencilIcon:hover { +body.app-pad .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #18448a; } -.cryptpad-toolbar.pad .saveIcon { +body.app-pad .cryptpad-toolbar .saveIcon { border: 1px solid #2e71da; background: #143a75; color: #fff; } -.cryptpad-toolbar.pad .saveIcon:hover { +body.app-pad .cryptpad-toolbar .saveIcon:hover { background: #18448a; } -.cryptpad-toolbar.pad input { +body.app-pad .cryptpad-toolbar input { border: 1px solid #2e71da; background: #143a75; color: #fff; } -.cryptpad-toolbar.pad .dropdown-bar-content { +body.app-pad .cryptpad-toolbar .dropdown-bar-content { background: #18448a; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.pad .dropdown-bar-content a { +body.app-pad .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.pad .dropdown-bar-content a.active { +body.app-pad .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #143a75; color: #fff; } -.cryptpad-toolbar.pad .dropdown-bar-content a:hover { +body.app-pad .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #1c4fa0; color: #fff; } -.cryptpad-toolbar.pad .dropdown-bar-content hr { +body.app-pad .cryptpad-toolbar .dropdown-bar-content hr { background-color: #112f5f; } -.cryptpad-toolbar.pad .dropdown-bar-content p h2 { +body.app-pad .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #143a75; } -.cryptpad-toolbar.pad .dropdown-bar-content p .accountData { +body.app-pad .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #1c4fa0; } -.cryptpad-toolbar.code { +body.app-code .userlist-drawer { background-color: #ffae00; color: #000; } -.cryptpad-toolbar.code .cryptpad-toolbar-leftside, -.cryptpad-toolbar.code .cryptpad-toolbar-rightside, -.cryptpad-toolbar.code .drawer-content { +body.app-code .userlist-drawer h2 { + background-color: #cc8b00; +} +body.app-code .cryptpad-toolbar { + background-color: #ffae00; + color: #000; +} +body.app-code .cryptpad-toolbar .userlist-drawer { + background-color: #ffae00; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-code .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-code .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-code .cryptpad-toolbar .drawer-content { background-color: #ffbb29; } -.cryptpad-toolbar.code .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.code .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.code .drawer-content button:hover { +body.app-code .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-code .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-code .cryptpad-toolbar .drawer-content button:hover { background-color: #ffae00; } -.cryptpad-toolbar.code .hoverable:hover .editable { +body.app-code .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #ffc64d; background: #cc8b00; color: #000; } -.cryptpad-toolbar.code .hoverable:hover .pencilIcon { +body.app-code .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #ffc64d; background: #cc8b00; color: #000; } -.cryptpad-toolbar.code .hoverable:hover .pencilIcon:hover { +body.app-code .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #e69d00; } -.cryptpad-toolbar.code .saveIcon { +body.app-code .cryptpad-toolbar .saveIcon { border: 1px solid #ffc64d; background: #cc8b00; color: #000; } -.cryptpad-toolbar.code .saveIcon:hover { +body.app-code .cryptpad-toolbar .saveIcon:hover { background: #e69d00; } -.cryptpad-toolbar.code input { +body.app-code .cryptpad-toolbar input { border: 1px solid #ffc64d; background: #cc8b00; color: #000; } -.cryptpad-toolbar.code .dropdown-bar-content { +body.app-code .cryptpad-toolbar .dropdown-bar-content { background: #e69d00; border: 1px solid #000; color: #000; } -.cryptpad-toolbar.code .dropdown-bar-content a { +body.app-code .cryptpad-toolbar .dropdown-bar-content a { color: #000; } -.cryptpad-toolbar.code .dropdown-bar-content a.active { +body.app-code .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #cc8b00; color: #000; } -.cryptpad-toolbar.code .dropdown-bar-content a:hover { +body.app-code .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #ffae00; color: #000; } -.cryptpad-toolbar.code .dropdown-bar-content hr { +body.app-code .cryptpad-toolbar .dropdown-bar-content hr { background-color: #b37a00; } -.cryptpad-toolbar.code .dropdown-bar-content p h2 { +body.app-code .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #cc8b00; } -.cryptpad-toolbar.code .dropdown-bar-content p .accountData { +body.app-code .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #ffae00; } -.cryptpad-toolbar.slide { +body.app-slide .userlist-drawer { + background-color: #e57614; + color: #fff; +} +body.app-slide .userlist-drawer h2 { + background-color: #b65e10; +} +body.app-slide .cryptpad-toolbar { background-color: #e57614; color: #fff; } -.cryptpad-toolbar.slide .cryptpad-toolbar-leftside, -.cryptpad-toolbar.slide .cryptpad-toolbar-rightside, -.cryptpad-toolbar.slide .drawer-content { +body.app-slide .cryptpad-toolbar .userlist-drawer { + background-color: #e57614; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-slide .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-slide .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-slide .cryptpad-toolbar .drawer-content { background-color: #ed8b34; } -.cryptpad-toolbar.slide .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.slide .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.slide .drawer-content button:hover { +body.app-slide .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-slide .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-slide .cryptpad-toolbar .drawer-content button:hover { background-color: #e57614; } -.cryptpad-toolbar.slide .hoverable:hover .editable { +body.app-slide .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #f09e55; background: #b65e10; color: #fff; } -.cryptpad-toolbar.slide .hoverable:hover .pencilIcon { +body.app-slide .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #f09e55; background: #b65e10; color: #fff; } -.cryptpad-toolbar.slide .hoverable:hover .pencilIcon:hover { +body.app-slide .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #ce6a12; } -.cryptpad-toolbar.slide .saveIcon { +body.app-slide .cryptpad-toolbar .saveIcon { border: 1px solid #f09e55; background: #b65e10; color: #fff; } -.cryptpad-toolbar.slide .saveIcon:hover { +body.app-slide .cryptpad-toolbar .saveIcon:hover { background: #ce6a12; } -.cryptpad-toolbar.slide input { +body.app-slide .cryptpad-toolbar input { border: 1px solid #f09e55; background: #b65e10; color: #fff; } -.cryptpad-toolbar.slide .dropdown-bar-content { +body.app-slide .cryptpad-toolbar .dropdown-bar-content { background: #ce6a12; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.slide .dropdown-bar-content a { +body.app-slide .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.slide .dropdown-bar-content a.active { +body.app-slide .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #b65e10; color: #fff; } -.cryptpad-toolbar.slide .dropdown-bar-content a:hover { +body.app-slide .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #e57614; color: #fff; } -.cryptpad-toolbar.slide .dropdown-bar-content hr { +body.app-slide .cryptpad-toolbar .dropdown-bar-content hr { background-color: #9f520e; } -.cryptpad-toolbar.slide .dropdown-bar-content p h2 { +body.app-slide .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #b65e10; } -.cryptpad-toolbar.slide .dropdown-bar-content p .accountData { +body.app-slide .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #e57614; } -.cryptpad-toolbar.poll { +body.app-poll .userlist-drawer { + background-color: #006304; + color: #fff; +} +body.app-poll .userlist-drawer h2 { + background-color: #003002; +} +body.app-poll .cryptpad-toolbar { background-color: #006304; color: #fff; } -.cryptpad-toolbar.poll .cryptpad-toolbar-leftside, -.cryptpad-toolbar.poll .cryptpad-toolbar-rightside, -.cryptpad-toolbar.poll .drawer-content { +body.app-poll .cryptpad-toolbar .userlist-drawer { + background-color: #006304; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-poll .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-poll .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-poll .cryptpad-toolbar .drawer-content { background-color: #008c06; } -.cryptpad-toolbar.poll .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.poll .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.poll .drawer-content button:hover { +body.app-poll .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-poll .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-poll .cryptpad-toolbar .drawer-content button:hover { background-color: #006304; } -.cryptpad-toolbar.poll .hoverable:hover .editable { +body.app-poll .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #00b007; background: #003002; color: #fff; } -.cryptpad-toolbar.poll .hoverable:hover .pencilIcon { +body.app-poll .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #00b007; background: #003002; color: #fff; } -.cryptpad-toolbar.poll .hoverable:hover .pencilIcon:hover { +body.app-poll .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #004a03; } -.cryptpad-toolbar.poll .saveIcon { +body.app-poll .cryptpad-toolbar .saveIcon { border: 1px solid #00b007; background: #003002; color: #fff; } -.cryptpad-toolbar.poll .saveIcon:hover { +body.app-poll .cryptpad-toolbar .saveIcon:hover { background: #004a03; } -.cryptpad-toolbar.poll input { +body.app-poll .cryptpad-toolbar input { border: 1px solid #00b007; background: #003002; color: #fff; } -.cryptpad-toolbar.poll .dropdown-bar-content { +body.app-poll .cryptpad-toolbar .dropdown-bar-content { background: #004a03; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.poll .dropdown-bar-content a { +body.app-poll .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.poll .dropdown-bar-content a.active { +body.app-poll .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #003002; color: #fff; } -.cryptpad-toolbar.poll .dropdown-bar-content a:hover { +body.app-poll .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #006304; color: #fff; } -.cryptpad-toolbar.poll .dropdown-bar-content hr { +body.app-poll .cryptpad-toolbar .dropdown-bar-content hr { background-color: #001701; } -.cryptpad-toolbar.poll .dropdown-bar-content p h2 { +body.app-poll .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #003002; } -.cryptpad-toolbar.poll .dropdown-bar-content p .accountData { +body.app-poll .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #006304; } -.cryptpad-toolbar.whiteboard { +body.app-whiteboard .userlist-drawer { + background-color: #800080; + color: #fff; +} +body.app-whiteboard .userlist-drawer h2 { + background-color: #4d004d; +} +body.app-whiteboard .cryptpad-toolbar { background-color: #800080; color: #fff; } -.cryptpad-toolbar.whiteboard .cryptpad-toolbar-leftside, -.cryptpad-toolbar.whiteboard .cryptpad-toolbar-rightside, -.cryptpad-toolbar.whiteboard .drawer-content { +body.app-whiteboard .cryptpad-toolbar .userlist-drawer { + background-color: #800080; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-whiteboard .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-whiteboard .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-whiteboard .cryptpad-toolbar .drawer-content { background-color: #a900a9; } -.cryptpad-toolbar.whiteboard .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.whiteboard .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.whiteboard .drawer-content button:hover { +body.app-whiteboard .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-whiteboard .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-whiteboard .cryptpad-toolbar .drawer-content button:hover { background-color: #800080; } -.cryptpad-toolbar.whiteboard .hoverable:hover .editable { +body.app-whiteboard .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #cd00cc; background: #4d004d; color: #fff; } -.cryptpad-toolbar.whiteboard .hoverable:hover .pencilIcon { +body.app-whiteboard .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #cd00cc; background: #4d004d; color: #fff; } -.cryptpad-toolbar.whiteboard .hoverable:hover .pencilIcon:hover { +body.app-whiteboard .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #670066; } -.cryptpad-toolbar.whiteboard .saveIcon { +body.app-whiteboard .cryptpad-toolbar .saveIcon { border: 1px solid #cd00cc; background: #4d004d; color: #fff; } -.cryptpad-toolbar.whiteboard .saveIcon:hover { +body.app-whiteboard .cryptpad-toolbar .saveIcon:hover { background: #670066; } -.cryptpad-toolbar.whiteboard input { +body.app-whiteboard .cryptpad-toolbar input { border: 1px solid #cd00cc; background: #4d004d; color: #fff; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content { background: #670066; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content a { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content a.active { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #4d004d; color: #fff; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content a:hover { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #800080; color: #fff; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content hr { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content hr { background-color: #340033; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content p h2 { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #4d004d; } -.cryptpad-toolbar.whiteboard .dropdown-bar-content p .accountData { +body.app-whiteboard .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #800080; } -.cryptpad-toolbar.drive { +body.app-drive .userlist-drawer { + background-color: #0087ff; + color: #fff; +} +body.app-drive .userlist-drawer h2 { + background-color: #006ccc; +} +body.app-drive .cryptpad-toolbar { background-color: #0087ff; color: #fff; } -.cryptpad-toolbar.drive .cryptpad-toolbar-leftside, -.cryptpad-toolbar.drive .cryptpad-toolbar-rightside, -.cryptpad-toolbar.drive .drawer-content { +body.app-drive .cryptpad-toolbar .userlist-drawer { + background-color: #0087ff; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-drive .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-drive .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-drive .cryptpad-toolbar .drawer-content { background-color: #299aff; } -.cryptpad-toolbar.drive .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.drive .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.drive .drawer-content button:hover { +body.app-drive .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-drive .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-drive .cryptpad-toolbar .drawer-content button:hover { background-color: #0087ff; } -.cryptpad-toolbar.drive .hoverable:hover .editable { +body.app-drive .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #4dabff; background: #006ccc; color: #fff; } -.cryptpad-toolbar.drive .hoverable:hover .pencilIcon { +body.app-drive .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #4dabff; background: #006ccc; color: #fff; } -.cryptpad-toolbar.drive .hoverable:hover .pencilIcon:hover { +body.app-drive .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #0079e6; } -.cryptpad-toolbar.drive .saveIcon { +body.app-drive .cryptpad-toolbar .saveIcon { border: 1px solid #4dabff; background: #006ccc; color: #fff; } -.cryptpad-toolbar.drive .saveIcon:hover { +body.app-drive .cryptpad-toolbar .saveIcon:hover { background: #0079e6; } -.cryptpad-toolbar.drive input { +body.app-drive .cryptpad-toolbar input { border: 1px solid #4dabff; background: #006ccc; color: #fff; } -.cryptpad-toolbar.drive .dropdown-bar-content { +body.app-drive .cryptpad-toolbar .dropdown-bar-content { background: #0079e6; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.drive .dropdown-bar-content a { +body.app-drive .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.drive .dropdown-bar-content a.active { +body.app-drive .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #006ccc; color: #fff; } -.cryptpad-toolbar.drive .dropdown-bar-content a:hover { +body.app-drive .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #0087ff; color: #fff; } -.cryptpad-toolbar.drive .dropdown-bar-content hr { +body.app-drive .cryptpad-toolbar .dropdown-bar-content hr { background-color: #005eb3; } -.cryptpad-toolbar.drive .dropdown-bar-content p h2 { +body.app-drive .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #006ccc; } -.cryptpad-toolbar.drive .dropdown-bar-content p .accountData { +body.app-drive .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #0087ff; } -.cryptpad-toolbar.file { +body.app-file .userlist-drawer { + background-color: #cd2532; + color: #fff; +} +body.app-file .userlist-drawer h2 { + background-color: #a21d27; +} +body.app-file .cryptpad-toolbar { background-color: #cd2532; color: #fff; } -.cryptpad-toolbar.file .cryptpad-toolbar-leftside, -.cryptpad-toolbar.file .cryptpad-toolbar-rightside, -.cryptpad-toolbar.file .drawer-content { +body.app-file .cryptpad-toolbar .userlist-drawer { + background-color: #cd2532; + width: 150px; + position: absolute; + left: 0; + top: 96px; + bottom: 0; +} +body.app-file .cryptpad-toolbar .cryptpad-toolbar-leftside, +body.app-file .cryptpad-toolbar .cryptpad-toolbar-rightside, +body.app-file .cryptpad-toolbar .drawer-content { background-color: #dc3f4b; } -.cryptpad-toolbar.file .cryptpad-toolbar-leftside button:hover, -.cryptpad-toolbar.file .cryptpad-toolbar-rightside button:hover, -.cryptpad-toolbar.file .drawer-content button:hover { +body.app-file .cryptpad-toolbar .cryptpad-toolbar-leftside button:hover, +body.app-file .cryptpad-toolbar .cryptpad-toolbar-rightside button:hover, +body.app-file .cryptpad-toolbar .drawer-content button:hover { background-color: #cd2532; } -.cryptpad-toolbar.file .hoverable:hover .editable { +body.app-file .cryptpad-toolbar .hoverable:hover .editable { cursor: text; border: 1px solid #e25d67; background: #a21d27; color: #fff; } -.cryptpad-toolbar.file .hoverable:hover .pencilIcon { +body.app-file .cryptpad-toolbar .hoverable:hover .pencilIcon { border: 1px solid #e25d67; background: #a21d27; color: #fff; } -.cryptpad-toolbar.file .hoverable:hover .pencilIcon:hover { +body.app-file .cryptpad-toolbar .hoverable:hover .pencilIcon:hover { background: #b7212d; } -.cryptpad-toolbar.file .saveIcon { +body.app-file .cryptpad-toolbar .saveIcon { border: 1px solid #e25d67; background: #a21d27; color: #fff; } -.cryptpad-toolbar.file .saveIcon:hover { +body.app-file .cryptpad-toolbar .saveIcon:hover { background: #b7212d; } -.cryptpad-toolbar.file input { +body.app-file .cryptpad-toolbar input { border: 1px solid #e25d67; background: #a21d27; color: #fff; } -.cryptpad-toolbar.file .dropdown-bar-content { +body.app-file .cryptpad-toolbar .dropdown-bar-content { background: #b7212d; border: 1px solid #fff; color: #fff; } -.cryptpad-toolbar.file .dropdown-bar-content a { +body.app-file .cryptpad-toolbar .dropdown-bar-content a { color: #fff; } -.cryptpad-toolbar.file .dropdown-bar-content a.active { +body.app-file .cryptpad-toolbar .dropdown-bar-content a.active { background-color: #a21d27; color: #fff; } -.cryptpad-toolbar.file .dropdown-bar-content a:hover { +body.app-file .cryptpad-toolbar .dropdown-bar-content a:hover { background-color: #cd2532; color: #fff; } -.cryptpad-toolbar.file .dropdown-bar-content hr { +body.app-file .cryptpad-toolbar .dropdown-bar-content hr { background-color: #8c1922; } -.cryptpad-toolbar.file .dropdown-bar-content p h2 { +body.app-file .cryptpad-toolbar .dropdown-bar-content p h2 { background-color: #a21d27; } -.cryptpad-toolbar.file .dropdown-bar-content p .accountData { +body.app-file .cryptpad-toolbar .dropdown-bar-content p .accountData { background-color: #cd2532; } +.cryptpad-toolbar { + box-sizing: border-box; + padding: 0px; + background-color: #ddd; + color: #000; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif; + width: 100%; + z-index: 9001; +} .cryptpad-toolbar .fa { font: normal normal normal 14px/1 FontAwesome; font-family: FontAwesome; @@ -1095,7 +1234,9 @@ margin: 5px 0px; } .cryptpad-toolbar-leftside button { - margin: 2px 4px 2px 0px; + margin: 0px; + border-radius: 0; + height: 100%; } .cryptpad-toolbar-leftside .dropdown-bar-content { margin-top: -1px; diff --git a/www/code/code.css b/www/code/code.css index 320256ab5..359eff778 100644 --- a/www/code/code.css +++ b/www/code/code.css @@ -26,9 +26,9 @@ body { transition: width 500ms, min-width 500ms, max-width 500ms; } .CodeMirror.fullPage { - min-width: 100%; max-width: 100%; resize: none; + flex: 1; } .CodeMirror-focused .cm-matchhighlight { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==); diff --git a/www/code/code.less b/www/code/code.less index 47b430350..8e075e87f 100644 --- a/www/code/code.less +++ b/www/code/code.less @@ -30,9 +30,10 @@ body { resize: horizontal; } .CodeMirror.fullPage { - min-width: 100%; + //min-width: 100%; max-width: 100%; resize: none; + flex: 1; } .CodeMirror-focused .cm-matchhighlight { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==); diff --git a/www/code/main.js b/www/code/main.js index 6e0270285..b9fb3c37a 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -41,6 +41,7 @@ define([ var andThen = function (CMeditor) { var $iframe = $('#pad-iframe').contents(); + var $contentContainer = $iframe.find('#editorContainer'); var $previewContainer = $iframe.find('#previewContainer'); var $preview = $iframe.find('#preview'); $preview.click(function (e) { @@ -188,7 +189,8 @@ define([ ifrw: ifrw, realtime: info.realtime, network: info.network, - $container: $bar + $container: $bar, + $contentContainer: $contentContainer }; toolbar = APP.toolbar = Toolbar.create(configTb); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index fb19e0f52..708d2e42a 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -924,7 +924,6 @@ define([ common.createButton = function (type, rightside, data, callback) { var button; var size = "17px"; - console.log(type); switch (type) { case 'export': button = $('