@import (reference) "./dropdown.less"; @import (reference) "./colortheme-all.less"; @import (reference) "./browser.less"; @import (reference) "./ckeditor-fix.less"; @import (reference) "./avatar.less"; @import (reference) "./toolbar-history.less"; @import (reference) "./icon-colors.less"; @import (reference) "./tools.less"; @import (reference) "./icons.less"; @import (reference) "./modal.less"; @import (reference) "./help.less"; @import (reference) "./notifications.less"; .toolbar_vars ( @color: @colortheme_default-color, // Color of the text for the toolbar @bg-color: @colortheme_default-bg, // color of the toolbar background @warn-color: @colortheme_default-warn // color of the warning text in the toolbar ) { @toolbar-bg-color: @bg-color; @toolbar-bg-color-light: lighten(@bg-color, 30%); @toolbar-bg-color-active: lighten(@bg-color, 20%); }; .toolbar_main ( @color: @colortheme_default-color, // Color of the text for the toolbar @bg-color: @colortheme_default-bg, // color of the toolbar background @warn-color: @colortheme_default-warn, // color of the warning text in the toolbar @barWidth: 600px // width of the toolbar ) { --LessLoader_require: LessLoader_currentFile(); .toolbar_vars(@color, @bg-color, @warn-color); --toolbar-bg-color: @toolbar-bg-color; --toolbar-bg-color-light: @toolbar-bg-color-light; --toolbar-bg-color-active: @toolbar-bg-color-active; .help_main(); .notifications_main(); .dropdown_main(); .history_main(); .iconColors_main(); .modal_main(); }; & { @toolbar-color: @cryptpad_text_col; @toolbar-color-light: lighten(@cryptpad_text_col, 10%); .toolbar_vars(); @toolbar-top-bg: #eee; @toolbar_line-height: 32px; @toolbar_top-height: 76px; @toolbar_button-font: @colortheme_app-font; // if we spell 'share' correctly, then adblock plus hides the share button // this is a workaround .fa-shhare-alt:before { content: "\f1e0"; } .ckeditor_fix(); .cp-burn-after-reading { text-align: center; font-size: @colortheme_app-font-size !important; margin: 0 !important; } .cp-markdown-toolbar { height: @toolbar_line-height; background-color: @colortheme_pad-toolbar-bg; display: none; button { height: @toolbar_line-height !important; outline: 0; color: @toolbar-color; .toolbar_button; font: normal normal normal 14px/1 FontAwesome; &:hover { background-color: darken(@colortheme_pad-toolbar-bg, 5%); } &.cp-markdown-help { float: right; } } } .cp-toolbar-container { display: flex; } .toolbar_button { height: @toolbar_line-height; box-sizing: border-box; padding: 3px 10px; margin: 0; transition: all 0.15s; .tools_unselectable(); &.cp-toolbar-hidden { display: none; } .cp-toolbar-drawer-element { display: none; } // Bootstrap 4 colors (btn-secondary) border: 1px solid transparent; color: inherit; font: @toolbar_button-font; * { color: inherit; font: @toolbar_button-font; } background: transparent; &:hover { background-color: rgba(50,50,50,0.3); } } .cp-toolbar-chat-drawer { background-color: @toolbar-bg-color; background-color: var(--toolbar-bg-color); font: @colortheme_app-font-size @colortheme_font; width: 20%; min-width: 200px; display: block; overflow-y: auto; overflow-x: hidden; padding: 0; box-sizing: border-box; position: relative; order: 99; z-index: 1; #cp-app-contacts-container { height: 100%; } .cp-toolbar-chat-drawer-close { color: @toolbar-color; position: absolute; top: 0; right: 1px; font-size: 15px; opacity: 0.5; cursor: pointer; text-shadow: unset; &:hover { opacity: 1; } } } .cp-toolbar-userlist-drawer { font: @colortheme_app-font-size @colortheme_font; min-width: 175px; width: 175px; display: block; overflow-y: auto; overflow-x: hidden; padding: 10px; box-sizing: border-box; order: 100; z-index: 1; .cp-toolbar-userlist-drawer-close { position: absolute; margin-top: -10px; margin-left: 149px; font-size: 15px; opacity: 0.5; cursor: pointer; text-shadow: unset; &:hover { opacity: 1; } } h2 { color: inherit; text-align: center; padding: 5px 0px; margin: 5px 0px; font: inherit; font-weight: bold; white-space: normal; line-height: auto; } text-align: baseline; .cp-toolbar-userlist-viewer { font-style: italic; padding: 5px; background: rgba(0,0,0,0.1); margin: 2px 0; } & > p { font: @colortheme_app-font-size @colortheme_font; margin: 0; padding: 0; display: block; } .cp-toolbar-userlist-others { display: flex; flex-flow: column; margin: 10px 0; margin-bottom: 20px; &>span { height: 48px; padding: 5px; margin: 2px 0; background: rgba(0,0,0,0.1); border-right: 3px solid transparent; .avatar_main(30px); .cp-avatar-default, media-tag { margin-right: 5px; } &.cp-userlist-clickable { cursor: pointer; &:hover { background-color: rgba(0,0,0,0.3); } } .cp-toolbar-userlist-rightcol { order: 10; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-flow: column; height: 100%; .cp-toolbar-userlist-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; justify-content: space-between; align-items: center; button { width: 20px; font-size: 16px; padding: 0; border: none; height: 20px; cursor: pointer; } } .cp-toolbar-userlist-name-input { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; border: none; } .cp-toolbar-userlist-name-value { overflow: hidden; flex: 1; min-width: 0; min-height: 0; text-overflow: ellipsis; } .cp-toolbar-userlist-friend { padding: 0; } } } } .cp-toolbar-userlist-friend { display: inline-block; width: 20px; } } #cp-app-toolbar-creation-dialog.cp-modal-container { .icons_main(); li { border: 1px solid @colortheme_modal-fg; &:hover { //border: 1px solid @colortheme_modal-fg; background: @colortheme_modal-fg; color: @colortheme_modal-bg; } } .cp-modal { display: flex; flex-flow: column; li, li .fa { cursor: pointer; } &> p { margin: 50px; } &> div { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; } &> div:last-child { flex: unset; margin: 50px 0; } } .cp-creation-icons-name { white-space: nowrap; } #cp-app-toolbar-creation-advanced { width: auto; margin: 0; padding: 0; outline: none; } label[for="cp-app-toolbar-creation-advanced"] { margin: 0; margin-left: 5px; } @media screen and (max-height: @browser_media-medium-screen), screen and (max-width: @browser_media-medium-screen) { .cp-modal { & > p { display: none; } & > div { align-content: unset; align-items: center; li { height: 40px; width: 200px; display: flex; align-items: center; .fa, .cptools { font-size: 32px; min-width: 50px; } .cp-icons-name { height: auto; text-align: left; } } } } } } .cp-toolbar-userlist-drawer { background-color: @colortheme_userlist-bg; color: @toolbar-color; .cp-toolbar-userlist-drawer-close { color: @toolbar-color; } h2 { color: @toolbar-color; } .cp-toolbar-userlist-name-input { background-color: rgba(0,0,0,0.1); } .cp-toolbar-userlist-button { background: transparent; &:hover { color: @toolbar-color-light; } } } .cp-toolbar { * { outline-width: 0; &:focus { outline-width: 0; } } @toolbar-green: #5cb85c; box-sizing: border-box; padding: 0px; display: flex; flex-wrap: wrap; justify-content: space-between; background-color: @toolbar-top-bg; color: @toolbar-bg-color; color: var(--toolbar-bg-color); .fa { font: normal normal normal 14px/1 FontAwesome; font-family: FontAwesome; } .tools_unselectable(); font: @toolbar_button-font; width: 100%; z-index: 10000; // cp-toolbar .cp-dropdown-container { //height: 100%; //display: inline-block; button { height: 100%; border-radius: 0; margin: 0; background: transparent; } } button { .toolbar_button; } .cp-toolbar-limit { box-sizing: border-box; height: 26px; width: 26px; display: inline-block; padding: 3px; margin: 0px 3px 0 6px; vertical-align: middle; line-height: @toolbar_top-height; span { cursor: pointer; margin: auto; font-size: 20px; } } div { white-space: normal; } /*button, select { height: @toolbar_line-height; box-sizing: border-box; padding: 3px 10px; margin: 0; }*/ select { margin-left: 5px; margin-right: 5px; padding-left: 5px; border: 1px solid #A6A6A6; border-bottom-color: #979797; vertical-align: top; box-sizing: content-box; option { height: 24px; } } &.cp-toolbar-notitle { .cp-toolbar-top-filler { flex: 1; } } .cp-toolbar-top { @media screen and (max-width: @browser_media-medium-screen), screen and (max-height: 500px) { flex-wrap: wrap; height: @toolbar_line-height; .cp-pad-not-pinned { line-height: 32px; flex: unset; padding: 0; align-self: auto; margin: 0 5px; } .cp-toolbar-top-filler { height: 32px; } .cp-toolbar-title { height: @toolbar_line-height; flex-flow: row; line-height: initial; margin: 0; .cp-toolbar-title-hoverable { width: 100%; } .cp-toolbar-title-editable, .cp-toolbar-title-value { max-width: ~"calc(100vw - 26px)"; display: inline-block; overflow: hidden; text-overflow: ellipsis; font-size: @colortheme_app-font-size; height: @toolbar_line-height; box-sizing: border-box; line-height: @toolbar_line-height; border: 1px solid transparent; } .cp-toolbar-title-readonly { font-size: 14px; } .cp-toolbar-title-value { padding: 5px; line-height: @toolbar_line-height - 10px; //border: 0; } .cp-toolbar-title-edit, .cp-toolbar-title-save { box-sizing: border-box; height: @toolbar_line-height; line-height: @toolbar_line-height; display: inline-flex; .fa { font-size: @colortheme_app-font-size; } } input { height: @toolbar_line-height; font-size: @colortheme_app-font-size; flex: 1; max-width: none; line-height: calc(@toolbar_line-height - 12px); // padding + border } } .cp-toolbar-spinner { min-width: 100px; margin: 0; height: @toolbar_line-height; line-height: @toolbar_line-height; } .cp-toolbar-link { height: @toolbar_line-height; width: @toolbar_line-height; transform: scale(0.5); .cp-toolbar-link-logo { padding: 5px; } } .cp-toolbar-user { height: @toolbar_line-height; .cp-toolbar-notifications { height: @toolbar_line-height; width: @toolbar_line-height; margin-left: 0; button { height: @toolbar_line-height; width: @toolbar_line-height; font-size: 15px; margin-top: -1px; .cp-dropdown-button-title { transform: scale(0.5); bottom: -5px; right: -5px; } } } .cp-toolbar-user-dropdown { height: @toolbar_line-height; width: @toolbar_line-height; &> button { height: @toolbar_line-height; width: @toolbar_line-height; span { font-size: unset; } } &> button.cp-avatar.cp-avatar { media-tag { margin: 4px; max-width: 24px; min-width: 24px; max-height: 24px; min-height: 24px; } } } .cp-toolbar-limit { line-height: 32px; margin: 0; } } } } .cp-toolbar-limit { color: @colortheme_toolbar-warn; } .cp-dropdown-content.cp-dropdown-left a { color: black; } } .cp-toolbar-top { display: flex; flex-flow: row; height: @toolbar_top-height; position: relative; width: 100%; .cp-pad-not-pinned { order: 4; flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: @toolbar_top-height; padding: 0; margin: 0 5px; font-size: @colortheme_app-font-size; color: @colortheme_toolbar-warn; .cp-pnp-msg { padding-left: 5px; font-family: @colortheme_font; font-size: @colortheme_app-font-size; a { font-size: @colortheme_app-font-size; font-family: @colortheme_font; font-weight: bold; color: @colortheme_toolbar-warn; &:hover { text-decoration: underline; } } @media screen and (max-width: (@browser_media-not-big)) { display: none; } } @media screen and (max-width: (@browser_media-not-big)) { overflow: visible; max-width: 20px; } } .cp-toolbar-top-filler { height: @toolbar_top-height; display: inline-block; order: 5; //flex: 1; } .cp-toolbar-title { color: @cryptpad_text_col; font-family: "IBM Plex Mono"; // XXX using locally, add font to customise.dist/fonts/... flex: 1; overflow: hidden; text-overflow: ellipsis; order: 3; height: 100%; display: inline-flex; flex-flow: column; justify-content: center; margin: 0 10px; .cp-toolbar-title-value { border: 1px solid transparent; padding: 0 5px; font-size: 30px; vertical-align: middle; white-space: nowrap; } .cp-toolbar-title-value-page { border: 1px solid transparent; padding: 0 5px; } .cp-toolbar-title-edit, .cp-toolbar-title-save { display: flex; align-items: center; font-size: 20px; vertical-align: middle; .fa { font-size: 20px; } } .cp-toolbar-title-readonly { margin-left: 10px; font-size: 25px; font-style: italic; white-space: nowrap; display: inline-flex; align-items: center; } &.cp-toolbar-unsync { .cp-toolbar-title-edit, .cp-toolbar-title-save { display: none !important; } .cp-toolbar-title-unsync { display: inline-flex; } .cp-toolbar-title-editable, .cp-toolbar-title-edit { border: none !important; } } .cp-toolbar-title-unsync { display: none; } .cp-toolbar-title-hoverable { display: inline-flex; overflow: hidden; align-self: baseline; max-width: 100%; &:hover { .cp-toolbar-title-editable, .cp-toolbar-title-edit { border: 1px solid @toolbar-bg-color; border: 1px solid var(--toolbar-bg-color); transition: all 0.15s; } .cp-toolbar-title-editable { cursor: text; } } } .cp-toolbar-title-edit { cursor: pointer; border: 1px solid transparent; padding: 0 5px; border-collapse: collapse; span { cursor: pointer; } } .cp-toolbar-title-save { border: 1px solid @toolbar-bg-color; border: 1px solid var(--toolbar-bg-color); cursor: pointer; padding: 5px; border-collapse: collapse; span { cursor: pointer; } } .cp-toolbar-title-value { overflow: hidden; text-overflow: ellipsis; border-collapse: collapse; } input { color: @cryptpad_text_col; border: 1px solid @toolbar-bg-color; border: 1px solid var(--toolbar-bg-color); max-width: ~"calc(100% - 40px)"; //flex: 1; vertical-align: middle; box-sizing: border-box; cursor: auto; width: 300px; font-size: 30px !important; padding: 0 5px !important; height: 43px; } } .cp-toolbar-link, .cp-toolbar-notifications { line-height: @toolbar_top-height; width: @toolbar_top-height; height: @toolbar_top-height; padding: 0; box-sizing: border-box; display: inline-block; } .cp-toolbar-notifications { text-align: center; font-size: 32px; margin-left: 10px; &> button { display: flex; align-items: center; justify-content: center; width: @toolbar_top-height; font-size: 1em; height: @toolbar_top-height; padding: 0px; margin: 0; &::before { width: 100%; text-align: center; padding-top: 4px; } &:hover { border-color: transparent; background-color: rgba(50,50,50,0.1); } span { vertical-align: top; font-size: 1em; text-decoration: none; color: inherit; } } .cp-notifications-empty { color: black; padding: 5px; } button { position: relative; .cp-dropdown-button-title { position: absolute; bottom: 10px; right: 16px; font-size: 14px; border: 1px solid; border-radius: 50%; width: 20px; height: 20px; line-height: 16px; background: @toolbar-top-bg; &.cp-notifications-small { font-size: 10px; line-height: 17px; } } } } .cp-toolbar-link { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; order: 1; .fa { margin: 0; } a.cp-toolbar-link-logo { cursor: pointer; display: inline-flex; text-decoration: none; height: auto; padding: 10px; svg { #squares { fill: @toolbar-bg-color; fill: var(--toolbar-bg-color); } #outline, #keyhole { fill: @cryptpad_text_col; } } img { cursor: pointer; height: 100%; width: 100%; } } } .cp-toolbar-user { height: @toolbar_top-height; display: inline-flex; order: 6; line-height: @toolbar_top-height; .cp-toolbar-notifications { order: 1; } .cp-toolbar-user-dropdown { order: 3; } .cp-toolbar-backup { order: 4; } // TODO drive migration to secure iframe &> * { display: inline-block; height: 100%; vertical-align: top; } .cp-toolbar-user-dropdown { z-index: 10000; //Z cp-toolbar-user-dropdown //margin-left: 20px; height: @toolbar_top-height; width: @toolbar_top-height; padding: 0px; box-sizing: border-box; text-align: center; /* background-color: rgba(0,0,0,0.3); transition: all 0.15s; &:hover { background-color: rgba(0,0,0,0.4); } */ .cp-dropdown-content { margin: 0; } & > button { display: flex; justify-content: center; align-items: center; height: @toolbar_top-height; width: @toolbar_top-height; padding: 0; &:hover { border-color: transparent; background-color: rgba(50,50,50,0.1); } span { text-align: center; width: 100%; font-size: 48px; display: inline-flex; justify-content: center; align-items: center; } &.cp-avatar { .avatar_main(64px); border: 0; } } } p.cp-toolbar-account { &> span { font-weight: bold; span { font-weight: normal; } } } .cp-toolbar-backup { margin: 0; border-radius: 0; background: transparent; &:hover { background-color: rgba(0,0,0,0.2); } } } } .cp-toolbar-history, .cp-toolbar-snapshots { background-color: @toolbar-bg-color-light; background-color: var(--toolbar-bg-color-light); color: @cryptpad_text_col; } .cp-toolbar-snapshots { display: none; text-align: center; width: 100%; padding: 5px 0; align-items: center; justify-content: space-between; .cp-toolbar-snapshots-info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; i { width: 30px; } } @media screen and (max-width: @browser_media-medium-screen) { flex-flow: column; .cp-toolbar-snapshots-info { max-width: 100%; } } .cp-toolbar-snapshots-actions { button { margin: 0 5px; border: 1px solid @cryptpad_text_col; text-transform: uppercase; i:not(:last-child) { margin-right: 5px; } } } } .cp-toolbar-bottom { background-color: @toolbar-bg-color-light; background-color: var(--toolbar-bg-color-light); color: @cryptpad_text_col; button:hover, button.cp-toolbar-button-active { background-color: @toolbar-bg-color-active; background-color: var(--toolbar-bg-color-active); } button.cp-toolbar-button-active { border-color: @toolbar-bg-color-active; border-color: var(--toolbar-bg-color-active); } button:hover, button:focus { border-color: @toolbar-bg-color-active; border-color: var(--toolbar-bg-color-active); //border-color: @cryptpad_text_col; } display: inline-flex; align-items: center; justify-content: space-between; max-width: 100%; flex: 1 1 auto; &:empty { height: 0; } .cp-toolbar-users { pre { /* needed for ckeditor */ white-space: pre; margin: 5px 0px; } } button { border: 1px solid transparent; box-sizing: border-box; position: relative; margin: 0px; border-radius: 0; height: @toolbar_line-height; display: inline-flex; align-items: center; .fa, .cptools { margin-right: 5px; } } &.cp-toolbar-small { button { .cp-toolbar-name, .cp-button-name { display: none; } i { margin-right: 0; } } } & > span { height: @toolbar_line-height; } .cp-toolbar-bottom-left { display: flex; order: 1; } .cp-toolbar-bottom-mid { display: flex; order: 2; } .cp-toolbar-bottom-right { order: 3; display: flex; #cp-toolbar-chat-drawer-open { order: 0; } #cp-toolbar-userlist-drawer-open { order: 1; } } .cp-toolbar-bottom-right { button { white-space: nowrap; } } .cp-toolbar-bottom-left { .cp-toolbar-appmenu, .cp-toolbar-file { button { &::before, .fa { min-width: 20px; text-align: center; margin-right: 0; } } } .cp-toolbar-file { order: 1; } .cp-toolbar-appmenu { order: 3; } .cp-toolbar-mediatag, .cp-toolbar-icon-mediatag { order: 5; } .cp-toolbar-tools { order: 7; } .cp-toolbar-icon-pad_toc { order: 8; } .cp-toolbar-file { button { &.fa-plus { order: 0; } &.fa-history { order: 5; } &.fa-hashtag { order: 10; } &.fa-bookmark { order: 15; } &.fa-upload { order: 20; } &.fa-copy { order: 25; } &.fa-download { order: 30; } &.fa-print { order: 35; } &.fa-trash { order: 40; } &.fa-info-circle { order: 100; } &.cp-toolbar-icon-help { order: 150; } } } .cp-toolbar-drawer-content:empty ~ .cp-toolbar-drawer-button { display: none; } .cp-toolbar-drawer-content { box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2); overflow-y: auto; overflow-x: hidden; &.cp-dropdown-visible { overflow: visible; } position: absolute; left: 0px; top: @toolbar_line-height; margin: -1px; min-width: 50px; background: @colortheme_dropdown-bg; display: flex; flex-flow: column; z-index: 10000; //Z cp-toolbar-drawer-content color: black; .tools_unselectable(); .fa { font-size: 17px; } &> span { order: 8; box-sizing: border-box; min-width: 150px; height: @toolbar_line-height; border-radius: 0; border: 0; } button { white-space: nowrap; padding: 5px 16px; text-align: left; margin: 0; border-radius: 0; border: 0; width: 100%; line-height: 1em; &.cp-toolbar-button-active { background-color: inherit; } .cp-toolbar-drawer-element { margin-left: 10px; display: inline; vertical-align: baseline; } &:hover { background-color: @colortheme_dropdown-bg-hover !important; color: @colortheme_dropdown-color; } } } } } .cp-toolbar-spinner { color: @cryptpad_text_col; font-family: "Open Sans"; font-size: 14px; padding: 0 8px; height: 20px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 200px; box-sizing: border-box; margin-bottom: 5px; &> span.fa { height: 20px; width: 20px; //margin: 8px; line-height: 20px; font-size: 20px; text-align: center; } } .cp-toolbar-readonly { margin-right: 5px; font-weight: bold; text-transform: uppercase; } .cp-toolbar-share { a { .fa { margin-right: 5px; } } } }