From cdb1bc83f2ffd7c3190bddde0da42f69f8508de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Thu, 3 Mar 2022 13:59:27 +0100 Subject: [PATCH] Toolbar fixes - correct notification and maintenance icons on small screens - add CrytpPad logo to the top of user menu --- customize.dist/src/less2/include/toolbar.less | 31 ++++++++++++++++--- www/common/common-ui-elements.js | 8 +++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 8d826dad3..71bcb53cc 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -442,6 +442,7 @@ screen and (max-height: 500px) { flex-wrap: wrap; height: @toolbar_line-height; + // XXX DB TODO: scale down icon logo on small screens .cp-pad-not-pinned { line-height: 32px; flex: unset; @@ -509,6 +510,9 @@ //transform: scale(0.5); .cp-toolbar-link-logo { padding: 5px; + span { + font-size: 24px; + } } } .cp-toolbar-user { @@ -517,16 +521,20 @@ height: @toolbar_line-height; width: @toolbar_line-height; margin-left: 0; + padding: 0px; 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; + &::before { + padding-top: 1px; } + // .cp-dropdown-button-title { + // transform: scale(0.5); + // bottom: -5px; + // right: -5px; + // } } } .cp-toolbar-user-dropdown { @@ -799,6 +807,8 @@ text-decoration: none; height: auto; padding: 10px; + color: @toolbar-bg-color; + color: var(--toolbar-bg-color); span { font-size: 45px; @@ -884,6 +894,19 @@ } } } + .cp-user-menu-logo { + text-align: left; + font-family: "IBM Plex Mono"; + color: @cryptpad_color_grey_500; + font-size: 1.5em; + padding: 5px; + img { + width: 25px; + } + .cp-user-menu-logo-text { + margin-left: 10px; + } + } p.cp-toolbar-account { &> span { font-weight: bold; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 5e05e23f4..a3520e608 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1685,6 +1685,14 @@ define([ var $userName = $(''); var options = []; + options.push({ + tag: 'div', + attributes: {'class': 'cp-user-menu-logo'}, + content: h('span', [ + h('img', {src: '/customize/CryptPad_logo_grey.svg',alt: 'CryptPad logo',}), + h('span.cp-user-menu-logo-text', "CryptPad") + ]), + }); if (config.displayNameCls) { var $userAdminContent = $('

'); if (accountName) {